Skip to content

Commit

Permalink
Fix #1273, remove PspConfig global object
Browse files Browse the repository at this point in the history
The `PspConfig` member is removed from the `GLOBAL_CONFIGDATA` object.

Updates the only remaining ref to this object inside the CFE_PSP_VERSION
macro to use the API function instead.

This also updates the OSAL and CFE version print to _not_ depend on the
global object too - OSAL becomes an API call and CFE can just use the
macro directly because its the same library (itself) so no linking
concern/issue.
  • Loading branch information
jphickey committed Mar 31, 2021
1 parent 98bc158 commit e5e2953
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 0 additions & 2 deletions cmake/target/inc/target_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#define TARGET_CONFIG_H_

#include "common_types.h"
#include "cfe_psp_configdata.h"

/**
* Prototype for the main system entry function implemented in CFE ES
Expand Down Expand Up @@ -194,7 +193,6 @@ typedef const struct
const char *Default_CoreFilename; /**< Default file name for CFE core executable/library */

Target_CfeConfigData *CfeConfig; /**< CFE configuration sub-structure */
Target_PspConfigData *PspConfig; /**< PSP configuration sub-structure */
CFE_StaticModuleLoadEntry_t
*PspModuleList; /**< List of PSP modules (API structures) statically linked into the core EXE */

Expand Down
1 change: 0 additions & 1 deletion cmake/target/src/target_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ Target_ConfigData GLOBAL_CONFIGDATA = {
.Default_ModuleExtension = CFE_DEFAULT_MODULE_EXTENSION,
.Default_CoreFilename = CFE_DEFAULT_CORE_FILENAME,
.CfeConfig = &GLOBAL_CFE_CONFIGDATA,
.PspConfig = &GLOBAL_PSP_CONFIGDATA,
.PspModuleList = CFE_PSP_MODULE_LIST,
.BuildEnvironment = CFE_BUILD_ENV_TABLE,
.ModuleVersionList = CFE_MODULE_VERSION_TABLE,
Expand Down
12 changes: 6 additions & 6 deletions modules/es/fsw/src/cfe_es_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,10 @@ int32 CFE_ES_TaskInit(void)
return (Status);
}

Status = CFE_EVS_SendEvent(CFE_ES_INITSTATS_INF_EID, CFE_EVS_EventType_INFORMATION,
"cFS Versions: cfe %s, osal %s, psp %s. cFE chksm %d", GLOBAL_CONFIGDATA.CfeVersion,
GLOBAL_CONFIGDATA.OsalVersion, CFE_PSP_VERSION,
(int)CFE_ES_TaskData.HkPacket.Payload.CFECoreChecksum);
Status =
CFE_EVS_SendEvent(CFE_ES_INITSTATS_INF_EID, CFE_EVS_EventType_INFORMATION,
"cFS Versions: cfe %s, osal %s, psp %s. cFE chksm %d", CFE_SRC_VERSION, OS_GetVersionString(),
CFE_PSP_GetVersionString(), (int)CFE_ES_TaskData.HkPacket.Payload.CFECoreChecksum);

if (Status != CFE_SUCCESS)
{
Expand Down Expand Up @@ -843,8 +843,8 @@ int32 CFE_ES_NoopCmd(const CFE_ES_NoopCmd_t *Cmd)
CFE_ES_TaskData.CommandCounter++;

CFE_EVS_SendEvent(CFE_ES_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION,
"No-op command:\n cFS Versions: cfe %s, osal %s, psp %s", GLOBAL_CONFIGDATA.CfeVersion,
GLOBAL_CONFIGDATA.OsalVersion, CFE_PSP_VERSION);
"No-op command:\n cFS Versions: cfe %s, osal %s, psp %s", CFE_SRC_VERSION, OS_GetVersionString(),
CFE_PSP_GetVersionString());

return CFE_SUCCESS;
} /* End of CFE_ES_NoopCmd() */
Expand Down

0 comments on commit e5e2953

Please sign in to comment.