apply new auto-formatter on all files #254
558
CMakeLists.txt
558
CMakeLists.txt
@ -1,12 +1,12 @@
|
|||||||
################################################################################
|
# ##############################################################################
|
||||||
# CMake support for the EIVE OBSW
|
# CMake support for the EIVE OBSW
|
||||||
#
|
#
|
||||||
# Author: R. Mueller
|
# Author: R. Mueller
|
||||||
################################################################################
|
# ##############################################################################
|
||||||
|
|
||||||
################################################################################
|
# ##############################################################################
|
||||||
# Pre-Project preparation
|
# Pre-Project preparation
|
||||||
################################################################################
|
# ##############################################################################
|
||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
set(OBSW_VERSION_MAJOR_IF_GIT_FAILS 0)
|
set(OBSW_VERSION_MAJOR_IF_GIT_FAILS 0)
|
||||||
@ -15,28 +15,36 @@ set(OBSW_VERSION_REVISION_IF_GIT_FAILS 0)
|
|||||||
|
|
||||||
# set(CMAKE_VERBOSE TRUE)
|
# set(CMAKE_VERBOSE TRUE)
|
||||||
|
|
||||||
option(EIVE_HARDCODED_TOOLCHAIN_FILE "\
|
option(
|
||||||
|
EIVE_HARDCODED_TOOLCHAIN_FILE
|
||||||
|
"\
|
||||||
For Linux Board Target BSPs, a default toolchain file will be set. Should be set to OFF \
|
For Linux Board Target BSPs, a default toolchain file will be set. Should be set to OFF \
|
||||||
if a different toolchain file is set externally" ON
|
if a different toolchain file is set externally"
|
||||||
)
|
ON)
|
||||||
|
|
||||||
if(NOT FSFW_OSAL)
|
if(NOT FSFW_OSAL)
|
||||||
set(FSFW_OSAL linux CACHE STRING "OS for the FSFW.")
|
set(FSFW_OSAL
|
||||||
|
linux
|
||||||
|
CACHE STRING "OS for the FSFW.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TGT_BSP)
|
if(TGT_BSP)
|
||||||
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
|
if(TGT_BSP MATCHES "arm/q7s"
|
||||||
option(LINUX_CROSS_COMPILE ON)
|
OR TGT_BSP MATCHES "arm/raspberrypi"
|
||||||
endif()
|
OR TGT_BSP MATCHES "arm/beagleboneblack")
|
||||||
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
|
option(LINUX_CROSS_COMPILE ON)
|
||||||
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" OFF)
|
endif()
|
||||||
elseif(TGT_BSP MATCHES "arm/q7s")
|
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
|
||||||
option(EIVE_Q7S_EM "Build configuration for the EM" OFF)
|
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" OFF)
|
||||||
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" ON)
|
elseif(TGT_BSP MATCHES "arm/q7s")
|
||||||
endif()
|
option(EIVE_Q7S_EM "Build configuration for the EM" OFF)
|
||||||
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name" ON)
|
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" ON)
|
||||||
|
endif()
|
||||||
|
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name"
|
||||||
|
ON)
|
||||||
else()
|
else()
|
||||||
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name" OFF)
|
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name"
|
||||||
|
OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||||
@ -57,60 +65,96 @@ option(EIVE_ADD_ETL_LIB "Add ETL library" ON)
|
|||||||
option(EIVE_ADD_JSON_LIB "Add JSON library" ON)
|
option(EIVE_ADD_JSON_LIB "Add JSON library" ON)
|
||||||
|
|
||||||
if(EIVE_Q7S_EM)
|
if(EIVE_Q7S_EM)
|
||||||
set(OBSW_Q7S_EM 1 CACHE STRING "Q7S EM configuration")
|
set(OBSW_Q7S_EM
|
||||||
set(INIT_VAL 0)
|
1
|
||||||
|
CACHE STRING "Q7S EM configuration")
|
||||||
|
set(INIT_VAL 0)
|
||||||
else()
|
else()
|
||||||
set(OBSW_Q7S_EM 0 CACHE STRING "Q7S EM configuration")
|
set(OBSW_Q7S_EM
|
||||||
set(INIT_VAL 1)
|
0
|
||||||
|
CACHE STRING "Q7S EM configuration")
|
||||||
|
set(INIT_VAL 1)
|
||||||
endif()
|
endif()
|
||||||
set(OBSW_ADD_MGT ${INIT_VAL} CACHE STRING "Add MGT module" )
|
set(OBSW_ADD_MGT
|
||||||
set(OBSW_ADD_BPX_BATTERY_HANDLER ${INIT_VAL} CACHE STRING "Add MGT module")
|
${INIT_VAL}
|
||||||
set(OBSW_ADD_STAR_TRACKER ${INIT_VAL} CACHE STRING "Add Startracker module")
|
CACHE STRING "Add MGT module")
|
||||||
set(OBSW_ADD_SUN_SENSORS ${INIT_VAL} CACHE STRING "Add sun sensor module")
|
set(OBSW_ADD_BPX_BATTERY_HANDLER
|
||||||
set(OBSW_ADD_SUS_BOARD_ASS ${INIT_VAL} CACHE STRING "Add sun sensor board assembly")
|
${INIT_VAL}
|
||||||
set(OBSW_ADD_ACS_BOARD ${INIT_VAL} CACHE STRING "Add ACS board module")
|
CACHE STRING "Add MGT module")
|
||||||
set(OBSW_ADD_ACS_HANDLERS ${INIT_VAL} CACHE STRING "Add ACS handlers")
|
set(OBSW_ADD_STAR_TRACKER
|
||||||
set(OBSW_ADD_RTD_DEVICES ${INIT_VAL} CACHE STRING "Add RTD devices")
|
${INIT_VAL}
|
||||||
set(OBSW_ADD_RAD_SENSORS ${INIT_VAL} CACHE STRING "Add Rad Sensor module")
|
CACHE STRING "Add Startracker module")
|
||||||
set(OBSW_ADD_PL_PCDU ${INIT_VAL} CACHE STRING "Add Payload PCDU modukle")
|
set(OBSW_ADD_SUN_SENSORS
|
||||||
set(OBSW_ADD_SYRLINKS ${INIT_VAL} CACHE STRING "Add Syrlinks module")
|
${INIT_VAL}
|
||||||
set(OBSW_ADD_TMP_DEVICES ${INIT_VAL} CACHE STRING "Add TMP devices")
|
CACHE STRING "Add sun sensor module")
|
||||||
set(OBSW_ADD_GOMSPACE_PCDU ${INIT_VAL} CACHE STRING "Add GomSpace PCDU modules")
|
set(OBSW_ADD_SUS_BOARD_ASS
|
||||||
set(OBSW_ADD_RW ${INIT_VAL} CACHE STRING "Add RW modules")
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add sun sensor board assembly")
|
||||||
|
set(OBSW_ADD_ACS_BOARD
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add ACS board module")
|
||||||
|
set(OBSW_ADD_ACS_HANDLERS
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add ACS handlers")
|
||||||
|
set(OBSW_ADD_RTD_DEVICES
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add RTD devices")
|
||||||
|
set(OBSW_ADD_RAD_SENSORS
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add Rad Sensor module")
|
||||||
|
set(OBSW_ADD_PL_PCDU
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add Payload PCDU modukle")
|
||||||
|
set(OBSW_ADD_SYRLINKS
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add Syrlinks module")
|
||||||
|
set(OBSW_ADD_TMP_DEVICES
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add TMP devices")
|
||||||
|
set(OBSW_ADD_GOMSPACE_PCDU
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add GomSpace PCDU modules")
|
||||||
|
set(OBSW_ADD_RW
|
||||||
|
${INIT_VAL}
|
||||||
|
CACHE STRING "Add RW modules")
|
||||||
|
|
||||||
################################################################################
|
# ##############################################################################
|
||||||
# Pre-Sources preparation
|
# Pre-Sources preparation
|
||||||
################################################################################
|
# ##############################################################################
|
||||||
|
|
||||||
# Version handling
|
# Version handling
|
||||||
set(GIT_VER_HANDLING_OK FALSE)
|
set(GIT_VER_HANDLING_OK FALSE)
|
||||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
|
||||||
determine_version_with_git("--exclude" "docker_*")
|
determine_version_with_git("--exclude" "docker_*")
|
||||||
set(GIT_INFO ${GIT_INFO} CACHE STRING "Version information retrieved with git describe")
|
set(GIT_INFO
|
||||||
if(GIT_INFO)
|
${GIT_INFO}
|
||||||
set(GIT_INFO ${GIT_INFO} CACHE STRING "Version information retrieved with git describe")
|
CACHE STRING "Version information retrieved with git describe")
|
||||||
list(GET GIT_INFO 1 OBSW_VERSION_MAJOR)
|
if(GIT_INFO)
|
||||||
list(GET GIT_INFO 2 OBSW_VERSION_MINOR)
|
set(GIT_INFO
|
||||||
list(GET GIT_INFO 3 OBSW_VERSION_REVISION)
|
${GIT_INFO}
|
||||||
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
|
CACHE STRING "Version information retrieved with git describe")
|
||||||
if(NOT OBSW_VERSION_MAJOR)
|
list(GET GIT_INFO 1 OBSW_VERSION_MAJOR)
|
||||||
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
|
list(GET GIT_INFO 2 OBSW_VERSION_MINOR)
|
||||||
endif()
|
list(GET GIT_INFO 3 OBSW_VERSION_REVISION)
|
||||||
if(NOT OBSW_VERSION_MINOR)
|
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
|
||||||
set(FSFW_SUBVERSION ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
|
if(NOT OBSW_VERSION_MAJOR)
|
||||||
endif()
|
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
|
||||||
if(NOT OBSW_VERSION_REVISION)
|
endif()
|
||||||
set(FSFW_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
|
if(NOT OBSW_VERSION_MINOR)
|
||||||
endif()
|
set(FSFW_SUBVERSION ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
|
||||||
set(GIT_VER_HANDLING_OK TRUE)
|
endif()
|
||||||
else()
|
if(NOT OBSW_VERSION_REVISION)
|
||||||
set(GIT_VER_HANDLING_OK FALSE)
|
set(FSFW_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
|
||||||
endif()
|
endif()
|
||||||
|
set(GIT_VER_HANDLING_OK TRUE)
|
||||||
|
else()
|
||||||
|
set(GIT_VER_HANDLING_OK FALSE)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(NOT GIT_VER_HANDLING_OK)
|
if(NOT GIT_VER_HANDLING_OK)
|
||||||
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
|
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})
|
||||||
set(OBSW_VERSION_MINOR ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
|
set(OBSW_VERSION_MINOR ${OBSW_VERSION_MINOR_IF_GIT_FAILS})
|
||||||
set(OBSW_VERSION_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
|
set(OBSW_VERSION_REVISION ${OBSW_VERSION_REVISION_IF_GIT_FAILS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Set names and variables
|
# Set names and variables
|
||||||
@ -156,119 +200,113 @@ set(EIVE_ADD_LINUX_FILES False)
|
|||||||
pre_source_hw_os_config()
|
pre_source_hw_os_config()
|
||||||
|
|
||||||
if(TGT_BSP)
|
if(TGT_BSP)
|
||||||
|
set(LIBGPS_VERSION_MAJOR 3)
|
||||||
|
# I assume a newer version than 3.17 will be installed on other Linux board
|
||||||
|
# than the Q7S
|
||||||
|
set(LIBGPS_VERSION_MINOR 20)
|
||||||
|
if(TGT_BSP MATCHES "arm/q7s"
|
||||||
|
OR TGT_BSP MATCHES "arm/raspberrypi"
|
||||||
|
OR TGT_BSP MATCHES "arm/beagleboneblack"
|
||||||
|
OR TGT_BSP MATCHES "arm/egse"
|
||||||
|
OR TGT_BSP MATCHES "arm/te0720-1cfa")
|
||||||
|
find_library(${LIB_GPS} gps)
|
||||||
|
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
|
||||||
|
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
||||||
|
set(EIVE_ADD_LINUX_FILES TRUE)
|
||||||
|
set(ADD_CSP_LIB TRUE)
|
||||||
|
set(FSFW_HAL_ADD_LINUX ON)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(TGT_BSP MATCHES "arm/raspberrypi")
|
||||||
|
# Used by configure file
|
||||||
|
set(RASPBERRY_PI ON)
|
||||||
|
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(TGT_BSP MATCHES "arm/egse")
|
||||||
|
# Used by configure file
|
||||||
|
set(EGSE ON)
|
||||||
|
set(FSFW_HAL_LINUX_ADD_LIBGPIOD OFF)
|
||||||
|
set(OBSW_ADD_STAR_TRACKER 1)
|
||||||
|
set(OBSW_DEBUG_STARTRACKER 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(TGT_BSP MATCHES "arm/beagleboneblack")
|
||||||
|
# Used by configure file
|
||||||
|
set(BEAGLEBONEBLACK ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(TGT_BSP MATCHES "arm/q7s")
|
||||||
|
# Used by configure file
|
||||||
|
set(XIPHOS_Q7S ON)
|
||||||
set(LIBGPS_VERSION_MAJOR 3)
|
set(LIBGPS_VERSION_MAJOR 3)
|
||||||
# I assume a newer version than 3.17 will be installed on other Linux board than the Q7S
|
set(LIBGPS_VERSION_MINOR 17)
|
||||||
set(LIBGPS_VERSION_MINOR 20)
|
endif()
|
||||||
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/raspberrypi"
|
|
||||||
OR TGT_BSP MATCHES "arm/beagleboneblack" OR TGT_BSP MATCHES "arm/egse"
|
|
||||||
OR TGT_BSP MATCHES "arm/te0720-1cfa"
|
|
||||||
)
|
|
||||||
find_library(${LIB_GPS} gps)
|
|
||||||
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
|
|
||||||
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
|
||||||
set(EIVE_ADD_LINUX_FILES TRUE)
|
|
||||||
set(ADD_CSP_LIB TRUE)
|
|
||||||
set(FSFW_HAL_ADD_LINUX ON)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/raspberrypi" )
|
if(TGT_BSP MATCHES "arm/te0720-1cfa")
|
||||||
# Used by configure file
|
set(TE0720_1CFA ON)
|
||||||
set(RASPBERRY_PI ON)
|
endif()
|
||||||
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/egse")
|
|
||||||
# Used by configure file
|
|
||||||
set(EGSE ON)
|
|
||||||
set(FSFW_HAL_LINUX_ADD_LIBGPIOD OFF)
|
|
||||||
set(OBSW_ADD_STAR_TRACKER 1)
|
|
||||||
set(OBSW_DEBUG_STARTRACKER 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/beagleboneblack")
|
|
||||||
# Used by configure file
|
|
||||||
set(BEAGLEBONEBLACK ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/q7s")
|
|
||||||
# Used by configure file
|
|
||||||
set(XIPHOS_Q7S ON)
|
|
||||||
set(LIBGPS_VERSION_MAJOR 3)
|
|
||||||
set(LIBGPS_VERSION_MINOR 17)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/te0720-1cfa")
|
|
||||||
set(TE0720_1CFA ON)
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
# Required by FSFW library
|
# Required by FSFW library
|
||||||
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Configuration files
|
# Configuration files
|
||||||
configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h)
|
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}/FSFWConfig.h.in FSFWConfig.h)
|
||||||
configure_file(${BSP_PATH}/OBSWConfig.h.in OBSWConfig.h)
|
configure_file(${BSP_PATH}/OBSWConfig.h.in OBSWConfig.h)
|
||||||
if(TGT_BSP MATCHES "arm/q7s")
|
if(TGT_BSP MATCHES "arm/q7s")
|
||||||
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
|
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
|
||||||
elseif(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/egse")
|
elseif(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/egse")
|
||||||
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
|
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h)
|
configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h)
|
||||||
|
|
||||||
# Set common config path for FSFW
|
# Set common config path for FSFW
|
||||||
set(FSFW_ADDITIONAL_INC_PATHS
|
set(FSFW_ADDITIONAL_INC_PATHS "${COMMON_PATH}/config"
|
||||||
"${COMMON_PATH}/config"
|
${CMAKE_CURRENT_BINARY_DIR})
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
################################################################################
|
# ##############################################################################
|
||||||
# Executable and Sources
|
# Executable and Sources
|
||||||
################################################################################
|
# ##############################################################################
|
||||||
|
|
||||||
#global compiler options need to be set before adding executables
|
# global compiler options need to be set before adding executables
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
"-Wall"
|
"-Wall"
|
||||||
"-Wextra"
|
"-Wextra"
|
||||||
"-Wimplicit-fallthrough=1"
|
"-Wimplicit-fallthrough=1"
|
||||||
"-Wno-unused-parameter"
|
"-Wno-unused-parameter"
|
||||||
"-Wno-psabi"
|
"-Wno-psabi"
|
||||||
"-Wduplicated-cond" # check for duplicate conditions
|
"-Wduplicated-cond" # check for duplicate conditions
|
||||||
"-Wduplicated-branches" # check for duplicate branches
|
"-Wduplicated-branches" # check for duplicate branches
|
||||||
"-Wlogical-op" # Search for bitwise operations instead of logical
|
"-Wlogical-op" # Search for bitwise operations instead of logical
|
||||||
"-Wnull-dereference" # Search for NULL dereference
|
"-Wnull-dereference" # Search for NULL dereference
|
||||||
"-Wundef" # Warn if undefind marcos are used
|
"-Wundef" # Warn if undefind marcos are used
|
||||||
"-Wformat=2" # Format string problem detection
|
"-Wformat=2" # Format string problem detection
|
||||||
"-Wformat-overflow=2" # Formatting issues in printf
|
"-Wformat-overflow=2" # Formatting issues in printf
|
||||||
"-Wformat-truncation=2" # Formatting issues in printf
|
"-Wformat-truncation=2" # Formatting issues in printf
|
||||||
"-Wformat-security" # Search for dangerous printf operations
|
"-Wformat-security" # Search for dangerous printf operations
|
||||||
"-Wstrict-overflow=3" # Warn if integer overflows might happen
|
"-Wstrict-overflow=3" # Warn if integer overflows might happen
|
||||||
"-Warray-bounds=2" # Some array bounds violations will be found
|
"-Warray-bounds=2" # Some array bounds violations will be found
|
||||||
"-Wshift-overflow=2" # Search for bit left shift overflows (<c++14)
|
"-Wshift-overflow=2" # Search for bit left shift overflows (<c++14)
|
||||||
"-Wcast-qual" # Warn if the constness is cast away
|
"-Wcast-qual" # Warn if the constness is cast away
|
||||||
"-Wstringop-overflow=4"
|
"-Wstringop-overflow=4"
|
||||||
# -Wstack-protector # Emits a few false positives for low level access
|
# -Wstack-protector # Emits a few false positives for low level access
|
||||||
# -Wconversion # Creates many false positives
|
# -Wconversion # Creates many false positives -Warith-conversion # Use with
|
||||||
# -Warith-conversion # Use with Wconversion to find more implicit conversions
|
# Wconversion to find more implicit conversions -fanalyzer # Should be used
|
||||||
# -fanalyzer # Should be used to look through problems
|
# to look through problems
|
||||||
)
|
)
|
||||||
# Remove unused sections.
|
# Remove unused sections.
|
||||||
add_compile_options(
|
add_compile_options("-ffunction-sections" "-fdata-sections")
|
||||||
"-ffunction-sections"
|
|
||||||
"-fdata-sections"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Removed unused sections.
|
# Removed unused sections.
|
||||||
add_link_options(
|
add_link_options("-Wl,--gc-sections")
|
||||||
"-Wl,--gc-sections"
|
|
||||||
)
|
|
||||||
|
|
||||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
set(COMPILER_FLAGS "/permissive-")
|
set(COMPILER_FLAGS "/permissive-")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(${LIB_EIVE_MISSION})
|
add_library(${LIB_EIVE_MISSION})
|
||||||
@ -281,42 +319,39 @@ set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME})
|
|||||||
|
|
||||||
# Watchdog
|
# Watchdog
|
||||||
if(TGT_BSP MATCHES "arm/q7s")
|
if(TGT_BSP MATCHES "arm/q7s")
|
||||||
add_executable(${WATCHDOG_NAME})
|
add_executable(${WATCHDOG_NAME})
|
||||||
else()
|
else()
|
||||||
add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL)
|
add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(${WATCHDOG_PATH})
|
add_subdirectory(${WATCHDOG_PATH})
|
||||||
target_link_libraries(${WATCHDOG_NAME} PUBLIC
|
target_link_libraries(${WATCHDOG_NAME} PUBLIC ${LIB_CXX_FS})
|
||||||
${LIB_CXX_FS}
|
target_include_directories(${WATCHDOG_NAME} PUBLIC ${CMAKE_BINARY_DIR})
|
||||||
)
|
|
||||||
target_include_directories(${WATCHDOG_NAME} PUBLIC
|
|
||||||
${CMAKE_BINARY_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
# unittests
|
# unittests
|
||||||
if(NOT TGT_BSP)
|
if(NOT TGT_BSP)
|
||||||
add_executable(${UNITTEST_NAME})
|
add_executable(${UNITTEST_NAME})
|
||||||
else()
|
else()
|
||||||
add_executable(${UNITTEST_NAME} EXCLUDE_FROM_ALL)
|
add_executable(${UNITTEST_NAME} EXCLUDE_FROM_ALL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EIVE_ADD_ETL_LIB)
|
if(EIVE_ADD_ETL_LIB)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EIVE_ADD_JSON_LIB)
|
if(EIVE_ADD_JSON_LIB)
|
||||||
add_subdirectory(${LIB_JSON_PATH})
|
add_subdirectory(${LIB_JSON_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(thirdparty/rapidcsv)
|
add_subdirectory(thirdparty/rapidcsv)
|
||||||
|
|
||||||
if(EIVE_ADD_LINUX_FILES)
|
if(EIVE_ADD_LINUX_FILES)
|
||||||
add_subdirectory(${LIB_ARCSEC_PATH})
|
add_subdirectory(${LIB_ARCSEC_PATH})
|
||||||
add_subdirectory(${LINUX_PATH})
|
add_subdirectory(${LINUX_PATH})
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(${BSP_PATH})
|
add_subdirectory(${BSP_PATH})
|
||||||
if(ADD_CSP_LIB)
|
if(ADD_CSP_LIB)
|
||||||
add_subdirectory(${LIB_CSP_PATH})
|
add_subdirectory(${LIB_CSP_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(${COMMON_PATH})
|
add_subdirectory(${COMMON_PATH})
|
||||||
@ -328,175 +363,144 @@ add_subdirectory(${TEST_PATH})
|
|||||||
|
|
||||||
add_subdirectory(${UNITTEST_PATH})
|
add_subdirectory(${UNITTEST_PATH})
|
||||||
|
|
||||||
# This should have already been downloaded by the FSFW
|
# This should have already been downloaded by the FSFW Still include it to be
|
||||||
# Still include it to be safe
|
# safe
|
||||||
find_package(etl ${FSFW_ETL_LIB_MAJOR_VERSION} CONFIG QUIET)
|
find_package(etl ${FSFW_ETL_LIB_MAJOR_VERSION} CONFIG QUIET)
|
||||||
# Not installed, so use FetchContent to download and provide etl
|
# Not installed, so use FetchContent to download and provide etl
|
||||||
if(NOT etl_FOUND)
|
if(NOT etl_FOUND)
|
||||||
message(STATUS
|
message(
|
||||||
"No ETL installation was found with find_package. Installing and providing "
|
STATUS
|
||||||
"etl with FindPackage"
|
"No ETL installation was found with find_package. Installing and providing "
|
||||||
)
|
"etl with FindPackage")
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
etl
|
etl
|
||||||
GIT_REPOSITORY https://github.com/ETLCPP/etl
|
GIT_REPOSITORY https://github.com/ETLCPP/etl
|
||||||
GIT_TAG ${FSFW_ETL_LIB_VERSION}
|
GIT_TAG ${FSFW_ETL_LIB_VERSION})
|
||||||
)
|
list(APPEND FSFW_FETCH_CONTENT_TARGETS etl)
|
||||||
list(APPEND FSFW_FETCH_CONTENT_TARGETS etl)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Use same Catch2 version as framework
|
# Use same Catch2 version as framework
|
||||||
if (NOT(TGT_BSP MATCHES "arm/te0720-1cfa") AND NOT(TGT_BSP MATCHES "arm/q7s")
|
if(NOT (TGT_BSP MATCHES "arm/te0720-1cfa")
|
||||||
AND NOT (TGT_BSP MATCHES "arm/raspberrypi"))
|
AND NOT (TGT_BSP MATCHES "arm/q7s")
|
||||||
# Check whether the user has already installed Catch2 first
|
AND NOT (TGT_BSP MATCHES "arm/raspberrypi"))
|
||||||
find_package(Catch2 ${FSFW_CATCH2_LIB_MAJOR_VERSION} CONFIG QUIET)
|
# Check whether the user has already installed Catch2 first
|
||||||
# Not installed, so use FetchContent to download and provide Catch2
|
find_package(Catch2 ${FSFW_CATCH2_LIB_MAJOR_VERSION} CONFIG QUIET)
|
||||||
if(NOT Catch2_FOUND)
|
# Not installed, so use FetchContent to download and provide Catch2
|
||||||
message(STATUS "${MSG_PREFIX} Catch2 installation not found. Downloading Catch2 library with FetchContent")
|
if(NOT Catch2_FOUND)
|
||||||
include(FetchContent)
|
message(
|
||||||
|
STATUS
|
||||||
|
"${MSG_PREFIX} Catch2 installation not found. Downloading Catch2 library with FetchContent"
|
||||||
|
)
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
Catch2
|
Catch2
|
||||||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||||
GIT_TAG ${FSFW_CATCH2_LIB_VERSION}
|
GIT_TAG ${FSFW_CATCH2_LIB_VERSION})
|
||||||
)
|
|
||||||
|
|
||||||
list(APPEND FSFW_FETCH_CONTENT_TARGETS Catch2)
|
list(APPEND FSFW_FETCH_CONTENT_TARGETS Catch2)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# The documentation for FetchContent recommends declaring all the dependencies
|
# The documentation for FetchContent recommends declaring all the dependencies
|
||||||
# before making them available. We make all declared dependency available here
|
# before making them available. We make all declared dependency available here
|
||||||
# after their declaration
|
# after their declaration
|
||||||
if(FSFW_FETCH_CONTENT_TARGETS)
|
if(FSFW_FETCH_CONTENT_TARGETS)
|
||||||
FetchContent_MakeAvailable(${FSFW_FETCH_CONTENT_TARGETS})
|
FetchContent_MakeAvailable(${FSFW_FETCH_CONTENT_TARGETS})
|
||||||
if(TARGET etl)
|
if(TARGET etl)
|
||||||
add_library(${LIB_ETL_TARGET} ALIAS etl)
|
add_library(${LIB_ETL_TARGET} ALIAS etl)
|
||||||
endif()
|
endif()
|
||||||
if(TARGET Catch2)
|
if(TARGET Catch2)
|
||||||
# Fixes regression -preview4, to be confirmed in later releases
|
# Fixes regression -preview4, to be confirmed in later releases Related
|
||||||
# Related GitHub issue: https://github.com/catchorg/Catch2/issues/2417
|
# GitHub issue: https://github.com/catchorg/Catch2/issues/2417
|
||||||
set_target_properties(Catch2 PROPERTIES DEBUG_POSTFIX "")
|
set_target_properties(Catch2 PROPERTIES DEBUG_POSTFIX "")
|
||||||
set_target_properties(Catch2 PROPERTIES EXCLUDE_FROM_ALL "true")
|
set_target_properties(Catch2 PROPERTIES EXCLUDE_FROM_ALL "true")
|
||||||
set_target_properties(Catch2WithMain PROPERTIES EXCLUDE_FROM_ALL "true")
|
set_target_properties(Catch2WithMain PROPERTIES EXCLUDE_FROM_ALL "true")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
################################################################################
|
# ##############################################################################
|
||||||
# Post-Sources preparation
|
# Post-Sources preparation
|
||||||
################################################################################
|
# ##############################################################################
|
||||||
|
|
||||||
# Add libraries
|
# Add libraries
|
||||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
|
target_link_libraries(${LIB_EIVE_MISSION}
|
||||||
${LIB_FSFW_NAME}
|
PUBLIC ${LIB_FSFW_NAME} ${LIB_LWGPS_NAME} ${LIB_OS_NAME})
|
||||||
${LIB_LWGPS_NAME}
|
|
||||||
${LIB_OS_NAME}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(${OBSW_NAME} PRIVATE
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_EIVE_MISSION})
|
||||||
${LIB_EIVE_MISSION}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/q7s")
|
if(TGT_BSP MATCHES "arm/q7s")
|
||||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_GPS} ${LIB_ARCSEC})
|
||||||
${LIB_GPS}
|
|
||||||
${LIB_ARCSEC}
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${UNITTEST_NAME} PRIVATE
|
target_link_libraries(${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION}
|
||||||
Catch2
|
rapidcsv)
|
||||||
${LIB_EIVE_MISSION}
|
|
||||||
rapidcsv
|
|
||||||
)
|
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/egse")
|
if(TGT_BSP MATCHES "arm/egse")
|
||||||
target_link_libraries(${OBSW_NAME} PRIVATE
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
|
||||||
${LIB_ARCSEC}
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ADD_CSP_LIB)
|
if(ADD_CSP_LIB)
|
||||||
target_link_libraries(${OBSW_NAME} PRIVATE
|
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_CSP_NAME})
|
||||||
${LIB_CSP_NAME}
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(EIVE_ADD_ETL_LIB)
|
if(EIVE_ADD_ETL_LIB)
|
||||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_ETL_TARGET})
|
||||||
${LIB_ETL_TARGET}
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EIVE_ADD_JSON_LIB)
|
if(EIVE_ADD_JSON_LIB)
|
||||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_JSON_NAME})
|
||||||
${LIB_JSON_NAME}
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_CXX_FS})
|
||||||
${LIB_CXX_FS}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Add include paths for all sources.
|
# Add include paths for all sources.
|
||||||
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
|
target_include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${LIB_EIVE_MISSION} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${FSFW_CONFIG_PATH}
|
||||||
${FSFW_CONFIG_PATH}
|
${CMAKE_CURRENT_BINARY_DIR} ${LIB_ARCSEC_PATH})
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${LIB_ARCSEC_PATH}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/egse")
|
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/egse")
|
||||||
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
|
target_include_directories(${LIB_EIVE_MISSION} PUBLIC ${ARCSEC_LIB_PATH})
|
||||||
${ARCSEC_LIB_PATH}
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_VERBOSE)
|
if(CMAKE_VERBOSE)
|
||||||
message(STATUS "Warning flags: ${WARNING_FLAGS}")
|
message(STATUS "Warning flags: ${WARNING_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(CMAKE_CROSSCOMPILING)
|
if(CMAKE_CROSSCOMPILING)
|
||||||
include (HardwareOsPostConfig)
|
include(HardwareOsPostConfig)
|
||||||
post_source_hw_os_config()
|
post_source_hw_os_config()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_SIZE)
|
if(NOT CMAKE_SIZE)
|
||||||
set(CMAKE_SIZE size)
|
set(CMAKE_SIZE size)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(FILE_SUFFIX ".exe")
|
set(FILE_SUFFIX ".exe")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EIVE_BUILD_WATCHDOG)
|
if(EIVE_BUILD_WATCHDOG)
|
||||||
set(TARGET_STRING "OBSW Watchdog")
|
set(TARGET_STRING "OBSW Watchdog")
|
||||||
else()
|
else()
|
||||||
if(TGT_BSP)
|
if(TGT_BSP)
|
||||||
set(TARGET_STRING "Target BSP: ${TGT_BSP}")
|
set(TARGET_STRING "Target BSP: ${TGT_BSP}")
|
||||||
else()
|
else()
|
||||||
set(TARGET_STRING "Target BSP: Hosted")
|
set(TARGET_STRING "Target BSP: Hosted")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS ${OBSW_NAME} RUNTIME DESTINATION bin)
|
install(TARGETS ${OBSW_NAME} RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
string(CONCAT POST_BUILD_COMMENT
|
string(CONCAT POST_BUILD_COMMENT "Build directory: ${CMAKE_BINARY_DIR}\n"
|
||||||
"Build directory: ${CMAKE_BINARY_DIR}\n"
|
"Target OSAL: ${FSFW_OSAL}\n"
|
||||||
"Target OSAL: ${FSFW_OSAL}\n"
|
"Target Build Type: ${CMAKE_BUILD_TYPE}\n" "${TARGET_STRING}")
|
||||||
"Target Build Type: ${CMAKE_BUILD_TYPE}\n"
|
|
||||||
"${TARGET_STRING}"
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${OBSW_NAME}
|
TARGET ${OBSW_NAME}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_SIZE} ${OBSW_BIN_NAME}${FILE_SUFFIX}
|
COMMAND ${CMAKE_SIZE} ${OBSW_BIN_NAME}${FILE_SUFFIX}
|
||||||
COMMENT ${POST_BUILD_COMMENT}
|
COMMENT ${POST_BUILD_COMMENT})
|
||||||
)
|
|
||||||
|
|
||||||
include (BuildType)
|
include(BuildType)
|
||||||
set_build_type()
|
set_build_type()
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp ObjectFactory.cpp)
|
||||||
InitMission.cpp
|
|
||||||
main.cpp
|
|
||||||
ObjectFactory.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(boardconfig)
|
add_subdirectory(boardconfig)
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE print.c)
|
||||||
print.c
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(${OBSW_NAME} PUBLIC
|
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp ObjectFactory.cpp)
|
||||||
InitMission.cpp
|
|
||||||
main.cpp
|
|
||||||
ObjectFactory.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(fsfwconfig)
|
add_subdirectory(fsfwconfig)
|
||||||
add_subdirectory(boardconfig)
|
add_subdirectory(boardconfig)
|
||||||
|
@ -1,10 +1,3 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE print.c)
|
||||||
print.c
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(${OBSW_NAME} PUBLIC
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
@ -1,8 +1 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${TARGET_NAME} PUBLIC ArduinoComIF.cpp ArduinoCookie.cpp)
|
||||||
ArduinoComIF.cpp
|
|
||||||
ArduinoCookie.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,27 +1,15 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp)
|
||||||
ipc/MissionMessageTypes.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(${OBSW_NAME} PUBLIC
|
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
# If a special translation file for object IDs exists, compile it.
|
# If a special translation file for object IDs exists, compile it.
|
||||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
|
||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE objects/translateObjects.cpp)
|
||||||
objects/translateObjects.cpp
|
target_sources(${UNITTEST_NAME} PRIVATE objects/translateObjects.cpp)
|
||||||
)
|
|
||||||
target_sources(${UNITTEST_NAME} PRIVATE
|
|
||||||
objects/translateObjects.cpp
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# If a special translation file for events exists, compile it.
|
# If a special translation file for events exists, compile it.
|
||||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
|
||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE events/translateEvents.cpp)
|
||||||
events/translateEvents.cpp
|
target_sources(${UNITTEST_NAME} PRIVATE events/translateEvents.cpp)
|
||||||
)
|
|
||||||
target_sources(${UNITTEST_NAME} PRIVATE
|
|
||||||
events/translateEvents.cpp
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp gpioInit.cpp
|
||||||
InitMission.cpp
|
ObjectFactory.cpp)
|
||||||
main.cpp
|
|
||||||
gpioInit.cpp
|
|
||||||
ObjectFactory.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(boardconfig)
|
add_subdirectory(boardconfig)
|
||||||
add_subdirectory(boardtest)
|
add_subdirectory(boardtest)
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE print.c)
|
||||||
print.c
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(${OBSW_NAME} PUBLIC
|
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
@ -1,6 +1 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE)
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,20 +1,13 @@
|
|||||||
#simple mode
|
# simple mode
|
||||||
add_executable(${SIMPLE_OBSW_NAME} EXCLUDE_FROM_ALL)
|
add_executable(${SIMPLE_OBSW_NAME} EXCLUDE_FROM_ALL)
|
||||||
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
|
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
|
||||||
target_sources(${SIMPLE_OBSW_NAME} PUBLIC
|
target_sources(${SIMPLE_OBSW_NAME} PUBLIC main.cpp)
|
||||||
main.cpp
|
# I think this is unintentional? (produces linker errors for stuff in /linux)
|
||||||
)
|
target_link_libraries(${SIMPLE_OBSW_NAME} PUBLIC ${LIB_FSFW_NAME})
|
||||||
#I think this is unintentional? (produces linker errors for stuff in /linux)
|
|
||||||
target_link_libraries(${SIMPLE_OBSW_NAME} PUBLIC
|
|
||||||
${LIB_FSFW_NAME}
|
|
||||||
)
|
|
||||||
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
|
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
|
||||||
add_subdirectory(simple)
|
add_subdirectory(simple)
|
||||||
|
|
||||||
target_sources(${OBSW_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC main.cpp obsw.cpp)
|
||||||
main.cpp
|
|
||||||
obsw.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(boardtest)
|
add_subdirectory(boardtest)
|
||||||
|
|
||||||
@ -23,11 +16,9 @@ add_subdirectory(comIF)
|
|||||||
add_subdirectory(core)
|
add_subdirectory(core)
|
||||||
|
|
||||||
if(EIVE_Q7S_EM)
|
if(EIVE_Q7S_EM)
|
||||||
add_subdirectory(em)
|
add_subdirectory(em)
|
||||||
else()
|
else()
|
||||||
target_sources(${OBSW_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC fmObjectFactory.cpp)
|
||||||
fmObjectFactory.cpp
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(memory)
|
add_subdirectory(memory)
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE print.c)
|
||||||
print.c
|
|
||||||
)
|
|
||||||
|
|
||||||
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
|
target_sources(${SIMPLE_OBSW_NAME} PRIVATE print.c)
|
||||||
print.c
|
|
||||||
)
|
|
||||||
|
|
||||||
|
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
target_include_directories(${OBSW_NAME} PUBLIC
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE FileSystemTest.cpp Q7STestTask.cpp)
|
||||||
FileSystemTest.cpp
|
|
||||||
Q7STestTask.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
if(EIVE_BUILD_Q7S_SIMPLE_MODE)
|
if(EIVE_BUILD_Q7S_SIMPLE_MODE)
|
||||||
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
|
target_sources(${SIMPLE_OBSW_NAME} PRIVATE FileSystemTest.cpp)
|
||||||
FileSystemTest.cpp
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
@ -1,6 +1,2 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE rwSpiCallback.cpp gnssCallback.cpp
|
||||||
rwSpiCallback.cpp
|
pcduSwitchCb.cpp q7sGpioCallbacks.cpp)
|
||||||
gnssCallback.cpp
|
|
||||||
pcduSwitchCb.cpp
|
|
||||||
q7sGpioCallbacks.cpp
|
|
||||||
)
|
|
||||||
|
@ -1,6 +1 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE)
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE CoreController.cpp InitMission.cpp
|
||||||
CoreController.cpp
|
ObjectFactory.cpp)
|
||||||
InitMission.cpp
|
|
||||||
ObjectFactory.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
|
target_sources(${SIMPLE_OBSW_NAME} PRIVATE InitMission.cpp)
|
||||||
InitMission.cpp
|
|
||||||
)
|
|
||||||
|
@ -1,3 +1 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE emObjectFactory.cpp)
|
||||||
emObjectFactory.cpp
|
|
||||||
)
|
|
||||||
|
@ -1,6 +1,2 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE FileSystemHandler.cpp SdCardManager.cpp
|
||||||
FileSystemHandler.cpp
|
scratchApi.cpp FilesystemHelper.cpp)
|
||||||
SdCardManager.cpp
|
|
||||||
scratchApi.cpp
|
|
||||||
FilesystemHelper.cpp
|
|
||||||
)
|
|
||||||
|
@ -1,3 +1 @@
|
|||||||
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
|
target_sources(${SIMPLE_OBSW_NAME} PRIVATE simple.cpp)
|
||||||
simple.cpp
|
|
||||||
)
|
|
||||||
|
@ -1,3 +1 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE Xadc.cpp)
|
||||||
Xadc.cpp
|
|
||||||
)
|
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
target_include_directories(${OBSW_NAME} PRIVATE
|
target_include_directories(${OBSW_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE commonConfig.cpp)
|
||||||
commonConfig.cpp
|
|
||||||
)
|
|
||||||
|
@ -2,14 +2,7 @@
|
|||||||
#define COMMON_CONFIG_CCSDSCONFIG_H_
|
#define COMMON_CONFIG_CCSDSCONFIG_H_
|
||||||
|
|
||||||
namespace ccsds {
|
namespace ccsds {
|
||||||
enum {
|
enum { VC0, VC1, VC2, VC3 };
|
||||||
VC0,
|
|
||||||
VC1,
|
|
||||||
VC2,
|
|
||||||
VC3
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* COMMON_CONFIG_CCSDSCONFIG_H_ */
|
#endif /* COMMON_CONFIG_CCSDSCONFIG_H_ */
|
||||||
|
@ -2,39 +2,40 @@
|
|||||||
#define COMMON_CONFIG_COMMONCLASSIDS_H_
|
#define COMMON_CONFIG_COMMONCLASSIDS_H_
|
||||||
|
|
||||||
#include <fsfw/returnvalues/FwClassIds.h>
|
#include <fsfw/returnvalues/FwClassIds.h>
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
namespace CLASS_ID {
|
namespace CLASS_ID {
|
||||||
enum commonClassIds: uint8_t {
|
enum commonClassIds : uint8_t {
|
||||||
COMMON_CLASS_ID_START = FW_CLASS_ID_COUNT,
|
COMMON_CLASS_ID_START = FW_CLASS_ID_COUNT,
|
||||||
PCDU_HANDLER, //PCDU
|
PCDU_HANDLER, // PCDU
|
||||||
HEATER_HANDLER, //HEATER
|
HEATER_HANDLER, // HEATER
|
||||||
SYRLINKS_HANDLER, //SYRLINKS
|
SYRLINKS_HANDLER, // SYRLINKS
|
||||||
IMTQ_HANDLER, //IMTQ
|
IMTQ_HANDLER, // IMTQ
|
||||||
RW_HANDLER, //RWHA
|
RW_HANDLER, // RWHA
|
||||||
STR_HANDLER, //STRH
|
STR_HANDLER, // STRH
|
||||||
DWLPWRON_CMD, //DWLPWRON
|
DWLPWRON_CMD, // DWLPWRON
|
||||||
MPSOC_TM, //MPTM
|
MPSOC_TM, // MPTM
|
||||||
PLOC_SUPERVISOR_HANDLER, //PLSV
|
PLOC_SUPERVISOR_HANDLER, // PLSV
|
||||||
PLOC_SUPV_HELPER, //PLSPVhLP
|
PLOC_SUPV_HELPER, // PLSPVhLP
|
||||||
SUS_HANDLER, //SUSS
|
SUS_HANDLER, // SUSS
|
||||||
CCSDS_IP_CORE_BRIDGE, //IPCI
|
CCSDS_IP_CORE_BRIDGE, // IPCI
|
||||||
PTME, //PTME
|
PTME, // PTME
|
||||||
PLOC_UPDATER, //PLUD
|
PLOC_UPDATER, // PLUD
|
||||||
STR_HELPER, //STRHLP
|
STR_HELPER, // STRHLP
|
||||||
GOM_SPACE_HANDLER, //GOMS
|
GOM_SPACE_HANDLER, // GOMS
|
||||||
PLOC_MEMORY_DUMPER, //PLMEMDUMP
|
PLOC_MEMORY_DUMPER, // PLMEMDUMP
|
||||||
PDEC_HANDLER, //PDEC
|
PDEC_HANDLER, // PDEC
|
||||||
CCSDS_HANDLER, //CCSDS
|
CCSDS_HANDLER, // CCSDS
|
||||||
RATE_SETTER, //RS
|
RATE_SETTER, // RS
|
||||||
ARCSEC_JSON_BASE, //JSONBASE
|
ARCSEC_JSON_BASE, // JSONBASE
|
||||||
NVM_PARAM_BASE, //NVMB
|
NVM_PARAM_BASE, // NVMB
|
||||||
FILE_SYSTEM_HELPER, //FSHLP
|
FILE_SYSTEM_HELPER, // FSHLP
|
||||||
PLOC_MPSOC_HELPER, // PLMPHLP
|
PLOC_MPSOC_HELPER, // PLMPHLP
|
||||||
SA_DEPL_HANDLER, //SADPL
|
SA_DEPL_HANDLER, // SADPL
|
||||||
MPSOC_RETURN_VALUES_IF, //MPSOCRTVIF
|
MPSOC_RETURN_VALUES_IF, // MPSOCRTVIF
|
||||||
SUPV_RETURN_VALUES_IF, //SPVRTVIF
|
SUPV_RETURN_VALUES_IF, // SPVRTVIF
|
||||||
COMMON_CLASS_ID_END // [EXPORT] : [END]
|
COMMON_CLASS_ID_END // [EXPORT] : [END]
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "tmtc/apid.h"
|
|
||||||
#include "fsfw/tmtcpacket/SpacePacket.h"
|
|
||||||
|
|
||||||
const Version common::OBSW_VERSION { OBSW_VERSION_MAJOR, OBSW_VERSION_MINOR, OBSW_VERSION_REVISION, OBSW_VERSION_CST_GIT_SHA1 };
|
#include "fsfw/tmtcpacket/SpacePacket.h"
|
||||||
|
#include "tmtc/apid.h"
|
||||||
|
|
||||||
|
const fsfw::Version common::OBSW_VERSION{OBSW_VERSION_MAJOR, OBSW_VERSION_MINOR,
|
||||||
|
OBSW_VERSION_REVISION, OBSW_VERSION_CST_GIT_SHA1};
|
||||||
const uint16_t common::PUS_PACKET_ID = spacepacket::getTcSpacePacketIdFromApid(apid::EIVE_OBSW);
|
const uint16_t common::PUS_PACKET_ID = spacepacket::getTcSpacePacketIdFromApid(apid::EIVE_OBSW);
|
||||||
|
@ -33,7 +33,7 @@ static constexpr uint8_t OBSW_VERSION_REVISION = @OBSW_VERSION_REVISION@;
|
|||||||
// CST: Commits since tag
|
// CST: Commits since tag
|
||||||
static const char OBSW_VERSION_CST_GIT_SHA1[] = "@OBSW_VERSION_CST_GIT_SHA1@";
|
static const char OBSW_VERSION_CST_GIT_SHA1[] = "@OBSW_VERSION_CST_GIT_SHA1@";
|
||||||
|
|
||||||
extern const Version OBSW_VERSION;
|
extern const fsfw::Version OBSW_VERSION;
|
||||||
|
|
||||||
extern const uint16_t PUS_PACKET_ID;
|
extern const uint16_t PUS_PACKET_ID;
|
||||||
|
|
||||||
|
@ -4,126 +4,125 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
namespace objects {
|
namespace objects {
|
||||||
enum commonObjects: uint32_t {
|
enum commonObjects : uint32_t {
|
||||||
/* First Byte 0x50-0x52 reserved for PUS Services **/
|
/* First Byte 0x50-0x52 reserved for PUS Services **/
|
||||||
CCSDS_PACKET_DISTRIBUTOR = 0x50000100,
|
CCSDS_PACKET_DISTRIBUTOR = 0x50000100,
|
||||||
PUS_PACKET_DISTRIBUTOR = 0x50000200,
|
PUS_PACKET_DISTRIBUTOR = 0x50000200,
|
||||||
TMTC_BRIDGE = 0x50000300,
|
TMTC_BRIDGE = 0x50000300,
|
||||||
TMTC_POLLING_TASK = 0x50000400,
|
TMTC_POLLING_TASK = 0x50000400,
|
||||||
FILE_SYSTEM_HANDLER = 0x50000500,
|
FILE_SYSTEM_HANDLER = 0x50000500,
|
||||||
SDC_MANAGER = 0x50000550,
|
SDC_MANAGER = 0x50000550,
|
||||||
PTME = 0x50000600,
|
PTME = 0x50000600,
|
||||||
PDEC_HANDLER = 0x50000700,
|
PDEC_HANDLER = 0x50000700,
|
||||||
CCSDS_HANDLER = 0x50000800,
|
CCSDS_HANDLER = 0x50000800,
|
||||||
|
|
||||||
/* 0x43 ('C') for Controllers */
|
/* 0x43 ('C') for Controllers */
|
||||||
THERMAL_CONTROLLER = 0x43400001,
|
THERMAL_CONTROLLER = 0x43400001,
|
||||||
ACS_CONTROLLER = 0x43100002,
|
ACS_CONTROLLER = 0x43100002,
|
||||||
CORE_CONTROLLER = 0x43000003,
|
CORE_CONTROLLER = 0x43000003,
|
||||||
|
|
||||||
/* 0x44 ('D') for device handlers */
|
/* 0x44 ('D') for device handlers */
|
||||||
MGM_0_LIS3_HANDLER = 0x44120006,
|
MGM_0_LIS3_HANDLER = 0x44120006,
|
||||||
MGM_1_RM3100_HANDLER = 0x44120107,
|
MGM_1_RM3100_HANDLER = 0x44120107,
|
||||||
MGM_2_LIS3_HANDLER = 0x44120208,
|
MGM_2_LIS3_HANDLER = 0x44120208,
|
||||||
MGM_3_RM3100_HANDLER = 0x44120309,
|
MGM_3_RM3100_HANDLER = 0x44120309,
|
||||||
GYRO_0_ADIS_HANDLER = 0x44120010,
|
GYRO_0_ADIS_HANDLER = 0x44120010,
|
||||||
GYRO_1_L3G_HANDLER = 0x44120111,
|
GYRO_1_L3G_HANDLER = 0x44120111,
|
||||||
GYRO_2_ADIS_HANDLER = 0x44120212,
|
GYRO_2_ADIS_HANDLER = 0x44120212,
|
||||||
GYRO_3_L3G_HANDLER = 0x44120313,
|
GYRO_3_L3G_HANDLER = 0x44120313,
|
||||||
RW1 = 0x44120047,
|
RW1 = 0x44120047,
|
||||||
RW2 = 0x44120148,
|
RW2 = 0x44120148,
|
||||||
RW3 = 0x44120249,
|
RW3 = 0x44120249,
|
||||||
RW4 = 0x44120350,
|
RW4 = 0x44120350,
|
||||||
STAR_TRACKER = 0x44130001,
|
STAR_TRACKER = 0x44130001,
|
||||||
GPS_CONTROLLER = 0x44130045,
|
GPS_CONTROLLER = 0x44130045,
|
||||||
|
|
||||||
IMTQ_HANDLER = 0x44140014,
|
IMTQ_HANDLER = 0x44140014,
|
||||||
TMP1075_HANDLER_1 = 0x44420004,
|
TMP1075_HANDLER_1 = 0x44420004,
|
||||||
TMP1075_HANDLER_2 = 0x44420005,
|
TMP1075_HANDLER_2 = 0x44420005,
|
||||||
PCDU_HANDLER = 0x442000A1,
|
PCDU_HANDLER = 0x442000A1,
|
||||||
P60DOCK_HANDLER = 0x44250000,
|
P60DOCK_HANDLER = 0x44250000,
|
||||||
PDU1_HANDLER = 0x44250001,
|
PDU1_HANDLER = 0x44250001,
|
||||||
PDU2_HANDLER = 0x44250002,
|
PDU2_HANDLER = 0x44250002,
|
||||||
ACU_HANDLER = 0x44250003,
|
ACU_HANDLER = 0x44250003,
|
||||||
BPX_BATT_HANDLER = 0x44260000,
|
BPX_BATT_HANDLER = 0x44260000,
|
||||||
PLPCDU_HANDLER = 0x44300000,
|
PLPCDU_HANDLER = 0x44300000,
|
||||||
RAD_SENSOR = 0x443200A5,
|
RAD_SENSOR = 0x443200A5,
|
||||||
PLOC_UPDATER = 0x44330000,
|
PLOC_UPDATER = 0x44330000,
|
||||||
PLOC_MEMORY_DUMPER = 0x44330001,
|
PLOC_MEMORY_DUMPER = 0x44330001,
|
||||||
STR_HELPER = 0x44330002,
|
STR_HELPER = 0x44330002,
|
||||||
PLOC_MPSOC_HELPER = 0x44330003,
|
PLOC_MPSOC_HELPER = 0x44330003,
|
||||||
AXI_PTME_CONFIG = 0x44330004,
|
AXI_PTME_CONFIG = 0x44330004,
|
||||||
PTME_CONFIG = 0x44330005,
|
PTME_CONFIG = 0x44330005,
|
||||||
PLOC_MPSOC_HANDLER = 0x44330015,
|
PLOC_MPSOC_HANDLER = 0x44330015,
|
||||||
PLOC_SUPERVISOR_HANDLER = 0x44330016,
|
PLOC_SUPERVISOR_HANDLER = 0x44330016,
|
||||||
PLOC_SUPERVISOR_HELPER = 0x44330017,
|
PLOC_SUPERVISOR_HELPER = 0x44330017,
|
||||||
SOLAR_ARRAY_DEPL_HANDLER = 0x444100A2,
|
SOLAR_ARRAY_DEPL_HANDLER = 0x444100A2,
|
||||||
HEATER_HANDLER = 0x444100A4,
|
HEATER_HANDLER = 0x444100A4,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Not yet specified which pt1000 will measure which device/location in the satellite.
|
* Not yet specified which pt1000 will measure which device/location in the satellite.
|
||||||
* Therefore object ids are named according to the IC naming of the RTDs in the schematic.
|
* Therefore object ids are named according to the IC naming of the RTDs in the schematic.
|
||||||
*/
|
*/
|
||||||
RTD_0_IC3_PLOC_HEATSPREADER = 0x44420016,
|
RTD_0_IC3_PLOC_HEATSPREADER = 0x44420016,
|
||||||
RTD_1_IC4_PLOC_MISSIONBOARD = 0x44420017,
|
RTD_1_IC4_PLOC_MISSIONBOARD = 0x44420017,
|
||||||
RTD_2_IC5_4K_CAMERA = 0x44420018,
|
RTD_2_IC5_4K_CAMERA = 0x44420018,
|
||||||
RTD_3_IC6_DAC_HEATSPREADER = 0x44420019,
|
RTD_3_IC6_DAC_HEATSPREADER = 0x44420019,
|
||||||
RTD_4_IC7_STARTRACKER = 0x44420020,
|
RTD_4_IC7_STARTRACKER = 0x44420020,
|
||||||
RTD_5_IC8_RW1_MX_MY = 0x44420021,
|
RTD_5_IC8_RW1_MX_MY = 0x44420021,
|
||||||
RTD_6_IC9_DRO = 0x44420022,
|
RTD_6_IC9_DRO = 0x44420022,
|
||||||
RTD_7_IC10_SCEX = 0x44420023,
|
RTD_7_IC10_SCEX = 0x44420023,
|
||||||
RTD_8_IC11_X8 = 0x44420024,
|
RTD_8_IC11_X8 = 0x44420024,
|
||||||
RTD_9_IC12_HPA = 0x44420025,
|
RTD_9_IC12_HPA = 0x44420025,
|
||||||
RTD_10_IC13_PL_TX = 0x44420026,
|
RTD_10_IC13_PL_TX = 0x44420026,
|
||||||
RTD_11_IC14_MPA = 0x44420027,
|
RTD_11_IC14_MPA = 0x44420027,
|
||||||
RTD_12_IC15_ACU = 0x44420028,
|
RTD_12_IC15_ACU = 0x44420028,
|
||||||
RTD_13_IC16_PLPCDU_HEATSPREADER = 0x44420029,
|
RTD_13_IC16_PLPCDU_HEATSPREADER = 0x44420029,
|
||||||
RTD_14_IC17_TCS_BOARD = 0x44420030,
|
RTD_14_IC17_TCS_BOARD = 0x44420030,
|
||||||
RTD_15_IC18_IMTQ = 0x44420031,
|
RTD_15_IC18_IMTQ = 0x44420031,
|
||||||
|
|
||||||
// Name convention for SUS devices
|
// Name convention for SUS devices
|
||||||
// SUS_<IDX>_<N/R>_LOC_X<F/M/B>Y<F/M/B>Z<F/M/B>_PT_<DIR><F/B>
|
// SUS_<IDX>_<N/R>_LOC_X<F/M/B>Y<F/M/B>Z<F/M/B>_PT_<DIR><F/B>
|
||||||
// LOC: Location
|
// LOC: Location
|
||||||
// PT: Pointing
|
// PT: Pointing
|
||||||
// N/R: Nominal/Redundant
|
// N/R: Nominal/Redundant
|
||||||
// F/M/B: Forward/Middle/Backwards
|
// F/M/B: Forward/Middle/Backwards
|
||||||
SUS_0_N_LOC_XFYFZM_PT_XF = 0x44120032,
|
SUS_0_N_LOC_XFYFZM_PT_XF = 0x44120032,
|
||||||
SUS_6_R_LOC_XFYBZM_PT_XF = 0x44120038,
|
SUS_6_R_LOC_XFYBZM_PT_XF = 0x44120038,
|
||||||
|
|
||||||
SUS_1_N_LOC_XBYFZM_PT_XB = 0x44120033,
|
SUS_1_N_LOC_XBYFZM_PT_XB = 0x44120033,
|
||||||
SUS_7_R_LOC_XBYBZM_PT_XB = 0x44120039,
|
SUS_7_R_LOC_XBYBZM_PT_XB = 0x44120039,
|
||||||
|
|
||||||
SUS_2_N_LOC_XFYBZB_PT_YB = 0x44120034,
|
SUS_2_N_LOC_XFYBZB_PT_YB = 0x44120034,
|
||||||
SUS_8_R_LOC_XBYBZB_PT_YB = 0x44120040,
|
SUS_8_R_LOC_XBYBZB_PT_YB = 0x44120040,
|
||||||
|
|
||||||
SUS_3_N_LOC_XFYBZF_PT_YF = 0x44120035,
|
SUS_3_N_LOC_XFYBZF_PT_YF = 0x44120035,
|
||||||
SUS_9_R_LOC_XBYBZB_PT_YF = 0x44120041,
|
SUS_9_R_LOC_XBYBZB_PT_YF = 0x44120041,
|
||||||
|
|
||||||
SUS_4_N_LOC_XMYFZF_PT_ZF = 0x44120036,
|
SUS_4_N_LOC_XMYFZF_PT_ZF = 0x44120036,
|
||||||
SUS_10_N_LOC_XMYBZF_PT_ZF = 0x44120042,
|
SUS_10_N_LOC_XMYBZF_PT_ZF = 0x44120042,
|
||||||
|
|
||||||
SUS_5_N_LOC_XFYMZB_PT_ZB = 0x44120037,
|
SUS_5_N_LOC_XFYMZB_PT_ZB = 0x44120037,
|
||||||
SUS_11_R_LOC_XBYMZB_PT_ZB = 0x44120043,
|
SUS_11_R_LOC_XBYMZB_PT_ZB = 0x44120043,
|
||||||
|
|
||||||
SYRLINKS_HK_HANDLER = 0x445300A3,
|
SYRLINKS_HK_HANDLER = 0x445300A3,
|
||||||
|
|
||||||
// 0x60 for other stuff
|
// 0x60 for other stuff
|
||||||
HEATER_0_PLOC_PROC_BRD = 0x60000000,
|
HEATER_0_PLOC_PROC_BRD = 0x60000000,
|
||||||
HEATER_1_PCDU_BRD = 0x60000001,
|
HEATER_1_PCDU_BRD = 0x60000001,
|
||||||
HEATER_2_ACS_BRD = 0x60000002,
|
HEATER_2_ACS_BRD = 0x60000002,
|
||||||
HEATER_3_OBC_BRD = 0x60000003,
|
HEATER_3_OBC_BRD = 0x60000003,
|
||||||
HEATER_4_CAMERA = 0x60000004,
|
HEATER_4_CAMERA = 0x60000004,
|
||||||
HEATER_5_STR = 0x60000005,
|
HEATER_5_STR = 0x60000005,
|
||||||
HEATER_6_DRO = 0x60000006,
|
HEATER_6_DRO = 0x60000006,
|
||||||
HEATER_7_HPA = 0x60000007,
|
HEATER_7_HPA = 0x60000007,
|
||||||
|
|
||||||
// 0x73 ('s') for assemblies and system/subsystem components
|
// 0x73 ('s') for assemblies and system/subsystem components
|
||||||
ACS_BOARD_ASS = 0x73000001,
|
ACS_BOARD_ASS = 0x73000001,
|
||||||
SUS_BOARD_ASS = 0x73000002,
|
SUS_BOARD_ASS = 0x73000002,
|
||||||
TCS_BOARD_ASS = 0x73000003,
|
TCS_BOARD_ASS = 0x73000003,
|
||||||
RW_ASS = 0x73000004
|
RW_ASS = 0x73000004
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* COMMON_CONFIG_COMMONOBJECTS_H_ */
|
#endif /* COMMON_CONFIG_COMMONOBJECTS_H_ */
|
||||||
|
@ -4,37 +4,36 @@
|
|||||||
#include <fsfw/events/fwSubsystemIdRanges.h>
|
#include <fsfw/events/fwSubsystemIdRanges.h>
|
||||||
|
|
||||||
namespace SUBSYSTEM_ID {
|
namespace SUBSYSTEM_ID {
|
||||||
enum: uint8_t {
|
enum : uint8_t {
|
||||||
COMMON_SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE,
|
COMMON_SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE,
|
||||||
ACS_SUBSYSTEM = 112,
|
ACS_SUBSYSTEM = 112,
|
||||||
PCDU_HANDLER = 113,
|
PCDU_HANDLER = 113,
|
||||||
HEATER_HANDLER = 114,
|
HEATER_HANDLER = 114,
|
||||||
SA_DEPL_HANDLER = 115,
|
SA_DEPL_HANDLER = 115,
|
||||||
PLOC_MPSOC_HANDLER = 116,
|
PLOC_MPSOC_HANDLER = 116,
|
||||||
IMTQ_HANDLER = 117,
|
IMTQ_HANDLER = 117,
|
||||||
RW_HANDLER = 118,
|
RW_HANDLER = 118,
|
||||||
STR_HANDLER = 119,
|
STR_HANDLER = 119,
|
||||||
PLOC_SUPERVISOR_HANDLER = 120,
|
PLOC_SUPERVISOR_HANDLER = 120,
|
||||||
FILE_SYSTEM = 121,
|
FILE_SYSTEM = 121,
|
||||||
PLOC_UPDATER = 122,
|
PLOC_UPDATER = 122,
|
||||||
PLOC_MEMORY_DUMPER = 123,
|
PLOC_MEMORY_DUMPER = 123,
|
||||||
PDEC_HANDLER = 124,
|
PDEC_HANDLER = 124,
|
||||||
STR_HELPER = 125,
|
STR_HELPER = 125,
|
||||||
PLOC_MPSOC_HELPER = 126,
|
PLOC_MPSOC_HELPER = 126,
|
||||||
PL_PCDU_HANDLER = 127,
|
PL_PCDU_HANDLER = 127,
|
||||||
ACS_BOARD_ASS = 128,
|
ACS_BOARD_ASS = 128,
|
||||||
SUS_BOARD_ASS = 129,
|
SUS_BOARD_ASS = 129,
|
||||||
TCS_BOARD_ASS = 130,
|
TCS_BOARD_ASS = 130,
|
||||||
GPS_HANDLER = 131,
|
GPS_HANDLER = 131,
|
||||||
P60_DOCK_HANDLER = 132,
|
P60_DOCK_HANDLER = 132,
|
||||||
PDU1_HANDLER = 133,
|
PDU1_HANDLER = 133,
|
||||||
PDU2_HANDLER = 134,
|
PDU2_HANDLER = 134,
|
||||||
ACU_HANDLER = 135,
|
ACU_HANDLER = 135,
|
||||||
PLOC_SUPV_HELPER = 136,
|
PLOC_SUPV_HELPER = 136,
|
||||||
SYRLINKS = 137,
|
SYRLINKS = 137,
|
||||||
COMMON_SUBSYSTEM_ID_END
|
COMMON_SUBSYSTEM_ID_END
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* COMMON_CONFIG_COMMONSUBSYSTEMIDS_H_ */
|
#endif /* COMMON_CONFIG_COMMONSUBSYSTEMIDS_H_ */
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
#ifndef COMMON_CONFIG_DEVCONF_H_
|
#ifndef COMMON_CONFIG_DEVCONF_H_
|
||||||
#define COMMON_CONFIG_DEVCONF_H_
|
#define COMMON_CONFIG_DEVCONF_H_
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <fsfw_hal/linux/spi/spiDefinitions.h>
|
#include <fsfw_hal/linux/spi/spiDefinitions.h>
|
||||||
#include <fsfw_hal/linux/uart/UartCookie.h>
|
#include <fsfw_hal/linux/uart/UartCookie.h>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SPI configuration will be contained here to let the device handlers remain independent
|
* SPI configuration will be contained here to let the device handlers remain independent
|
||||||
* of SPI specific properties.
|
* of SPI specific properties.
|
||||||
@ -45,7 +46,7 @@ static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0;
|
|||||||
static constexpr uint32_t RTD_SPEED = 2'000'000;
|
static constexpr uint32_t RTD_SPEED = 2'000'000;
|
||||||
static constexpr spi::SpiModes RTD_MODE = spi::SpiModes::MODE_3;
|
static constexpr spi::SpiModes RTD_MODE = spi::SpiModes::MODE_3;
|
||||||
|
|
||||||
}
|
} // namespace spi
|
||||||
|
|
||||||
namespace uart {
|
namespace uart {
|
||||||
|
|
||||||
@ -56,6 +57,6 @@ static constexpr UartBaudRate PLOC_MPSOC_BAUD = UartBaudRate::RATE_115200;
|
|||||||
static constexpr UartBaudRate PLOC_SUPV_BAUD = UartBaudRate::RATE_115200;
|
static constexpr UartBaudRate PLOC_SUPV_BAUD = UartBaudRate::RATE_115200;
|
||||||
static constexpr UartBaudRate STAR_TRACKER_BAUD = UartBaudRate::RATE_921600;
|
static constexpr UartBaudRate STAR_TRACKER_BAUD = UartBaudRate::RATE_921600;
|
||||||
|
|
||||||
}
|
} // namespace uart
|
||||||
|
|
||||||
#endif /* COMMON_CONFIG_DEVCONF_H_ */
|
#endif /* COMMON_CONFIG_DEVCONF_H_ */
|
||||||
|
@ -4,17 +4,17 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
namespace heater {
|
namespace heater {
|
||||||
enum Switchers: uint8_t {
|
enum Switchers : uint8_t {
|
||||||
HEATER_0_OBC_BRD,
|
HEATER_0_OBC_BRD,
|
||||||
HEATER_1_PLOC_PROC_BRD,
|
HEATER_1_PLOC_PROC_BRD,
|
||||||
HEATER_2_ACS_BRD,
|
HEATER_2_ACS_BRD,
|
||||||
HEATER_3_PCDU_PDU,
|
HEATER_3_PCDU_PDU,
|
||||||
HEATER_4_CAMERA,
|
HEATER_4_CAMERA,
|
||||||
HEATER_5_STR,
|
HEATER_5_STR,
|
||||||
HEATER_6_DRO,
|
HEATER_6_DRO,
|
||||||
HEATER_7_HPA,
|
HEATER_7_HPA,
|
||||||
NUMBER_OF_SWITCHES
|
NUMBER_OF_SWITCHES
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* FSFWCONFIG_DEVICES_HEATERSWITCHERLIST_H_ */
|
#endif /* FSFWCONFIG_DEVICES_HEATERSWITCHERLIST_H_ */
|
||||||
|
@ -19,7 +19,6 @@ static constexpr uint8_t LIVE_TM = 0;
|
|||||||
static constexpr uint32_t MAX_PATH_SIZE = 100;
|
static constexpr uint32_t MAX_PATH_SIZE = 100;
|
||||||
static constexpr uint32_t MAX_FILENAME_SIZE = 50;
|
static constexpr uint32_t MAX_FILENAME_SIZE = 50;
|
||||||
|
|
||||||
}
|
} // namespace config
|
||||||
|
|
||||||
|
|
||||||
#endif /* COMMON_CONFIG_DEFINITIONS_H_ */
|
#endif /* COMMON_CONFIG_DEFINITIONS_H_ */
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
* APID is a 11 bit number
|
* APID is a 11 bit number
|
||||||
*/
|
*/
|
||||||
namespace apid {
|
namespace apid {
|
||||||
static const uint16_t EIVE_OBSW = 0x65;
|
static const uint16_t EIVE_OBSW = 0x65;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* FSFWCONFIG_TMTC_APID_H_ */
|
#endif /* FSFWCONFIG_TMTC_APID_H_ */
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 4841d5d92d721383e92b521b584c7d0e62c9873d
|
Subproject commit e8023886f60ba3af0a63279da8dbc0d3eb0939a7
|
@ -6,6 +6,4 @@ add_subdirectory(devices)
|
|||||||
add_subdirectory(fsfwconfig)
|
add_subdirectory(fsfwconfig)
|
||||||
add_subdirectory(obc)
|
add_subdirectory(obc)
|
||||||
|
|
||||||
target_sources(${OBSW_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC ObjectFactory.cpp)
|
||||||
ObjectFactory.cpp
|
|
||||||
)
|
|
||||||
|
@ -1,10 +1,2 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE LibgpiodTest.cpp I2cTestClass.cpp
|
||||||
LibgpiodTest.cpp
|
SpiTestClass.cpp UartTestClass.cpp)
|
||||||
I2cTestClass.cpp
|
|
||||||
SpiTestClass.cpp
|
|
||||||
UartTestClass.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE gpioCallbacks.cpp)
|
||||||
gpioCallbacks.cpp
|
|
||||||
)
|
|
||||||
|
@ -1,8 +1 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC CspComIF.cpp CspCookie.cpp)
|
||||||
CspComIF.cpp
|
|
||||||
CspCookie.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
if(EIVE_BUILD_GPSD_GPS_HANDLER)
|
if(EIVE_BUILD_GPSD_GPS_HANDLER)
|
||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE GPSHyperionLinuxController.cpp)
|
||||||
GPSHyperionLinuxController.cpp
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(ploc)
|
add_subdirectory(ploc)
|
||||||
|
@ -309,9 +309,8 @@ class ApidOnlyPacket : public SpacePacket {
|
|||||||
*/
|
*/
|
||||||
class MPSoCBootSelect : public SpacePacket {
|
class MPSoCBootSelect : public SpacePacket {
|
||||||
public:
|
public:
|
||||||
|
static const uint8_t NVM0 = 0;
|
||||||
static const uint8_t NVM0 = 0;
|
static const uint8_t NVM1 = 1;
|
||||||
static const uint8_t NVM1 = 1;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(
|
||||||
PlocSupervisorHandler.cpp
|
${OBSW_NAME}
|
||||||
PlocMemoryDumper.cpp
|
PRIVATE PlocSupervisorHandler.cpp PlocMemoryDumper.cpp PlocMPSoCHandler.cpp
|
||||||
PlocMPSoCHandler.cpp
|
PlocMPSoCHelper.cpp PlocSupvHelper.cpp)
|
||||||
PlocMPSoCHelper.cpp
|
|
||||||
PlocSupvHelper.cpp
|
|
||||||
)
|
|
||||||
|
@ -1062,7 +1062,8 @@ ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data)
|
|||||||
nextReplyId = supv::EXE_REPORT;
|
nextReplyId = supv::EXE_REPORT;
|
||||||
|
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: SoC State (0 - off, 1 - booting, 2 - Update, 3 "
|
sif::info << "PlocSupervisorHandler::handleBootStatusReport: SoC State (0 - off, 1 - booting, 2 "
|
||||||
|
"- Update, 3 "
|
||||||
"- operating, 4 - Shutdown, 5 - Reset): "
|
"- operating, 4 - Shutdown, 5 - Reset): "
|
||||||
<< static_cast<unsigned int>(bootStatusReport.socState.value) << std::endl;
|
<< static_cast<unsigned int>(bootStatusReport.socState.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Power Cycles: "
|
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Power Cycles: "
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(
|
||||||
StarTrackerHandler.cpp
|
${OBSW_NAME}
|
||||||
StarTrackerJsonCommands.cpp
|
PRIVATE StarTrackerHandler.cpp StarTrackerJsonCommands.cpp
|
||||||
ArcsecDatalinkLayer.cpp
|
ArcsecDatalinkLayer.cpp ArcsecJsonParamBase.cpp StrHelper.cpp)
|
||||||
ArcsecJsonParamBase.cpp
|
|
||||||
StrHelper.cpp
|
|
||||||
)
|
|
||||||
|
@ -1,28 +1,16 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp
|
||||||
ipc/MissionMessageTypes.cpp
|
pollingsequence/pollingSequenceFactory.cpp)
|
||||||
pollingsequence/pollingSequenceFactory.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(${OBSW_NAME} PUBLIC
|
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
# If a special translation file for object IDs exists, compile it.
|
# If a special translation file for object IDs exists, compile it.
|
||||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
|
||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE objects/translateObjects.cpp)
|
||||||
objects/translateObjects.cpp
|
target_sources(${UNITTEST_NAME} PRIVATE objects/translateObjects.cpp)
|
||||||
)
|
|
||||||
target_sources(${UNITTEST_NAME} PRIVATE
|
|
||||||
objects/translateObjects.cpp
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# If a special translation file for events exists, compile it.
|
# If a special translation file for events exists, compile it.
|
||||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
|
||||||
target_sources(${OBSW_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE events/translateEvents.cpp)
|
||||||
events/translateEvents.cpp
|
target_sources(${UNITTEST_NAME} PRIVATE events/translateEvents.cpp)
|
||||||
)
|
|
||||||
target_sources(${UNITTEST_NAME} PRIVATE
|
|
||||||
events/translateEvents.cpp
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,10 +1,3 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC
|
target_sources(
|
||||||
PapbVcInterface.cpp
|
${OBSW_NAME} PUBLIC PapbVcInterface.cpp Ptme.cpp PdecHandler.cpp
|
||||||
Ptme.cpp
|
PdecConfig.cpp PtmeConfig.cpp AxiPtmeConfig.cpp)
|
||||||
PdecHandler.cpp
|
|
||||||
PdecConfig.cpp
|
|
||||||
PtmeConfig.cpp
|
|
||||||
AxiPtmeConfig.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC utility.cpp)
|
||||||
utility.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1 @@
|
|||||||
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
target_sources(${LIB_EIVE_MISSION} PRIVATE ThermalController.cpp)
|
||||||
ThermalController.cpp
|
|
||||||
)
|
|
||||||
|
@ -1,5 +1 @@
|
|||||||
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
target_sources(${LIB_EIVE_MISSION} PRIVATE GenericFactory.cpp)
|
||||||
GenericFactory.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
target_sources(
|
||||||
GomspaceDeviceHandler.cpp
|
${LIB_EIVE_MISSION}
|
||||||
BpxBatteryHandler.cpp
|
PRIVATE GomspaceDeviceHandler.cpp
|
||||||
Tmp1075Handler.cpp
|
BpxBatteryHandler.cpp
|
||||||
PCDUHandler.cpp
|
Tmp1075Handler.cpp
|
||||||
P60DockHandler.cpp
|
PCDUHandler.cpp
|
||||||
PDU1Handler.cpp
|
P60DockHandler.cpp
|
||||||
PDU2Handler.cpp
|
PDU1Handler.cpp
|
||||||
ACUHandler.cpp
|
PDU2Handler.cpp
|
||||||
SyrlinksHkHandler.cpp
|
ACUHandler.cpp
|
||||||
Max31865PT1000Handler.cpp
|
SyrlinksHkHandler.cpp
|
||||||
IMTQHandler.cpp
|
Max31865PT1000Handler.cpp
|
||||||
HeaterHandler.cpp
|
IMTQHandler.cpp
|
||||||
RadiationSensorHandler.cpp
|
HeaterHandler.cpp
|
||||||
GyroADIS1650XHandler.cpp
|
RadiationSensorHandler.cpp
|
||||||
RwHandler.cpp
|
GyroADIS1650XHandler.cpp
|
||||||
max1227.cpp
|
RwHandler.cpp
|
||||||
SusHandler.cpp
|
max1227.cpp
|
||||||
PayloadPcduHandler.cpp
|
SusHandler.cpp
|
||||||
SolarArrayDeploymentHandler.cpp
|
PayloadPcduHandler.cpp
|
||||||
)
|
SolarArrayDeploymentHandler.cpp)
|
||||||
|
@ -1,5 +1 @@
|
|||||||
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
target_sources(${LIB_EIVE_MISSION} PRIVATE NVMParameterBase.cpp)
|
||||||
NVMParameterBase.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
target_sources(
|
||||||
EiveSystem.cpp
|
${LIB_EIVE_MISSION}
|
||||||
AcsSubsystem.cpp
|
PRIVATE EiveSystem.cpp
|
||||||
ComSubsystem.cpp
|
AcsSubsystem.cpp
|
||||||
PayloadSubsystem.cpp
|
ComSubsystem.cpp
|
||||||
|
PayloadSubsystem.cpp
|
||||||
AcsBoardAssembly.cpp
|
AcsBoardAssembly.cpp
|
||||||
RwAssembly.cpp
|
RwAssembly.cpp
|
||||||
SusAssembly.cpp
|
SusAssembly.cpp
|
||||||
DualLanePowerStateMachine.cpp
|
DualLanePowerStateMachine.cpp
|
||||||
PowerStateMachineBase.cpp
|
PowerStateMachineBase.cpp
|
||||||
DualLaneAssemblyBase.cpp
|
DualLaneAssemblyBase.cpp
|
||||||
TcsBoardAssembly.cpp
|
TcsBoardAssembly.cpp)
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(fdir)
|
add_subdirectory(fdir)
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
target_sources(
|
||||||
AcsBoardFdir.cpp
|
${LIB_EIVE_MISSION} PRIVATE AcsBoardFdir.cpp RtdFdir.cpp SusFdir.cpp
|
||||||
RtdFdir.cpp
|
SyrlinksFdir.cpp GomspacePowerFdir.cpp)
|
||||||
SusFdir.cpp
|
|
||||||
SyrlinksFdir.cpp
|
|
||||||
GomspacePowerFdir.cpp
|
|
||||||
)
|
|
||||||
|
@ -1,6 +1 @@
|
|||||||
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
target_sources(${LIB_EIVE_MISSION} PRIVATE CCSDSHandler.cpp VirtualChannel.cpp)
|
||||||
CCSDSHandler.cpp
|
|
||||||
VirtualChannel.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,2 @@
|
|||||||
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
target_sources(${LIB_EIVE_MISSION} PRIVATE TmFunnel.cpp Timestamp.cpp
|
||||||
TmFunnel.cpp
|
ProgressPrinter.cpp Filenaming.cpp)
|
||||||
Timestamp.cpp
|
|
||||||
ProgressPrinter.cpp
|
|
||||||
Filenaming.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
if [[ ! -f README.md ]]; then
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
|
|
||||||
find ./mission -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
|
||||||
find ./linux -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
|
||||||
find ./bsp_q7s -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
|
||||||
find ./bsp_linux_board -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
|
||||||
find ./bsp_hosted -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
|
||||||
find ./bsp_egse -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
|
||||||
find ./test -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
|
||||||
find ./unittest -iname *.h -o -iname *.cpp -o -iname *.c -o -type d -name build -prune | \
|
|
||||||
xargs clang-format --style=file -i
|
|
40
scripts/auto-formatter.sh
Executable file
40
scripts/auto-formatter.sh
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [[ ! -f README.md ]]; then
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
|
folder_list=(
|
||||||
|
"./mission"
|
||||||
|
"./linux"
|
||||||
|
"./bsp_q7s"
|
||||||
|
"./bsp_linux_board"
|
||||||
|
"./bsp_hosted"
|
||||||
|
"./bsp_egse"
|
||||||
|
"./test"
|
||||||
|
"./common"
|
||||||
|
)
|
||||||
|
|
||||||
|
cmake_fmt="cmake-format"
|
||||||
|
file_selectors="-iname CMakeLists.txt"
|
||||||
|
if command -v ${cmake_fmt} &> /dev/null; then
|
||||||
|
echo "Auto-formatting all CMakeLists.txt files"
|
||||||
|
${cmake_fmt} -i CMakeLists.txt
|
||||||
|
for dir in ${folder_list[@]}; do
|
||||||
|
find ${dir} ${file_selectors} | xargs ${cmake_fmt} -i
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "No ${cmake_fmt} tool found, not formatting CMake files"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cpp_format="clang-format"
|
||||||
|
file_selectors="-iname *.h -o -iname *.cpp -o -iname *.c -o -iname *.tpp"
|
||||||
|
if command -v ${cpp_format} &> /dev/null; then
|
||||||
|
for dir in ${folder_list[@]}; do
|
||||||
|
echo "Auto-formatting C/C++ files in ${dir} recursively"
|
||||||
|
find ${dir} ${file_selectors} | xargs ${cpp_format} --style=file -i
|
||||||
|
done
|
||||||
|
find ./unittest ${file_selectors} -o -type d -name build -prune | \
|
||||||
|
xargs clang-format --style=file -i
|
||||||
|
else
|
||||||
|
echo "No ${cpp_format} tool found, not formatting C++/C files"
|
||||||
|
fi
|
@ -1,7 +1,3 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC DummyGpioIF.cpp)
|
||||||
DummyGpioIF.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(${OBSW_NAME} PUBLIC
|
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC TestTask.cpp)
|
||||||
TestTask.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(${OBSW_NAME} PUBLIC
|
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit b81f756e4b70e55a443cba50bab0a519a0dc3591
|
Subproject commit 0ebf04449668909a8f570891d27e89b93f0105c3
|
Loading…
Reference in New Issue
Block a user