using configuration files now

This commit is contained in:
Robin Müller 2021-06-08 17:04:28 +02:00 committed by Robin Mueller
parent 6b7356611d
commit ab8aaba0f4
11 changed files with 19 additions and 11 deletions

View File

@ -54,6 +54,7 @@ set(MISSION_PATH mission)
set(TEST_PATH test/testtasks) set(TEST_PATH test/testtasks)
set(LINUX_PATH linux) set(LINUX_PATH linux)
set(COMMON_PATH common) set(COMMON_PATH common)
set(COMMON_CONFIG_PATH ${COMMON_PATH}/config)
set(FSFW_HAL_LIB_PATH fsfw_hal) set(FSFW_HAL_LIB_PATH fsfw_hal)
set(CSP_LIB_PATH ${THIRD_PARTY_FOLDER}/libcsp) set(CSP_LIB_PATH ${THIRD_PARTY_FOLDER}/libcsp)
@ -95,8 +96,21 @@ else()
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig") set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
endif() endif()
# Configuration files
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(${TGT_BSP} MATCHES "arm/q7s")
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
elseif(${TGT_BSP} MATCHES "arm/raspberrypi")
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
endif()
# Set common config path for FSFW # Set common config path for FSFW
set(FSFW_ADDITIONAL_INC_PATHS "${COMMON_PATH}/config") set(FSFW_ADDITIONAL_INC_PATHS
"${COMMON_PATH}/config"
${CMAKE_CURRENT_BINARY_DIR}
)
# Set for lwgps library # Set for lwgps library
set(LWGPS_CONFIG_PATH "${COMMON_PATH}/config") set(LWGPS_CONFIG_PATH "${COMMON_PATH}/config")
@ -157,6 +171,7 @@ endif()
target_include_directories(${TARGET_NAME} PRIVATE target_include_directories(${TARGET_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${FSFW_CONFIG_PATH} ${FSFW_CONFIG_PATH}
${CMAKE_CURRENT_BINARY_DIR}
) )

View File

@ -5,6 +5,3 @@ target_sources(${TARGET_NAME} PRIVATE
target_include_directories(${TARGET_NAME} PUBLIC target_include_directories(${TARGET_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )

View File

@ -5,6 +5,3 @@ target_sources(${TARGET_NAME} PRIVATE
target_include_directories(${TARGET_NAME} PUBLIC target_include_directories(${TARGET_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )

View File

@ -7,9 +7,9 @@
#define FSFWCONFIG_OBSWCONFIG_H_ #define FSFWCONFIG_OBSWCONFIG_H_
#ifdef RASPBERRY_PI #ifdef RASPBERRY_PI
#include <rpi_config.h> #include "rpiConfig.h"
#elif defined(XIPHOS_Q7S) #elif defined(XIPHOS_Q7S)
#include <q7s_config.h> #include "q7sConfig.h"
#endif #endif
#include "commonConfig.h" #include "commonConfig.h"
#include "OBSWVersion.h" #include "OBSWVersion.h"

View File

@ -1,7 +1,6 @@
#include "GPIORPi.h" #include "GPIORPi.h"
#include <FSFWConfig.h>
#include <fsfw/serviceinterface/ServiceInterface.h> #include <fsfw/serviceinterface/ServiceInterface.h>
#include <linux/fsfwconfig/FSFWConfig.h.in>
#include <linux/gpio/GpioCookie.h> #include <linux/gpio/GpioCookie.h>
ReturnValue_t gpio::createRpiGpioConfig(GpioCookie* cookie, gpioId_t gpioId, int bcmPin, ReturnValue_t gpio::createRpiGpioConfig(GpioCookie* cookie, gpioId_t gpioId, int bcmPin,