Skip to content

Commit

Permalink
Fix #609, Remove CFE_PLATFORM_EVS_LOG_ON undefined option to diasble log
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Jan 27, 2021
1 parent 4374482 commit dcadb67
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 43 deletions.
14 changes: 0 additions & 14 deletions cmake/sample_defs/cpu1_platform_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1455,20 +1455,6 @@
#define CFE_PLATFORM_EVS_MAX_EVENT_FILTERS 8


/**
** \cfeevscfg Enable or Disable EVS Local Event Log
**
** \par Description:
** The CFE_PLATFORM_EVS_LOG_ON configuration parameter must be defined to enable EVS
** event logging. In order to disable the local event log this definition needs
** to be commented out.
**
** \par Limits
** Not Applicable
*/
#define CFE_PLATFORM_EVS_LOG_ON


/**
** \cfeevscfg Default Event Log Filename
**
Expand Down
8 changes: 0 additions & 8 deletions fsw/cfe-core/src/evs/cfe_evs_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,11 @@ bool CFE_EVS_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength);
int32 CFE_EVS_EarlyInit ( void )
{

#ifdef CFE_PLATFORM_EVS_LOG_ON

int32 Status;
uint32 resetAreaSize = 0;
cpuaddr resetAreaAddr;
CFE_ES_ResetData_t *CFE_EVS_ResetDataPtr = (CFE_ES_ResetData_t *) NULL;

#endif

memset(&CFE_EVS_GlobalData, 0, sizeof(CFE_EVS_GlobalData_t));

/* Initialize housekeeping packet */
Expand All @@ -95,8 +91,6 @@ int32 CFE_EVS_EarlyInit ( void )
CFE_EVS_GlobalData.EVS_TlmPkt.Payload.LogFullFlag = false;
CFE_EVS_GlobalData.EVS_TlmPkt.Payload.LogMode = CFE_PLATFORM_EVS_DEFAULT_LOG_MODE;

#ifdef CFE_PLATFORM_EVS_LOG_ON

/* Get a pointer to the CFE reset area from the BSP */
Status = CFE_PSP_GetResetArea(&resetAreaAddr, &resetAreaSize);

Expand Down Expand Up @@ -163,8 +157,6 @@ int32 CFE_EVS_EarlyInit ( void )
}
}

#endif

return(CFE_SUCCESS);

} /* End CFE_EVS_EarlyInit */
Expand Down
30 changes: 12 additions & 18 deletions fsw/cfe-core/src/inc/cfe_evs_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -541,12 +541,10 @@
** \par Cause:
**
** This event message is generated upon receipt of a "Set Log Mode"
** command when the use of the Event Log has been disabled. To enable
** the Event Log, the cFE code must be compiled for the target with
** the \b CFE_PLATFORM_EVS_LOG_ON macro defined. The EVS task must also succeed
** during task initialization in acquiring a pointer to the cFE reset
** area and in the creation of a serializing semaphore to control
** access to the Event Log.
** command when the use of the Event Log has been disabled. The EVS task
** must succeed during task initialization in acquiring a pointer to
** the cFE reset area and in the creation of a serializing semaphore to
** control access to the Event Log.
**/
#define CFE_EVS_NO_LOGSET_EID 34

Expand All @@ -558,12 +556,10 @@
** \par Cause:
**
** This event message is generated upon receipt of a "Clear Log"
** command when the use of the Event Log has been disabled. To enable
** the Event Log, the cFE code must be compiled for the target with
** the \b CFE_PLATFORM_EVS_LOG_ON macro defined. The EVS task must also succeed
** during task initialization in acquiring a pointer to the cFE reset
** area and in the creation of a serializing semaphore to control
** access to the Event Log.
** command when the use of the Event Log has been disabled. The EVS task
** must succeed during task initialization in acquiring a pointer to
** the cFE reset area and in the creation of a serializing semaphore to
** control access to the Event Log.
**/
#define CFE_EVS_NO_LOGCLR_EID 35

Expand All @@ -575,12 +571,10 @@
** \par Cause:
**
** This event message is generated upon receipt of a "Write Log"
** command when the use of the Event Log has been disabled. To enable
** the Event Log, the cFE code must be compiled for the target with
** the \b CFE_PLATFORM_EVS_LOG_ON macro defined. The EVS task must also succeed
** during task initialization in acquiring a pointer to the cFE reset
** area and in the creation of a serializing semaphore to control
** access to the Event Log.
** command when the use of the Event Log has been disabled. The EVS task
** must succeed during task initialization in acquiring a pointer to
** the cFE reset area and in the creation of a serializing semaphore to
** control access to the Event Log.
**/
#define CFE_EVS_NO_LOGWR_EID 36

Expand Down
4 changes: 1 addition & 3 deletions fsw/cfe-core/src/inc/private/cfe_es_resetdata_typedef.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "cfe_es_erlog_typedef.h" /* Required for CFE_ES_ERLog_t definition */
#include "cfe_es_perfdata_typedef.h" /* Required for CFE_ES_PerfData_t definition */
#include "cfe_evs_log_typedef.h" /* Required for CFE_EVS_Log_t definition */
#include "cfe_platform_cfg.h" /* CFE_PLATFORM_EVS_LOG_ON, CFE_PLATFORM_ES_ER_LOG_ENTRIES, CFE_PLATFORM_ES_SYSTEM_LOG_SIZE */
#include "cfe_platform_cfg.h" /* CFE_PLATFORM_ES_ER_LOG_ENTRIES, CFE_PLATFORM_ES_SYSTEM_LOG_SIZE */

/*
** Reset Variables type
Expand Down Expand Up @@ -93,12 +93,10 @@ typedef struct
*/
CFE_TIME_ResetVars_t TimeResetVars;

#ifdef CFE_PLATFORM_EVS_LOG_ON
/*
** EVS Log and associated variables. This needs to be preserved on a processor reset.
*/
CFE_EVS_Log_t EVS_Log;
#endif

} CFE_ES_ResetData_t;

Expand Down

0 comments on commit dcadb67

Please sign in to comment.