diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b2d4b2..21e6005 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,8 @@ pre_project_config() # Project Name project(fsfw_example ASM C CXX) + + ################################################################################ # Pre-Sources preparation ################################################################################ @@ -64,7 +66,16 @@ pre_source_hw_os_config() set(COMMON_CONFIG_PATH "${COMMON_PATH}/config") set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig") -set(FSFW_ADDITIONAL_INC_PATH ${COMMON_CONFIG_PATH}) +set(FSFW_ADDITIONAL_INC_PATHS + "${COMMON_CONFIG_PATH}" + "${CMAKE_CURRENT_BINARY_DIR}" + CACHE STRING + "FSFW configuration paths" +) + +configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h) +configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h) +configure_file(${FSFW_CONFIG_PATH}/OBSWConfig.h.in OBSWConfig.h) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(WARNING_FLAGS @@ -127,6 +138,7 @@ target_link_libraries(${TARGET_NAME} PRIVATE # Add include paths for all sources. target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} ${FSFW_CONFIG_PATH} ) diff --git a/bsp_hosted/fsfwconfig/FSFWConfig.h b/bsp_hosted/fsfwconfig/FSFWConfig.h.in similarity index 100% rename from bsp_hosted/fsfwconfig/FSFWConfig.h rename to bsp_hosted/fsfwconfig/FSFWConfig.h.in diff --git a/bsp_hosted/fsfwconfig/OBSWConfig.h b/bsp_hosted/fsfwconfig/OBSWConfig.h.in similarity index 100% rename from bsp_hosted/fsfwconfig/OBSWConfig.h rename to bsp_hosted/fsfwconfig/OBSWConfig.h.in diff --git a/bsp_linux/core/ObjectFactory.cpp b/bsp_linux/core/ObjectFactory.cpp index be8514b..0866c28 100644 --- a/bsp_linux/core/ObjectFactory.cpp +++ b/bsp_linux/core/ObjectFactory.cpp @@ -1,8 +1,7 @@ -#include +#include "OBSWConfig.h" #include #include -#include #include #include diff --git a/bsp_linux/fsfwconfig/FSFWConfig.h b/bsp_linux/fsfwconfig/FSFWConfig.h.in similarity index 100% rename from bsp_linux/fsfwconfig/FSFWConfig.h rename to bsp_linux/fsfwconfig/FSFWConfig.h.in diff --git a/bsp_linux/fsfwconfig/OBSWConfig.h b/bsp_linux/fsfwconfig/OBSWConfig.h.in similarity index 100% rename from bsp_linux/fsfwconfig/OBSWConfig.h rename to bsp_linux/fsfwconfig/OBSWConfig.h.in diff --git a/bsp_stm32_freertos/fsfwconfig/FSFWConfig.h b/bsp_stm32_freertos/fsfwconfig/FSFWConfig.h.in similarity index 100% rename from bsp_stm32_freertos/fsfwconfig/FSFWConfig.h rename to bsp_stm32_freertos/fsfwconfig/FSFWConfig.h.in diff --git a/bsp_stm32_freertos/fsfwconfig/OBSWConfig.h b/bsp_stm32_freertos/fsfwconfig/OBSWConfig.h.in similarity index 100% rename from bsp_stm32_freertos/fsfwconfig/OBSWConfig.h rename to bsp_stm32_freertos/fsfwconfig/OBSWConfig.h.in diff --git a/bsp_stm32_freertos/fsfwconfig/returnvalues/classIds.h b/bsp_stm32_freertos/fsfwconfig/returnvalues/classIds.h index 47cc10a..1077163 100644 --- a/bsp_stm32_freertos/fsfwconfig/returnvalues/classIds.h +++ b/bsp_stm32_freertos/fsfwconfig/returnvalues/classIds.h @@ -1,7 +1,7 @@ #ifndef FSFWCONFIG_RETURNVALUES_CLASSIDS_H_ #define FSFWCONFIG_RETURNVALUES_CLASSIDS_H_ -#include +#include "commonConfig.h" namespace CLASS_ID { enum classIds: uint8_t { diff --git a/bsp_stm32_rtems/fsfwconfig/FSFWConfig.h b/bsp_stm32_rtems/fsfwconfig/FSFWConfig.h.in similarity index 100% rename from bsp_stm32_rtems/fsfwconfig/FSFWConfig.h rename to bsp_stm32_rtems/fsfwconfig/FSFWConfig.h.in diff --git a/bsp_stm32_rtems/fsfwconfig/OBSWConfig.h b/bsp_stm32_rtems/fsfwconfig/OBSWConfig.h.in similarity index 100% rename from bsp_stm32_rtems/fsfwconfig/OBSWConfig.h rename to bsp_stm32_rtems/fsfwconfig/OBSWConfig.h.in diff --git a/common/config/commonConfig.h b/common/config/commonConfig.h.in similarity index 100% rename from common/config/commonConfig.h rename to common/config/commonConfig.h.in diff --git a/common/stm32_nucleo/STM32TestTask.cpp b/common/stm32_nucleo/STM32TestTask.cpp index 9d70e3c..3d5f22b 100644 --- a/common/stm32_nucleo/STM32TestTask.cpp +++ b/common/stm32_nucleo/STM32TestTask.cpp @@ -17,3 +17,7 @@ ReturnValue_t STM32TestTask::performPeriodicAction() { } return TestTask::performPeriodicAction(); } + +ReturnValue_t STM32TestTask::performOneShotAction() { + return HasReturnvaluesIF::RETURN_OK; +} diff --git a/common/stm32_nucleo/STM32TestTask.h b/common/stm32_nucleo/STM32TestTask.h index 260170d..4f4a1b9 100644 --- a/common/stm32_nucleo/STM32TestTask.h +++ b/common/stm32_nucleo/STM32TestTask.h @@ -8,6 +8,8 @@ public: STM32TestTask(object_id_t objectId, bool enablePrintout, bool blinkyLed = true); ReturnValue_t performPeriodicAction() override; + ReturnValue_t performOneShotAction() override; + private: bool blinkyLed = false; diff --git a/fsfw b/fsfw index 54e60f4..ad820fb 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 54e60f4ddc88a8e108588c5a8b69ae744686a295 +Subproject commit ad820fbe99d2fa0fb49eb71ed70611bfea7efa99