v1.10.0 #220
3
.gitignore
vendored
3
.gitignore
vendored
@ -8,6 +8,9 @@
|
|||||||
!misc/eclipse/**/.cproject
|
!misc/eclipse/**/.cproject
|
||||||
!misc/eclipse/**/.project
|
!misc/eclipse/**/.project
|
||||||
|
|
||||||
|
#vscode
|
||||||
|
.vscode
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
__pycache__
|
__pycache__
|
||||||
.idea
|
.idea
|
||||||
|
208
CMakeLists.txt
208
CMakeLists.txt
@ -13,18 +13,13 @@ cmake_minimum_required(VERSION 3.13)
|
|||||||
|
|
||||||
set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/q7s")
|
|
||||||
option(EIVE_BUILD_WATCHDOG "Compile the OBSW watchdog insted" OFF)
|
|
||||||
option(BUILD_Q7S_SIMPLE_MODE OFF "Simple mode with a minimal main function")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
option(EIVE_BUILD_UNITTESTS "Build Catch2 unittests" OFF)
|
option(EIVE_BUILD_UNITTESTS "Build Catch2 unittests" OFF)
|
||||||
option(EIVE_ADD_ETL_LIB "Add ETL library" ON)
|
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)
|
||||||
option(EIVE_SYSROOT_MAGIC "Perform sysroot magic which might not be necessary" OFF)
|
option(EIVE_SYSROOT_MAGIC "Perform sysroot magic which might not be necessary" OFF)
|
||||||
|
|
||||||
if(NOT FSFW_OSAL)
|
if(NOT FSFW_OSAL)
|
||||||
set(FSFW_OSAL host CACHE STRING "OS for the FSFW.")
|
set(FSFW_OSAL linux CACHE STRING "OS for the FSFW.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
|
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
|
||||||
@ -35,18 +30,8 @@ endif()
|
|||||||
include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
|
include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
|
||||||
pre_project_config()
|
pre_project_config()
|
||||||
|
|
||||||
if(EIVE_BUILD_WATCHDOG)
|
|
||||||
set(PROJECT_NAME_TO_SET eive-watchdog)
|
|
||||||
elseif(EIVE_BUILD_UNITTESTS)
|
|
||||||
set(PROJECT_NAME_TO_SET eive-unittest)
|
|
||||||
elseif(TGT_BSP MATCHES "arm/q7s")
|
|
||||||
set(PROJECT_NAME_TO_SET eive-obsw-$ENV{USERNAME})
|
|
||||||
else()
|
|
||||||
set(PROJECT_NAME_TO_SET eive-obsw)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Project Name
|
# Project Name
|
||||||
project(${PROJECT_NAME_TO_SET} ASM C CXX)
|
project(eive-obsw ASM C CXX)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Pre-Sources preparation
|
# Pre-Sources preparation
|
||||||
@ -57,8 +42,11 @@ set(CMAKE_CXX_STANDARD 17)
|
|||||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
|
|
||||||
# Set names and variables
|
# Set names and variables
|
||||||
set(TARGET_NAME ${CMAKE_PROJECT_NAME})
|
set(OBSW_NAME ${CMAKE_PROJECT_NAME})
|
||||||
|
set(WATCHDOG_NAME eive-watchdog)
|
||||||
|
set(SIMPLE_OBSW_NAME eive-simple)
|
||||||
set(LIB_FSFW_NAME fsfw)
|
set(LIB_FSFW_NAME fsfw)
|
||||||
|
set(LIB_EIVE_MISSION eive-mission)
|
||||||
set(LIB_ETL_NAME etl)
|
set(LIB_ETL_NAME etl)
|
||||||
set(LIB_CSP_NAME libcsp)
|
set(LIB_CSP_NAME libcsp)
|
||||||
set(LIB_LWGPS_NAME lwgps)
|
set(LIB_LWGPS_NAME lwgps)
|
||||||
@ -71,7 +59,6 @@ set(LIB_JSON_NAME nlohmann_json::nlohmann_json)
|
|||||||
|
|
||||||
# Set path names
|
# Set path names
|
||||||
set(FSFW_PATH fsfw)
|
set(FSFW_PATH fsfw)
|
||||||
set(MISSION_PATH mission)
|
|
||||||
set(TEST_PATH test/testtasks)
|
set(TEST_PATH test/testtasks)
|
||||||
set(UNITTEST_PATH unittest)
|
set(UNITTEST_PATH unittest)
|
||||||
set(LINUX_PATH linux)
|
set(LINUX_PATH linux)
|
||||||
@ -80,6 +67,7 @@ set(WATCHDOG_PATH watchdog)
|
|||||||
set(COMMON_CONFIG_PATH ${COMMON_PATH}/config)
|
set(COMMON_CONFIG_PATH ${COMMON_PATH}/config)
|
||||||
set(UNITTEST_CFG_PATH ${UNITTEST_PATH}/testcfg)
|
set(UNITTEST_CFG_PATH ${UNITTEST_PATH}/testcfg)
|
||||||
|
|
||||||
|
set(LIB_EIVE_MISSION_PATH mission)
|
||||||
set(LIB_CSP_PATH ${THIRD_PARTY_FOLDER}/libcsp)
|
set(LIB_CSP_PATH ${THIRD_PARTY_FOLDER}/libcsp)
|
||||||
set(LIB_ETL_PATH ${THIRD_PARTY_FOLDER}/etl)
|
set(LIB_ETL_PATH ${THIRD_PARTY_FOLDER}/etl)
|
||||||
set(LIB_CATCH2_PATH ${THIRD_PARTY_FOLDER}/Catch2)
|
set(LIB_CATCH2_PATH ${THIRD_PARTY_FOLDER}/Catch2)
|
||||||
@ -140,18 +128,17 @@ if(EIVE_BUILD_UNITTESTS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Configuration files
|
# Configuration files
|
||||||
if(NOT EIVE_BUILD_WATCHDOG)
|
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(${FSFW_CONFIG_PATH}/OBSWConfig.h.in OBSWConfig.h)
|
||||||
configure_file(${FSFW_CONFIG_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")
|
||||||
elseif(TGT_BSP MATCHES "arm/raspberrypi")
|
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
|
||||||
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
|
|
||||||
endif()
|
|
||||||
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
|
||||||
@ -164,8 +151,48 @@ set(FSFW_ADDITIONAL_INC_PATHS
|
|||||||
# Executable and Sources
|
# Executable and Sources
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
#global compiler options need to be set before adding executables
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
add_compile_options(
|
||||||
|
"-Wall"
|
||||||
|
"-Wextra"
|
||||||
|
"-Wimplicit-fallthrough=1"
|
||||||
|
"-Wno-unused-parameter"
|
||||||
|
"-Wno-psabi"
|
||||||
|
)
|
||||||
|
message(STATUS "goes here")
|
||||||
|
# Remove unused sections.
|
||||||
|
add_compile_options(
|
||||||
|
"-ffunction-sections"
|
||||||
|
"-fdata-sections"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Removed unused sections.
|
||||||
|
add_link_options(
|
||||||
|
"-Wl,--gc-sections"
|
||||||
|
)
|
||||||
|
|
||||||
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
|
set(COMPILER_FLAGS "/permissive-")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
add_library(${LIB_EIVE_MISSION})
|
||||||
|
|
||||||
|
|
||||||
# Add executable
|
# Add executable
|
||||||
add_executable(${TARGET_NAME})
|
add_executable(${OBSW_NAME})
|
||||||
|
|
||||||
|
#watchdog
|
||||||
|
add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL)
|
||||||
|
add_subdirectory(${WATCHDOG_PATH})
|
||||||
|
target_link_libraries(${WATCHDOG_NAME} PUBLIC
|
||||||
|
${LIB_CXX_FS}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${WATCHDOG_NAME} PUBLIC
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
if(EIVE_ADD_ETL_LIB)
|
if(EIVE_ADD_ETL_LIB)
|
||||||
add_subdirectory(${LIB_ETL_PATH})
|
add_subdirectory(${LIB_ETL_PATH})
|
||||||
@ -175,75 +202,74 @@ if(EIVE_ADD_JSON_LIB)
|
|||||||
add_subdirectory(${LIB_JSON_PATH})
|
add_subdirectory(${LIB_JSON_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT EIVE_BUILD_WATCHDOG)
|
|
||||||
if(NOT EIVE_BUILD_UNITTESTS)
|
if(NOT EIVE_BUILD_UNITTESTS)
|
||||||
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()
|
endif()
|
||||||
add_subdirectory(${COMMON_PATH})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT EIVE_BUILD_WATCHDOG))
|
add_subdirectory(${COMMON_PATH})
|
||||||
add_subdirectory(${LIB_LWGPS_PATH})
|
|
||||||
add_subdirectory(${FSFW_PATH})
|
|
||||||
add_subdirectory(${MISSION_PATH})
|
|
||||||
add_subdirectory(${TEST_PATH})
|
add_subdirectory(${LIB_LWGPS_PATH})
|
||||||
endif()
|
add_subdirectory(${FSFW_PATH})
|
||||||
|
add_subdirectory(${LIB_EIVE_MISSION_PATH})
|
||||||
|
add_subdirectory(${TEST_PATH})
|
||||||
|
|
||||||
|
|
||||||
if(EIVE_BUILD_UNITTESTS)
|
if(EIVE_BUILD_UNITTESTS)
|
||||||
# add_subdirectory(${LIB_CATCH2_PATH})
|
# add_subdirectory(${LIB_CATCH2_PATH})
|
||||||
add_subdirectory(${UNITTEST_PATH})
|
add_subdirectory(${UNITTEST_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EIVE_BUILD_WATCHDOG)
|
|
||||||
add_subdirectory(${WATCHDOG_PATH})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Post-Sources preparation
|
# Post-Sources preparation
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
set_property(CACHE FSFW_OSAL PROPERTY STRINGS host linux)
|
|
||||||
|
|
||||||
if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT EIVE_BUILD_WATCHDOG))
|
|
||||||
# Add libraries for all sources.
|
# Add libraries
|
||||||
target_link_libraries(${TARGET_NAME} PRIVATE
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
|
||||||
${LIB_FSFW_NAME}
|
${LIB_FSFW_NAME}
|
||||||
${LIB_OS_NAME}
|
${LIB_LWGPS_NAME}
|
||||||
${LIB_LWGPS_NAME}
|
${LIB_OS_NAME}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${OBSW_NAME} PRIVATE
|
||||||
|
${LIB_EIVE_MISSION}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(TGT_BSP MATCHES "arm/q7s")
|
||||||
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
|
||||||
|
${LIB_ARCSEC}
|
||||||
|
${LIB_GPS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/q7s")
|
|
||||||
target_link_libraries(${TARGET_NAME} PRIVATE
|
|
||||||
${LIB_ARCSEC}
|
|
||||||
${LIB_GPS}
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(NOT EIVE_BUILD_WATCHDOG)
|
|
||||||
if(ADD_CSP_LIB)
|
if(ADD_CSP_LIB)
|
||||||
target_link_libraries(${TARGET_NAME} PRIVATE
|
target_link_libraries(${OBSW_NAME} PRIVATE
|
||||||
${LIB_CSP_NAME}
|
${LIB_CSP_NAME}
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(EIVE_ADD_ETL_LIB)
|
if(EIVE_ADD_ETL_LIB)
|
||||||
target_link_libraries(${TARGET_NAME} PRIVATE
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
|
||||||
${LIB_ETL_NAME}
|
${LIB_ETL_NAME}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EIVE_ADD_JSON_LIB)
|
if(EIVE_ADD_JSON_LIB)
|
||||||
target_link_libraries(${TARGET_NAME} PRIVATE
|
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
|
||||||
${LIB_JSON_NAME}
|
${LIB_JSON_NAME}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
@ -254,12 +280,12 @@ if(EIVE_BUILD_UNITTESTS)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${TARGET_NAME} PRIVATE
|
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(${TARGET_NAME} PRIVATE
|
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${FSFW_CONFIG_PATH}
|
${FSFW_CONFIG_PATH}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
@ -267,44 +293,16 @@ target_include_directories(${TARGET_NAME} PRIVATE
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/q7s")
|
if(TGT_BSP MATCHES "arm/q7s")
|
||||||
target_include_directories(${TARGET_NAME} PRIVATE
|
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
|
||||||
${ARCSEC_LIB_PATH}
|
${ARCSEC_LIB_PATH}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
||||||
set(WARNING_FLAGS
|
|
||||||
-Wall
|
|
||||||
-Wextra
|
|
||||||
-Wimplicit-fallthrough=1
|
|
||||||
-Wno-unused-parameter
|
|
||||||
-Wno-psabi
|
|
||||||
)
|
|
||||||
|
|
||||||
# Remove unused sections.
|
|
||||||
target_compile_options(${TARGET_NAME} PRIVATE
|
|
||||||
"-ffunction-sections"
|
|
||||||
"-fdata-sections"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Removed unused sections.
|
|
||||||
target_link_options(${TARGET_NAME} PRIVATE
|
|
||||||
"-Wl,--gc-sections"
|
|
||||||
)
|
|
||||||
|
|
||||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
||||||
set(COMPILER_FLAGS "/permissive-")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMAKE_VERBOSE)
|
if(CMAKE_VERBOSE)
|
||||||
message(STATUS "Warning flags: ${WARNING_FLAGS}")
|
message(STATUS "Warning flags: ${WARNING_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Compile options for all sources.
|
|
||||||
target_compile_options(${TARGET_NAME} PRIVATE
|
|
||||||
${WARNING_FLAGS}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(${CMAKE_CROSSCOMPILING})
|
if(${CMAKE_CROSSCOMPILING})
|
||||||
include (${CMAKE_SCRIPT_PATH}/HardwareOsPostConfig.cmake)
|
include (${CMAKE_SCRIPT_PATH}/HardwareOsPostConfig.cmake)
|
||||||
@ -336,9 +334,9 @@ string(CONCAT POST_BUILD_COMMENT
|
|||||||
)
|
)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${TARGET_NAME}
|
TARGET ${OBSW_NAME}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_SIZE} ${TARGET_NAME}${FILE_SUFFIX}
|
COMMAND ${CMAKE_SIZE} ${OBSW_NAME}${FILE_SUFFIX}
|
||||||
COMMENT ${POST_BUILD_COMMENT}
|
COMMENT ${POST_BUILD_COMMENT}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
28
README.md
28
README.md
@ -106,7 +106,7 @@ When using Windows, run theses steps in MSYS2.
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkdir build-Debug-Q7S && cd build-Debug-Q7S
|
mkdir build-Debug-Q7S && cd build-Debug-Q7S
|
||||||
cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug -DOS_FSFW=linux ..
|
cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
cmake --build . -j
|
cmake --build . -j
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -121,8 +121,7 @@ When using Windows, run theses steps in MSYS2.
|
|||||||
This will invoke a Python script which in turn invokes CMake with the correct
|
This will invoke a Python script which in turn invokes CMake with the correct
|
||||||
arguments to configure CMake for Q7S cross-compilation.
|
arguments to configure CMake for Q7S cross-compilation.
|
||||||
|
|
||||||
You can build the hosted variant of the OBSW by replacing `-DOS_FSFW=linux` with
|
There are also different values for `-DTGT_BSP` to build for the Raspberry Pi
|
||||||
`-DOS_FSFW=host`. There are also different values for `-DTGT_BSP` to build for the Raspberry Pi
|
|
||||||
or the Beagle Bone Black: `arm/raspberrypi` and `arm/beagleboneblack`.
|
or the Beagle Bone Black: `arm/raspberrypi` and `arm/beagleboneblack`.
|
||||||
|
|
||||||
5. Build the software with
|
5. Build the software with
|
||||||
@ -161,38 +160,45 @@ automatically.
|
|||||||
|
|
||||||
### Q7S OBSW
|
### Q7S OBSW
|
||||||
|
|
||||||
|
The EIVE OBSW is the default target if no target is specified.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkdir build-Debug-Q7S && cd build-Debug-Q7S
|
mkdir build-Debug-Q7S && cd build-Debug-Q7S
|
||||||
cmake -DTGT_BSP=arm/q7s -DFSFW_OSAL=linux -DCMAKE_BUILD_TYPE=Debug ..
|
cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
cmake --build . -j
|
cmake --build . -j
|
||||||
```
|
```
|
||||||
|
|
||||||
### Q7S Watchdog
|
### Q7S Watchdog
|
||||||
|
|
||||||
|
To build the EIVE watchdog, the corresponding target must be specified in the build command.
|
||||||
|
The configure steps do not need to be repeated if the folder has already been configured.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkdir build-Debug-Q7S && cd build-Debug-Q7S
|
mkdir build-Debug-Q7S && cd build-Debug-Q7S
|
||||||
cmake -DTGT_BSP=arm/q7s -DFSFW_OSAL=linux -DEIVE_BUILD_WATCHDOG=ON -DCMAKE_BUILD_TYPE=Debug ..
|
cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
cmake --build . -j
|
cmake --build . --target eive-watchdog -j
|
||||||
```
|
```
|
||||||
|
|
||||||
### Hosted
|
### Hosted
|
||||||
|
|
||||||
You can also replace `linux` by `host` for this command to build on Windows or for generic OSes
|
You can also use the FSFW OSAL `host` to build on Windows or for generic OSes.
|
||||||
|
Note: Currently this is not supported.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkdir build-Debug-Host && cd build-Debug-Host
|
mkdir build-Debug-Host && cd build-Debug-Host
|
||||||
cmake -DFSFW_OSAL=linux -DCMAKE_BUILD_TYPE=Debug ..
|
cmake -DFSFW_OSAL=host -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
cmake --build . -j
|
cmake --build . -j
|
||||||
```
|
```
|
||||||
|
|
||||||
### Unittests
|
### Unittests
|
||||||
|
|
||||||
You can also replace `linux` by `host` for this command to build on Windows
|
To build the unittests, the corresponding target must be specified in the build command.
|
||||||
|
The configure steps do not need to be repeated if the folder has already been configured.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkdir build-Debug-Unittest && cd build-Debug-Unittest
|
mkdir build-Debug-Unittest && cd build-Debug-Unittest
|
||||||
cmake -DFSFW_OSAL=linux -DEIVE_BUILD_UNITTESTS=ON ..
|
cmake ..
|
||||||
cmake --build . -j
|
cmake --build . --target eive-unittests -j
|
||||||
```
|
```
|
||||||
|
|
||||||
## Connect to EIVE flatsat
|
## Connect to EIVE flatsat
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC
|
||||||
InitMission.cpp
|
InitMission.cpp
|
||||||
main.cpp
|
main.cpp
|
||||||
ObjectFactory.cpp
|
ObjectFactory.cpp
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
print.c
|
print.c
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(${TARGET_NAME} PUBLIC
|
target_include_directories(${OBSW_NAME} PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
ipc/MissionMessageTypes.cpp
|
ipc/MissionMessageTypes.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(${TARGET_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(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
objects/translateObjects.cpp
|
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(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
events/translateEvents.cpp
|
events/translateEvents.cpp
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,16 +1,26 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
#simple mode
|
||||||
|
add_executable(${SIMPLE_OBSW_NAME} EXCLUDE_FROM_ALL)
|
||||||
|
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
|
||||||
|
target_sources(${SIMPLE_OBSW_NAME} PUBLIC
|
||||||
|
main.cpp
|
||||||
|
)
|
||||||
|
#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")
|
||||||
|
add_subdirectory(simple)
|
||||||
|
|
||||||
|
|
||||||
|
target_sources(${OBSW_NAME} PUBLIC
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory(boardtest)
|
add_subdirectory(boardtest)
|
||||||
|
|
||||||
if(Q7S_SIMPLE_MODE)
|
add_subdirectory(boardconfig)
|
||||||
add_subdirectory(simple)
|
add_subdirectory(comIF)
|
||||||
else()
|
add_subdirectory(core)
|
||||||
add_subdirectory(boardconfig)
|
add_subdirectory(memory)
|
||||||
add_subdirectory(comIF)
|
add_subdirectory(callbacks)
|
||||||
add_subdirectory(core)
|
add_subdirectory(devices)
|
||||||
add_subdirectory(memory)
|
|
||||||
add_subdirectory(callbacks)
|
|
||||||
add_subdirectory(devices)
|
|
||||||
endif()
|
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
print.c
|
print.c
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(${TARGET_NAME} PUBLIC
|
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
|
||||||
|
print.c
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
target_include_directories(${OBSW_NAME} PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#cmakedefine01 Q7S_SIMPLE_MODE
|
|
||||||
|
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/** All of the following flags should be enabled for mission code */
|
/** All of the following flags should be enabled for mission code */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
FileSystemTest.cpp
|
FileSystemTest.cpp
|
||||||
Q7STestTask.cpp
|
Q7STestTask.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(EIVE_BUILD_Q7S_SIMPLE_MODE)
|
||||||
|
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
|
||||||
|
FileSystemTest.cpp
|
||||||
|
)
|
||||||
|
endif()
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
rwSpiCallback.cpp
|
rwSpiCallback.cpp
|
||||||
gnssCallback.cpp
|
gnssCallback.cpp
|
||||||
pcduSwitchCb.cpp
|
pcduSwitchCb.cpp
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
CoreController.cpp
|
CoreController.cpp
|
||||||
obsw.cpp
|
obsw.cpp
|
||||||
InitMission.cpp
|
InitMission.cpp
|
||||||
ObjectFactory.cpp
|
ObjectFactory.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
|
||||||
|
InitMission.cpp
|
||||||
|
)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
PlocSupervisorHandler.cpp
|
PlocSupervisorHandler.cpp
|
||||||
PlocUpdater.cpp
|
PlocUpdater.cpp
|
||||||
PlocMemoryDumper.cpp
|
PlocMemoryDumper.cpp
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
StarTrackerHandler.cpp
|
StarTrackerHandler.cpp
|
||||||
StarTrackerJsonCommands.cpp
|
StarTrackerJsonCommands.cpp
|
||||||
ArcsecDatalinkLayer.cpp
|
ArcsecDatalinkLayer.cpp
|
||||||
|
3
bsp_q7s/gpio/CMakeLists.txt
Normal file
3
bsp_q7s/gpio/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
|
gpioCallbacks.cpp
|
||||||
|
)
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
FileSystemHandler.cpp
|
FileSystemHandler.cpp
|
||||||
SdCardManager.cpp
|
SdCardManager.cpp
|
||||||
scratchApi.cpp
|
scratchApi.cpp
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
|
||||||
simple.cpp
|
simple.cpp
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "simple.h"
|
#include "simple.h"
|
||||||
|
|
||||||
|
#include "iostream"
|
||||||
|
|
||||||
#include "q7sConfig.h"
|
#include "q7sConfig.h"
|
||||||
|
|
||||||
#if Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST == 1
|
#if Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST == 1
|
||||||
@ -7,7 +9,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int simple::simple() {
|
int simple::simple() {
|
||||||
cout << "-- Q7S Simple Application --" << endl;
|
std::cout << "-- Q7S Simple Application --" << std::endl;
|
||||||
#if Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST == 1
|
#if Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST == 1
|
||||||
{ FileSystemTest fileSystemTest; }
|
{ FileSystemTest fileSystemTest; }
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,7 +3,7 @@ function(post_source_hw_os_config)
|
|||||||
if(LINK_LWIP)
|
if(LINK_LWIP)
|
||||||
message(STATUS "Linking against ${LIB_LWIP_NAME} lwIP library")
|
message(STATUS "Linking against ${LIB_LWIP_NAME} lwIP library")
|
||||||
if(LIB_LWIP_NAME)
|
if(LIB_LWIP_NAME)
|
||||||
target_link_libraries(${TARGET_NAME} PUBLIC
|
target_link_libraries(${OBSW_NAME} PUBLIC
|
||||||
${LIB_LWIP_NAME}
|
${LIB_LWIP_NAME}
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
@ -12,7 +12,7 @@ if(LINK_LWIP)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LINKER_SCRIPT)
|
if(LINKER_SCRIPT)
|
||||||
target_link_options(${TARGET_NAME} PRIVATE
|
add_link_options(
|
||||||
-T${LINKER_SCRIPT}
|
-T${LINKER_SCRIPT}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
@ -35,20 +35,20 @@ if(CMAKE_VERBOSE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Generator expression. Can be used to set different C, CXX and ASM flags.
|
# Generator expression. Can be used to set different C, CXX and ASM flags.
|
||||||
target_compile_options(${TARGET_NAME} PRIVATE
|
add_compile_options(
|
||||||
$<$<COMPILE_LANGUAGE:C>:${C_DEFS} ${C_FLAGS}>
|
$<$<COMPILE_LANGUAGE:C>:${C_DEFS} ${C_FLAGS}>
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:${CXX_DEFS} ${CXX_FLAGS}>
|
$<$<COMPILE_LANGUAGE:CXX>:${CXX_DEFS} ${CXX_FLAGS}>
|
||||||
$<$<COMPILE_LANGUAGE:ASM>:${ASM_FLAGS}>
|
$<$<COMPILE_LANGUAGE:ASM>:${ASM_FLAGS}>
|
||||||
)
|
)
|
||||||
|
|
||||||
set(STRIPPED_TARGET_NAME ${TARGET_NAME}-stripped)
|
set(STRIPPED_OBSW_NAME ${OBSW_NAME}-stripped)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${TARGET_NAME}
|
TARGET ${OBSW_NAME}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_STRIP} --strip-all ${TARGET_NAME} -o ${STRIPPED_TARGET_NAME}
|
COMMAND ${CMAKE_STRIP} --strip-all ${OBSW_NAME} -o ${STRIPPED_OBSW_NAME}
|
||||||
BYPRODUCTS ${STRIPPED_TARGET_NAME}
|
BYPRODUCTS ${STRIPPED_OBSW_NAME}
|
||||||
COMMENT "Generating stripped executable ${STRIPPED_TARGET_NAME}.."
|
COMMENT "Generating stripped executable ${STRIPPED_OBSW_NAME}.."
|
||||||
)
|
)
|
||||||
|
|
||||||
endfunction()
|
endfunction()
|
@ -9,6 +9,7 @@ if(DEFINED TGT_BSP)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Disable compiler checks for cross-compiling.
|
# Disable compiler checks for cross-compiling.
|
||||||
if(FSFW_OSAL MATCHES linux AND TGT_BSP)
|
if(FSFW_OSAL MATCHES linux AND TGT_BSP)
|
||||||
if(TGT_BSP MATCHES "arm/q7s")
|
if(TGT_BSP MATCHES "arm/q7s")
|
||||||
@ -16,6 +17,7 @@ if(FSFW_OSAL MATCHES linux AND TGT_BSP)
|
|||||||
"${CMAKE_SCRIPT_PATH}/Q7SCrossCompileConfig.cmake"
|
"${CMAKE_SCRIPT_PATH}/Q7SCrossCompileConfig.cmake"
|
||||||
PARENT_SCOPE
|
PARENT_SCOPE
|
||||||
)
|
)
|
||||||
|
|
||||||
elseif(TGT_BSP MATCHES "arm/raspberrypi")
|
elseif(TGT_BSP MATCHES "arm/raspberrypi")
|
||||||
if(NOT DEFINED ENV{LINUX_ROOTFS})
|
if(NOT DEFINED ENV{LINUX_ROOTFS})
|
||||||
if(NOT DEFINED LINUX_ROOTFS)
|
if(NOT DEFINED LINUX_ROOTFS)
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
counter=0
|
|
||||||
cfg_script_name="cmake-build-cfg.py"
|
|
||||||
while [ ${counter} -lt 5 ]
|
|
||||||
do
|
|
||||||
cd ..
|
|
||||||
if [ -f ${cfg_script_name} ];then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
counter=$((counter=counter + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "${counter}" -ge 5 ];then
|
|
||||||
echo "${cfg_script_name} not found in upper directories!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
os_fsfw="linux"
|
|
||||||
tgt_bsp="arm/q7s"
|
|
||||||
build_dir="build-Simple-Q7S"
|
|
||||||
build_generator=""
|
|
||||||
definitions="BUILD_Q7S_SIMPLE_MODE=On"
|
|
||||||
if [ "${OS}" = "Windows_NT" ]; then
|
|
||||||
build_generator="MinGW Makefiles"
|
|
||||||
python="py"
|
|
||||||
# Could be other OS but this works for now.
|
|
||||||
else
|
|
||||||
build_generator="Unix Makefiles"
|
|
||||||
python="python3"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Running command (without the leading +):"
|
|
||||||
set -x # Print command
|
|
||||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
|
|
||||||
-l "${build_dir}" -d "${definitions}"
|
|
||||||
# set +x
|
|
@ -1,35 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
counter=0
|
|
||||||
cfg_script_name="cmake-build-cfg.py"
|
|
||||||
while [ ${counter} -lt 5 ]
|
|
||||||
do
|
|
||||||
cd ..
|
|
||||||
if [ -f ${cfg_script_name} ];then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
counter=$((counter=counter + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "${counter}" -ge 5 ];then
|
|
||||||
echo "${cfg_script_name} not found in upper directories!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
os_fsfw="linux"
|
|
||||||
tgt_bsp="arm/q7s"
|
|
||||||
build_dir="build-Simple-Q7S"
|
|
||||||
build_generator="Ninja"
|
|
||||||
definitions="BUILD_Q7S_SIMPLE_MODE=On"
|
|
||||||
if [ "${OS}" = "Windows_NT" ]; then
|
|
||||||
python="py"
|
|
||||||
# Could be other OS but this works for now.
|
|
||||||
else
|
|
||||||
python="python3"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Running command (without the leading +):"
|
|
||||||
set -x # Print command
|
|
||||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
|
|
||||||
-l "${build_dir}" -d "${definitions}"
|
|
||||||
# set +x
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
counter=0
|
|
||||||
cfg_script_name="cmake-build-cfg.py"
|
|
||||||
while [ ${counter} -lt 5 ]
|
|
||||||
do
|
|
||||||
cd ..
|
|
||||||
if [ -f ${cfg_script_name} ];then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
counter=$((counter=counter + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "${counter}" -ge 5 ];then
|
|
||||||
echo "${cfg_script_name} not found in upper directories!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
os_fsfw="linux"
|
|
||||||
tgt_bsp="arm/q7s"
|
|
||||||
build_dir="build-Debug-Watchdog"
|
|
||||||
build_generator=""
|
|
||||||
definitions="EIVE_BUILD_WATCHDOG=ON"
|
|
||||||
if [ "${OS}" = "Windows_NT" ]; then
|
|
||||||
build_generator="MinGW Makefiles"
|
|
||||||
python="py"
|
|
||||||
# Could be other OS but this works for now.
|
|
||||||
else
|
|
||||||
build_generator="Unix Makefiles"
|
|
||||||
python="python3"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Running command (without the leading +):"
|
|
||||||
set -x # Print command
|
|
||||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
|
|
||||||
-d "${definitions}" -l"${build_dir}"
|
|
||||||
# set +x
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
counter=0
|
|
||||||
while [ ${counter} -lt 5 ]
|
|
||||||
do
|
|
||||||
cd ..
|
|
||||||
if [ -f "cmake_build_config.py" ];then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
counter=$((counter=counter + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "${counter}" -ge 5 ];then
|
|
||||||
echo "cmake_build_config.py not found in upper directories!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
os_fsfw="linux"
|
|
||||||
tgt_bsp="arm/q7s"
|
|
||||||
build_dir="build-Release-Watchdog"
|
|
||||||
build_generator=""
|
|
||||||
definitions="EIVE_BUILD_WATCHDOG=ON"
|
|
||||||
if [ "${OS}" = "Windows_NT" ]; then
|
|
||||||
build_generator="MinGW Makefiles"
|
|
||||||
python="py"
|
|
||||||
# Could be other OS but this works for now.
|
|
||||||
else
|
|
||||||
build_generator="Unix Makefiles"
|
|
||||||
python="python3"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Running command (without the leading +):"
|
|
||||||
set -x # Print command
|
|
||||||
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \
|
|
||||||
-d "${definitions} -l"${build_dir}"
|
|
||||||
# set +x
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
counter=0
|
|
||||||
cfg_script_name="cmake-build-cfg.py"
|
|
||||||
while [ ${counter} -lt 5 ]
|
|
||||||
do
|
|
||||||
cd ..
|
|
||||||
if [ -f ${cfg_script_name} ];then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
counter=$((counter=counter + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "${counter}" -ge 5 ];then
|
|
||||||
echo "${cfg_script_name} not found in upper directories!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
os_fsfw="linux"
|
|
||||||
tgt_bsp="arm/q7s"
|
|
||||||
build_dir="build-Debug-Watchdog"
|
|
||||||
build_generator="Ninja"
|
|
||||||
definitions="EIVE_BUILD_WATCHDOG=ON"
|
|
||||||
if [ "${OS}" = "Windows_NT" ]; then
|
|
||||||
python="py"
|
|
||||||
# Could be other OS but this works for now.
|
|
||||||
else
|
|
||||||
python="python3"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Running command (without the leading +):"
|
|
||||||
set -x # Print command
|
|
||||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
|
|
||||||
-d "${definitions}" -l "${build_dir}"
|
|
||||||
# set +x
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
counter=0
|
|
||||||
cfg_script_name="cmake-build-cfg.py"
|
|
||||||
while [ ${counter} -lt 5 ]
|
|
||||||
do
|
|
||||||
cd ..
|
|
||||||
if [ -f ${cfg_script_name} ];then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
counter=$((counter=counter + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "${counter}" -ge 5 ];then
|
|
||||||
echo "${cfg_script_name} not found in upper directories!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
os_fsfw="linux"
|
|
||||||
tgt_bsp="arm/q7s"
|
|
||||||
build_dir="build-Release-Watchdog"
|
|
||||||
build_generator="Ninja"
|
|
||||||
definitions="EIVE_BUILD_WATCHDOG=ON"
|
|
||||||
if [ "${OS}" = "Windows_NT" ]; then
|
|
||||||
python="py"
|
|
||||||
# Could be other OS but this works for now.
|
|
||||||
else
|
|
||||||
python="python3"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Running command (without the leading +):"
|
|
||||||
set -x # Print command
|
|
||||||
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \
|
|
||||||
-d "${definitions}" -l"${build_dir}"
|
|
||||||
# set +x
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
target_include_directories(${TARGET_NAME} PRIVATE
|
target_include_directories(${OBSW_NAME} PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
commonConfig.cpp
|
commonConfig.cpp
|
||||||
)
|
)
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
LibgpiodTest.cpp
|
LibgpiodTest.cpp
|
||||||
I2cTestClass.cpp
|
I2cTestClass.cpp
|
||||||
SpiTestClass.cpp
|
SpiTestClass.cpp
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC
|
||||||
CspComIF.cpp
|
CspComIF.cpp
|
||||||
CspCookie.cpp
|
CspCookie.cpp
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
SolarArrayDeploymentHandler.cpp
|
SolarArrayDeploymentHandler.cpp
|
||||||
PayloadPcduHandler.cpp
|
PayloadPcduHandler.cpp
|
||||||
SusHandler.cpp
|
SusHandler.cpp
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
ipc/MissionMessageTypes.cpp
|
ipc/MissionMessageTypes.cpp
|
||||||
pollingsequence/pollingSequenceFactory.cpp
|
pollingsequence/pollingSequenceFactory.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(${TARGET_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(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
objects/translateObjects.cpp
|
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(${TARGET_NAME} PRIVATE
|
target_sources(${OBSW_NAME} PRIVATE
|
||||||
events/translateEvents.cpp
|
events/translateEvents.cpp
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC
|
||||||
PapbVcInterface.cpp
|
PapbVcInterface.cpp
|
||||||
Ptme.cpp
|
Ptme.cpp
|
||||||
PdecHandler.cpp
|
PdecHandler.cpp
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC
|
||||||
utility.cpp
|
utility.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -3,3 +3,5 @@ add_subdirectory(devices)
|
|||||||
add_subdirectory(utility)
|
add_subdirectory(utility)
|
||||||
add_subdirectory(memory)
|
add_subdirectory(memory)
|
||||||
add_subdirectory(tmtc)
|
add_subdirectory(tmtc)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
||||||
GenericFactory.cpp
|
GenericFactory.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
||||||
GPSHyperionLinuxController.cpp
|
GPSHyperionLinuxController.cpp
|
||||||
GomspaceDeviceHandler.cpp
|
GomspaceDeviceHandler.cpp
|
||||||
BpxBatteryHandler.cpp
|
BpxBatteryHandler.cpp
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
||||||
NVMParameterBase.cpp
|
NVMParameterBase.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
||||||
CCSDSHandler.cpp
|
CCSDSHandler.cpp
|
||||||
VirtualChannel.cpp
|
VirtualChannel.cpp
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${LIB_EIVE_MISSION} PRIVATE
|
||||||
TmFunnel.cpp
|
TmFunnel.cpp
|
||||||
Timestamp.cpp
|
Timestamp.cpp
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${OBSW_NAME} PUBLIC
|
||||||
TestTask.cpp
|
TestTask.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(${TARGET_NAME} PUBLIC
|
target_include_directories(${OBSW_NAME} PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE
|
target_sources(${WATCHDOG_NAME} PRIVATE
|
||||||
main.cpp
|
main.cpp
|
||||||
Watchdog.cpp
|
Watchdog.cpp
|
||||||
)
|
)
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
#define WATCHDOG_WATCHDOG_H_
|
#define WATCHDOG_WATCHDOG_H_
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
class WatchdogTask {
|
class WatchdogTask {
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user