Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix #940, Add module suffix and core name to configdata #941

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmake/target/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ file (REMOVE "${CMAKE_CURRENT_BINARY_DIR}/cfs_static_symbol_list.inc.tmp")
add_executable(core-${TGTNAME} src/target_config.c)

target_compile_definitions(core-${TGTNAME} PRIVATE
CFE_DEFAULT_MODULE_EXTENSION="${CMAKE_SHARED_MODULE_SUFFIX}"
CFE_DEFAULT_CORE_FILENAME="$<TARGET_FILE_NAME:core-${TGTNAME}>"
CFE_CPU_NAME_VALUE="${TGTNAME}"
CFE_SPACECRAFT_ID_VALUE=${SPACECRAFT_ID}
CFE_CPU_ID_VALUE=${${TGTNAME}_PROCESSORID}
Expand Down
3 changes: 3 additions & 0 deletions cmake/target/inc/target_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ typedef const struct
uint16 Default_CpuId; /**< Compile-time value for CPU number */
uint16 Default_SpacecraftId; /**< Compile-time value for Spacecraft ID (mission-wide) */

const char *Default_ModuleExtension; /**< Default system extension for dynamic modules */
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
2 changes: 2 additions & 0 deletions cmake/target/src/target_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ Target_ConfigData GLOBAL_CONFIGDATA =
.Default_CpuName = CFE_CPU_NAME_VALUE,
.Default_CpuId = CFE_CPU_ID_VALUE,
.Default_SpacecraftId = CFE_SPACECRAFT_ID_VALUE,
.Default_ModuleExtension = CFE_DEFAULT_MODULE_EXTENSION,
.Default_CoreFilename = CFE_DEFAULT_CORE_FILENAME,
.CfeConfig = &GLOBAL_CFE_CONFIGDATA,
.PspConfig = &GLOBAL_PSP_CONFIGDATA,
.PspModuleList = GLOBAL_PSP_MODULELIST,
Expand Down