using cmake configure file now

This commit is contained in:
Robin Müller 2021-05-31 17:01:11 +02:00
parent 82b752807f
commit d165c7533a
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
15 changed files with 22 additions and 5 deletions

View File

@ -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}
)

View File

@ -1,8 +1,7 @@
#include <OBSWConfig.h>
#include "OBSWConfig.h"
#include <bsp_linux/core/ObjectFactory.h>
#include <bsp_linux/fsfwconfig/objects/systemObjectList.h>
#include <bsp_linux/fsfwconfig/OBSWConfig.h>
#include <bsp_linux/fsfwconfig/tmtc/apid.h>
#include <bsp_linux/fsfwconfig/tmtc/pusIds.h>

View File

@ -1,7 +1,7 @@
#ifndef FSFWCONFIG_RETURNVALUES_CLASSIDS_H_
#define FSFWCONFIG_RETURNVALUES_CLASSIDS_H_
#include <commonConfig.h>
#include "commonConfig.h"
namespace CLASS_ID {
enum classIds: uint8_t {

View File

@ -17,3 +17,7 @@ ReturnValue_t STM32TestTask::performPeriodicAction() {
}
return TestTask::performPeriodicAction();
}
ReturnValue_t STM32TestTask::performOneShotAction() {
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -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;

2
fsfw

@ -1 +1 @@
Subproject commit 54e60f4ddc88a8e108588c5a8b69ae744686a295
Subproject commit ad820fbe99d2fa0fb49eb71ed70611bfea7efa99