upstream stuff
This commit is contained in:
parent
c603bcc91c
commit
e052a9694f
114
CMakeLists.txt
114
CMakeLists.txt
@ -3,30 +3,42 @@ cmake_minimum_required(VERSION 3.13)
|
|||||||
set(LIB_FSFW_NAME fsfw)
|
set(LIB_FSFW_NAME fsfw)
|
||||||
add_library(${LIB_FSFW_NAME})
|
add_library(${LIB_FSFW_NAME})
|
||||||
|
|
||||||
# Set options for FSFW OSAL selection.
|
|
||||||
if(UNIX)
|
|
||||||
set(OS_FSFW "linux" CACHE STRING "OS abstraction layer used in the FSFW")
|
|
||||||
elseif(WIN32)
|
|
||||||
set(OS_FSFW "host" CACHE STRING "OS abstraction layer used in the FSFW")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_property(CACHE OS_FSFW PROPERTY STRINGS host linux rtems freertos)
|
set_property(CACHE OS_FSFW PROPERTY STRINGS host linux rtems freertos)
|
||||||
|
|
||||||
if(${OS_FSFW} STREQUAL host)
|
if(NOT OS_FSFW)
|
||||||
set(OS_FSFW_NAME "Host")
|
message(STATUS "No OS for FSFW via OS_FSFW set. Assuming host OS")
|
||||||
elseif(${OS_FSFW} STREQUAL linux)
|
# Assume host OS and autodetermine from OS_FSFW
|
||||||
set(OS_FSFW_NAME "Linux")
|
if(UNIX)
|
||||||
elseif(${OS_FSFW} STREQUAL freertos)
|
set(OS_FSFW "linux"
|
||||||
set(OS_FSFW_NAME "FreeRTOS")
|
CACHE STRING
|
||||||
elseif(${OS_FSFW} STREQUAL rtems)
|
"OS abstraction layer used in the FSFW"
|
||||||
set(OS_FSFW_NAME "RTEMS")
|
)
|
||||||
else()
|
elseif(WIN32)
|
||||||
message(WARNING "Invalid operating system for FSFW specified! Setting to host..")
|
set(OS_FSFW "host"
|
||||||
set(OS_FSFW_NAME "Host")
|
CACHE STRING "OS abstraction layer used in the FSFW"
|
||||||
set(OS_FSFW "host")
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "Compiling FSFW for the ${OS_FSFW_NAME} operating system")
|
if(${OS_FSFW} STREQUAL host)
|
||||||
|
set(OS_FSFW_NAME "Host")
|
||||||
|
elseif(${OS_FSFW} STREQUAL linux)
|
||||||
|
set(OS_FSFW_NAME "Linux")
|
||||||
|
elseif(${OS_FSFW} STREQUAL freertos)
|
||||||
|
set(OS_FSFW_NAME "FreeRTOS")
|
||||||
|
target_link_libraries(${LIB_FSFW_NAME} ${LIB_OS_NAME})
|
||||||
|
elseif(${OS_FSFW} STREQUAL rtems)
|
||||||
|
set(OS_FSFW_NAME "RTEMS")
|
||||||
|
else()
|
||||||
|
message(WARNING
|
||||||
|
"Invalid operating system for FSFW specified! Setting to host.."
|
||||||
|
)
|
||||||
|
set(OS_FSFW_NAME "Host")
|
||||||
|
set(OS_FSFW "host")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "Compiling FSFW for the ${OS_FSFW_NAME} operating system.")
|
||||||
|
|
||||||
# Options to exclude parts of the FSFW from compilation.
|
# Options to exclude parts of the FSFW from compilation.
|
||||||
option(FSFW_USE_RMAP "Compile with RMAP" ON)
|
option(FSFW_USE_RMAP "Compile with RMAP" ON)
|
||||||
@ -36,8 +48,14 @@ add_subdirectory(action)
|
|||||||
add_subdirectory(container)
|
add_subdirectory(container)
|
||||||
add_subdirectory(controller)
|
add_subdirectory(controller)
|
||||||
add_subdirectory(coordinates)
|
add_subdirectory(coordinates)
|
||||||
add_subdirectory(datalinklayer)
|
|
||||||
|
if(FSFW_USE_DATALINKLAYER)
|
||||||
|
add_subdirectory(datalinklayer)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(datapool)
|
add_subdirectory(datapool)
|
||||||
|
add_subdirectory(datapoollocal)
|
||||||
|
add_subdirectory(housekeeping)
|
||||||
add_subdirectory(devicehandlers)
|
add_subdirectory(devicehandlers)
|
||||||
add_subdirectory(events)
|
add_subdirectory(events)
|
||||||
add_subdirectory(fdir)
|
add_subdirectory(fdir)
|
||||||
@ -55,7 +73,7 @@ add_subdirectory(power)
|
|||||||
add_subdirectory(pus)
|
add_subdirectory(pus)
|
||||||
|
|
||||||
if(FSFW_USE_RMAP)
|
if(FSFW_USE_RMAP)
|
||||||
add_subdirectory(rmap)
|
add_subdirectory(rmap)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(serialize)
|
add_subdirectory(serialize)
|
||||||
@ -73,13 +91,53 @@ add_subdirectory(tmtcservices)
|
|||||||
# The project CMakeLists file has to set the FSFW_CONFIG_PATH and add it.
|
# The project CMakeLists file has to set the FSFW_CONFIG_PATH and add it.
|
||||||
# If this is not given, we include the default configuration and emit a warning.
|
# If this is not given, we include the default configuration and emit a warning.
|
||||||
if(NOT FSFW_CONFIG_PATH)
|
if(NOT FSFW_CONFIG_PATH)
|
||||||
message(WARNING "Flight Software Framework configuration path not set!")
|
message(WARNING "Flight Software Framework configuration path not set!")
|
||||||
message(WARNING "Setting default configuration!")
|
message(WARNING "Setting default configuration!")
|
||||||
add_subdirectory(defaultcfg/fsfwconfig)
|
add_subdirectory(defaultcfg/fsfwconfig)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# FSFW might be part of a possibly complicated folder structure, so we
|
||||||
|
# extract the absolute path of the fsfwconfig folder.
|
||||||
|
if(IS_ABSOLUTE ${FSFW_CONFIG_PATH})
|
||||||
|
set(FSFW_CONFIG_PATH_ABSOLUTE ${FSFW_CONFIG_PATH})
|
||||||
|
else()
|
||||||
|
get_filename_component(FSFW_CONFIG_PATH_ABSOLUTE
|
||||||
|
${FSFW_CONFIG_PATH} REALPATH BASE_DIR ${CMAKE_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
set(WARNING_FLAGS
|
||||||
|
-Wall
|
||||||
|
-Wextra
|
||||||
|
-Wshadow=local
|
||||||
|
-Wimplicit-fallthrough=1
|
||||||
|
-Wno-unused-parameter
|
||||||
|
-Wno-psabi
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
|
set(COMPILER_FLAGS "/permissive-")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Required include paths to compile the FSFW
|
# Required include paths to compile the FSFW
|
||||||
target_include_directories(${LIB_FSFW_NAME}
|
target_include_directories(${LIB_FSFW_NAME} INTERFACE
|
||||||
INTERFACE
|
${CMAKE_SOURCE_DIR}
|
||||||
${FSFW_CONFIG_PATH}
|
${FSFW_CONFIG_PATH_ABSOLUTE}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Includes path required to compile FSFW itself as well
|
||||||
|
# We assume that the fsfwconfig folder uses include relative to the project
|
||||||
|
# root here!
|
||||||
|
target_include_directories(${LIB_FSFW_NAME} PRIVATE
|
||||||
|
${CMAKE_SOURCE_DIR}
|
||||||
|
${FSFW_CONFIG_PATH_ABSOLUTE}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Machine specific options can be set with the ABI_FLAGS variable.
|
||||||
|
target_compile_options(${LIB_FSFW_NAME} PRIVATE
|
||||||
|
${WARNING_FLAGS}
|
||||||
|
${COMPILER_FLAGS}
|
||||||
|
${ABI_FLAGS}
|
||||||
)
|
)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
target_sources(${LIB_FSFW_NAME}
|
target_sources(${LIB_FSFW_NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Event.cpp
|
|
||||||
EventManager.cpp
|
EventManager.cpp
|
||||||
EventMessage.cpp
|
EventMessage.cpp
|
||||||
)
|
)
|
||||||
|
6
fdir/CMakeLists.txt
Normal file
6
fdir/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
target_sources(${LIB_FSFW_NAME}
|
||||||
|
PRIVATE
|
||||||
|
EventCorrelation.cpp
|
||||||
|
FailureIsolationBase.cpp
|
||||||
|
FaultCounter.cpp
|
||||||
|
)
|
6
health/CMakeLists.txt
Normal file
6
health/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
target_sources(${LIB_FSFW_NAME}
|
||||||
|
PRIVATE
|
||||||
|
HealthHelper.cpp
|
||||||
|
HealthMessage.cpp
|
||||||
|
HealthTable.cpp
|
||||||
|
)
|
5
housekeeping/CMakeLists.txt
Normal file
5
housekeeping/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
target_sources(${LIB_FSFW_NAME}
|
||||||
|
PRIVATE
|
||||||
|
HousekeepingMessage.cpp
|
||||||
|
PeriodicHousekeepingHelper.cpp
|
||||||
|
)
|
4
internalError/CMakeLists.txt
Normal file
4
internalError/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
target_sources(${LIB_FSFW_NAME}
|
||||||
|
PRIVATE
|
||||||
|
InternalErrorReporter.cpp
|
||||||
|
)
|
@ -5,8 +5,7 @@
|
|||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||||
|
|
||||||
InternalErrorReporter::InternalErrorReporter(object_id_t setObjectId,
|
InternalErrorReporter::InternalErrorReporter(object_id_t setObjectId,
|
||||||
uint32_t messageQueueDepth) :
|
uint32_t messageQueueDepth): SystemObject(setObjectId),
|
||||||
SystemObject(setObjectId),
|
|
||||||
commandQueue(QueueFactory::instance()->
|
commandQueue(QueueFactory::instance()->
|
||||||
createMessageQueue(messageQueueDepth)),
|
createMessageQueue(messageQueueDepth)),
|
||||||
poolManager(this, commandQueue),
|
poolManager(this, commandQueue),
|
||||||
|
5
memory/CMakeLists.txt
Normal file
5
memory/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
target_sources(${LIB_FSFW_NAME}
|
||||||
|
PRIVATE
|
||||||
|
MemoryHelper.cpp
|
||||||
|
MemoryMessage.cpp
|
||||||
|
)
|
5
modes/CMakeLists.txt
Normal file
5
modes/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
target_sources(${LIB_FSFW_NAME}
|
||||||
|
PRIVATE
|
||||||
|
ModeHelper.cpp
|
||||||
|
ModeMessage.cpp
|
||||||
|
)
|
5
monitoring/CMakeLists.txt
Normal file
5
monitoring/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
target_sources(${LIB_FSFW_NAME}
|
||||||
|
PRIVATE
|
||||||
|
LimitViolationReporter.cpp
|
||||||
|
MonitoringMessage.cpp
|
||||||
|
)
|
5
objectmanager/CMakeLists.txt
Normal file
5
objectmanager/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
target_sources(${LIB_FSFW_NAME}
|
||||||
|
PRIVATE
|
||||||
|
ObjectManager.cpp
|
||||||
|
SystemObject.cpp
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user