diff --git a/CHANGELOG.md b/CHANGELOG.md index 4edf717dd..65b772882 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Development Build: equuleus-rc1+dev90 +- EDS XML file updates +- add EDS cmake hooks +- See and + ## Development Build: equuleus-rc1+dev84 - CFE updates needed for generated header compatibility (EDS) - See diff --git a/CMakeLists.txt b/CMakeLists.txt index f313fb20c..7a147eeb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,21 @@ project(CFE C) # Allow unit tests to be added by any recipe enable_testing() +# This switch determines whether to use EDS framework +# By default it is set OFF/false as this is a new/experimental feature. +option(CFE_EDS_ENABLED_BUILD "Use EDS framework" OFF) + +# Always create directories to hold generated files/wrappers +# EDS makes signficant use of generated files. In non-EDS builds +# some headers and wrapper files are also generated. Directories +# may simply remain empty if not used/needed in the current config. +file(MAKE_DIRECTORY + "${CMAKE_BINARY_DIR}/eds" + "${CMAKE_BINARY_DIR}/obj" + "${CMAKE_BINARY_DIR}/inc" + "${CMAKE_BINARY_DIR}/src" +) + # Include the global routines include("cmake/global_functions.cmake") @@ -123,4 +138,3 @@ prepare() foreach(SYSVAR ${TGTSYS_LIST}) process_arch(${SYSVAR}) endforeach(SYSVAR ${TGTSYS_LIST}) - diff --git a/cmake/arch_build.cmake b/cmake/arch_build.cmake index e0bae5dde..e152d7182 100644 --- a/cmake/arch_build.cmake +++ b/cmake/arch_build.cmake @@ -101,6 +101,17 @@ function(add_cfe_app APP_NAME APP_SRC_FILES) add_library(${APP_NAME} ${APPTYPE} ${APP_SRC_FILES} ${ARGN}) target_link_libraries(${APP_NAME} core_api) + # If using "local" EDS linkage, then link the app with the EDS library here. + # Note that the linker will only pull in the compilation unit that actually + # resolves an undefined symbol, which in this case would be the app-specific + # DATATYPE_DB object if one is referenced at all. + # + # By linking with the respective application like this, the net result is that + # only the _referenced_ EDS DBs (i.e. those for loaded apps) are held in memory. + if (CFE_EDS_ENABLED_BUILD AND CFE_EDS_LINK_MODE STREQUAL LOCAL) + target_link_libraries($(APP_NAME) cfe_edsdb_static) + endif() + # An "install" step is only needed for dynamic/runtime loaded apps if (APP_DYNAMIC_TARGET_LIST) cfs_app_do_install(${APP_NAME} ${APP_DYNAMIC_TARGET_LIST}) diff --git a/cmake/global_functions.cmake b/cmake/global_functions.cmake index 494b6c62c..d99a92c7e 100644 --- a/cmake/global_functions.cmake +++ b/cmake/global_functions.cmake @@ -10,6 +10,20 @@ include(CMakeParseArguments) +# This is done here at the global level so this definition is used for +# ALL code on ALL targets, including host-side tools. Ideally, this should +# only be necessary on the core_api interface, but it does not fully propagate +# to all unit test targets. If/when that issue is resolved, this can be removed. +if (CFE_EDS_ENABLED_BUILD) + + # Propagate the setting to a C preprocessor define of the same name + # The CFE_EDS_ENABLED_BUILD switch indicates that any + # compile-time preprocessor blocks should be enabled in this build + add_definitions(-DCFE_EDS_ENABLED_BUILD) + +endif(CFE_EDS_ENABLED_BUILD) + + ################################################################## # # FUNCTION: cfe_locate_implementation_file @@ -58,7 +72,7 @@ function(cfe_locate_implementation_file OUTPUT_VAR FILE_NAME) string(REPLACE ${MISSION_SOURCE_DIR} "" RELATIVEDIR ${BASEDIR}) # A target-specific prefixed filename gets priority over a direct filename match - # But do not include this variant if the prefix is already part of the relative search path + # But do not include this variant if the prefix is already part of the relative search path foreach (PREFIX ${LOCATEIMPL_ARG_PREFIX}) if (NOT "${RELATIVEDIR}" MATCHES "/${PREFIX}/") list(APPEND IMPL_SEARCH_PATH "${BASEDIR}${PREFIX}_${FILE_NAME}") diff --git a/cmake/mission_build.cmake b/cmake/mission_build.cmake index 76adfe97c..26285e56d 100644 --- a/cmake/mission_build.cmake +++ b/cmake/mission_build.cmake @@ -293,12 +293,6 @@ function(prepare) add_definitions(-DSIMULATION=${SIMULATION}) endif (SIMULATION) - # Create directories to hold generated files/wrappers - file(MAKE_DIRECTORY "${MISSION_BINARY_DIR}/eds") - file(MAKE_DIRECTORY "${MISSION_BINARY_DIR}/obj") - file(MAKE_DIRECTORY "${MISSION_BINARY_DIR}/inc") - file(MAKE_DIRECTORY "${MISSION_BINARY_DIR}/src") - # Certain runtime variables need to be "exported" to the subordinate build, such as # the specific arch settings and the location of all the apps. This list is collected # during this function execution and exported at the end. @@ -548,7 +542,7 @@ function(process_arch TARGETSYSTEM) # convert to a string which is safe for a directory name string(REGEX REPLACE "[^A-Za-z0-9]" "_" ARCH_CONFIG_NAME "${BUILD_CONFIG}") set(ARCH_BINARY_DIR "${CMAKE_BINARY_DIR}/${ARCH_TOOLCHAIN_NAME}/${ARCH_CONFIG_NAME}") - file(MAKE_DIRECTORY "${ARCH_BINARY_DIR}" "${ARCH_BINARY_DIR}/inc") + file(MAKE_DIRECTORY "${ARCH_BINARY_DIR}") message(STATUS "Configuring for system arch: ${ARCH_TOOLCHAIN_NAME}/${ARCH_CONFIG_NAME}") @@ -578,6 +572,7 @@ function(process_arch TARGETSYSTEM) -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=${CMAKE_EXPORT_COMPILE_COMMANDS} + -DCFE_EDS_ENABLED_BUILD:BOOL=${CFE_EDS_ENABLED_BUILD} ${SELECTED_TOOLCHAIN_FILE} ${CFE_SOURCE_DIR} WORKING_DIRECTORY diff --git a/cmake/mission_defaults.cmake b/cmake/mission_defaults.cmake index c7871c5ce..45193fea1 100644 --- a/cmake/mission_defaults.cmake +++ b/cmake/mission_defaults.cmake @@ -67,6 +67,41 @@ set(MISSION_MODULE_SEARCH_PATH set(osal_SEARCH_PATH ".") set(psp_SEARCH_PATH ".") +# Account for differences when EDS is enabled +if(CFE_EDS_ENABLED_BUILD) + + # The EDS database is an object (or set of objects) generated by the tools from the EDS files. + # This can be linked into CFE either as a whole (GLOBAL) or as part of each app (LOCAL). + # + # LOCAL mode may use less memory by only only including DB objects for the apps that are + # originating or terminating CFS message traffic, but GLOBAL mode is simpler as it ensures + # that the entire DB is accessible by any app, even for data definitions that are not its own. + # + # NOTE: If running CI/TO, SBN, or other "generic" apps that relay SB traffic (or otherwise + # handle data that may not have originated on the same CFE instance) then it is recommended + # to stay with GLOBAL mode. + if (NOT DEFINED CFE_EDS_LINK_MODE) + set(CFE_EDS_LINK_MODE GLOBAL) + endif() + + # The standard msg module is not used in EDS build, edslib provides an alternate + list(REMOVE_ITEM MISSION_CORE_MODULES msg) + + list(APPEND MISSION_CORE_MODULES + "edslib" + "missionlib" + "edsmsg" + ) + + list(APPEND MISSION_MODULE_SEARCH_PATH + "tools/eds/cfecfs" # CFE/CFS modules and extensions from EdsLib + ) + + # edslib exists directly under tools/eds (EDS runtime libraries) + set(edslib_SEARCH_PATH "tools/eds") + +endif(CFE_EDS_ENABLED_BUILD) + # Include "cfe_assert" library in all builds, because it is included # in the default startup script. It should not have any effect if not # used. diff --git a/cmake/sample_defs/eds/cfe-topicids.xml b/cmake/sample_defs/eds/cfe-topicids.xml index b5da0e5ab..90ff6eec4 100644 --- a/cmake/sample_defs/eds/cfe-topicids.xml +++ b/cmake/sample_defs/eds/cfe-topicids.xml @@ -46,72 +46,88 @@ changes are made. Such changes would not be an issue if EDS were used across the board, but until that milestone is met, this manually-specified approach offers more stability in distributed systems. --> - - + + - + + + + + + + + + + + + + + + - - + + - - - - - - - + + + + + - - + + - - + + + - - - - - - - - - - - + + + + + + + + + + + + + - + - + - - + + - - - + + + - + - - + + - - - - - - - - + + + + + + + + + diff --git a/cmake/sample_defs/eds/config.xml b/cmake/sample_defs/eds/config.xml index 38d1efe21..ea7acf3bb 100644 --- a/cmake/sample_defs/eds/config.xml +++ b/cmake/sample_defs/eds/config.xml @@ -27,6 +27,23 @@ --> + + + + + + + + + + + + + + + + + @@ -50,19 +67,28 @@ + + + + + + + + + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Command codes in CFE range are 7 bits (0-127). The most significant bit (codes 128-255) are reserved. - - - - - - - - - - - - - - - - - - The Primary message header that is present in all CCSDS Space Protocol packets - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The APID qualifier header extension that is present in CCSDS version 2 - - - - - - - - - - - - - - The APID qualified primary header that is present in all CCSDS Space Protocol version 2 packets - - - - - - - - - - - - The secondary message header that is present in all cFE command messages - - - - - - - - - - The secondary message header that is present in all cFE telemetry messages - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/core_api/eds/cfe_fs.xml b/modules/core_api/eds/cfe_fs.xml deleted file mode 100644 index 460fbf475..000000000 --- a/modules/core_api/eds/cfe_fs.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - Executive Services Exception/Reset Log File which is generated in response to a - \link #CFE_ES_WRITE_ERLOG_CC \ES_WRITEERLOG2FILE \endlink - command. - - - - - Executive Services System Log File which is generated in response to a - \link #CFE_ES_WRITE_SYSLOG_CC \ES_WRITESYSLOG2FILE \endlink - command. - - - - - Executive Services Information on All Applications File which is generated in response to a - \link #CFE_ES_QUERY_ALL_CC \ES_WRITEAPPINFO2FILE \endlink - command. - - - - - Executive Services Performance Analyzer Data File which is generated in response to a - \link #CFE_ES_PERF_STOPDATA_CC \ES_STOPLADATA \endlink - command. - - - - - Executive Services Shell Response Data File which is generated in response to a - \link #CFE_ES_SHELL_CMD_CC \ES_SHELL \endlink - command. - - - - - Executive Services Critical Data Store Registry Dump File which is generated in response to a - \link #CFE_ES_DUMP_CDS_REG_CC \ES_DUMPCDSREG \endlink - command. - - - - - Table Services Registry Dump File which is generated in response to a - \link #CFE_TBL_DUMP_REG_CC \TBL_WRITEREG2FILE \endlink - command. - - - - - Table Services Table Image File which is generated either on the ground or in response to a - \link #CFE_TBL_DUMP_CC \TBL_DUMP \endlink command. - - - - - Event Services Application Data Dump File which is generated in response to a - \link #CFE_EVS_FILE_WRITE_APP_DATA_CC \EVS_WRITEAPPDATA2FILE \endlink - command. - - - - - Event Services Local Event Log Dump File which is generated in response to a - \link #CFE_EVS_FILE_WRITE_LOG_DATA_CC \EVS_WRITELOG2FILE \endlink - command. - - - - - Software Bus Pipe Data Dump File which is generated in response to a - \link #CFE_SB_SEND_PIPE_INFO_CC \SB_WRITEPIPE2FILE \endlink - command. - - - - - Software Bus Message Routing Data Dump File which is generated in response to a - \link #CFE_SB_SEND_ROUTING_INFO_CC \SB_WRITEROUTING2FILE \endlink - command. - - - - - Software Bus Message Mapping Data Dump File which is generated in response to a - \link #CFE_SB_SEND_MAP_INFO_CC \SB_WRITEMAP2FILE \endlink - command. - - - - - Executive Services Query All Tasks Data File which is generated in response to a - \link #CFE_ES_QUERY_ALL_TASKS_CC \ES_WRITETASKINFO2FILE \endlink - command. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/core_api/eds/config.xml b/modules/core_api/eds/config.xml deleted file mode 100644 index 236a5b6f3..000000000 --- a/modules/core_api/eds/config.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/core_api/fsw/inc/cfe_version.h b/modules/core_api/fsw/inc/cfe_version.h index 71856e480..b3a5a72a4 100644 --- a/modules/core_api/fsw/inc/cfe_version.h +++ b/modules/core_api/fsw/inc/cfe_version.h @@ -26,7 +26,7 @@ #define CFE_VERSION_H /* Development Build Macro Definitions */ -#define CFE_BUILD_NUMBER 84 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ +#define CFE_BUILD_NUMBER 90 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ #define CFE_BUILD_BASELINE "equuleus-rc1" /**< @brief Development: Reference git tag for build number */ #define CFE_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */ #define CFE_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */ diff --git a/modules/core_private/eds/base_types.xml b/modules/core_private/eds/base_types.xml deleted file mode 100644 index a2babb6ab..000000000 --- a/modules/core_private/eds/base_types.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - single - - - - - - double - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/core_private/eds/config.xml b/modules/core_private/eds/config.xml deleted file mode 100644 index 236a5b6f3..000000000 --- a/modules/core_private/eds/config.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/evs/fsw/src/cfe_evs_task.c b/modules/evs/fsw/src/cfe_evs_task.c index 2d5024784..59e8c1ce4 100644 --- a/modules/evs/fsw/src/cfe_evs_task.c +++ b/modules/evs/fsw/src/cfe_evs_task.c @@ -43,12 +43,6 @@ CFE_EVS_Global_t CFE_EVS_Global; /* Defines */ #define CFE_EVS_PANIC_DELAY 500 /**< \brief Task delay before PSP panic */ -/* -** Local function prototypes. -*/ -void CFE_EVS_ProcessGroundCommand(CFE_SB_Buffer_t *SBBufPtr, CFE_SB_MsgId_t MsgId); -bool CFE_EVS_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength); - /* Function Definitions */ /*---------------------------------------------------------------- diff --git a/modules/evs/ut-coverage/evs_UT.c b/modules/evs/ut-coverage/evs_UT.c index 2d0a5bc50..f100b8f1b 100644 --- a/modules/evs/ut-coverage/evs_UT.c +++ b/modules/evs/ut-coverage/evs_UT.c @@ -291,7 +291,6 @@ void Test_Init(void) { CFE_EVS_EnablePortsCmd_t bitmaskcmd; CFE_EVS_EnableAppEventTypeCmd_t appbitcmd; - CFE_SB_MsgId_t msgid = CFE_SB_INVALID_MSG_ID; UtPrintf("Begin Test Init"); @@ -321,7 +320,7 @@ void Test_Init(void) UT_InitData_EVS(); /* Set unexpected message ID */ - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &msgid, sizeof(msgid), false); + UT_SetupBasicMsgDispatch(&UT_TPID_CFE_EVS_INVALID_MID, 0, true); UT_EVS_DoGenericCheckEvents(CFE_EVS_TaskMain, &UT_EVS_EventBuf); CFE_UtAssert_SYSLOG(EVS_SYSLOG_MSGS[8]); diff --git a/modules/tbl/eds/cfe_tbl.xml b/modules/tbl/eds/cfe_tbl.xml index 51c86b47d..1024f7e0c 100644 --- a/modules/tbl/eds/cfe_tbl.xml +++ b/modules/tbl/eds/cfe_tbl.xml @@ -40,16 +40,6 @@ - - - - - - - - - -