From dec95f321701bac86363960ca561b7cd15f4551b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 25 Apr 2021 11:10:05 +0200 Subject: [PATCH 01/79] added modgen submodule --- .gitmodules | 3 +++ fsfw | 2 +- generators/modgen | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 160000 generators/modgen diff --git a/.gitmodules b/.gitmodules index 4a973500..6f538287 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "fsfw_hal"] path = fsfw_hal url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw_hal.git +[submodule "generators/modgen"] + path = generators/modgen + url = https://git.ksat-stuttgart.de/source/modgen.git diff --git a/fsfw b/fsfw index f2ab07c7..5273ffa7 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit f2ab07c78242d8211aebf9e0d6911d386dbc4ec5 +Subproject commit 5273ffa721dd83634ebbcc37c4646752f0bea20f diff --git a/generators/modgen b/generators/modgen new file mode 160000 index 00000000..5ed4a2ae --- /dev/null +++ b/generators/modgen @@ -0,0 +1 @@ +Subproject commit 5ed4a2ae59e90c3763616bdaf41eb3317e849100 From 2e4a8e1f948b8fcd34b61446be78828fae3590a9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 25 Apr 2021 11:32:21 +0200 Subject: [PATCH 02/79] tmtc and obj factory update --- bsp_q7s/ObjectFactory.cpp | 2 +- tmtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bsp_q7s/ObjectFactory.cpp b/bsp_q7s/ObjectFactory.cpp index e905393a..fc86c1ea 100644 --- a/bsp_q7s/ObjectFactory.cpp +++ b/bsp_q7s/ObjectFactory.cpp @@ -404,7 +404,7 @@ void ObjectFactory::produce(){ (void) rtdIc17; (void) rtdIc18; -#endif /* Q7S_ADD_RTS_DEVICES == 1 */ +#endif /* Q7S_ADD_RTD_DEVICES == 1 */ I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, std::string("/dev/i2c-0")); diff --git a/tmtc b/tmtc index 7cc06ef0..3b5d92f9 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 7cc06ef0e0882d286bab8156ca756e0211e5ebae +Subproject commit 3b5d92f9083392d8dd040470ae56fa610d0de8ad From 2f766f012d7a258b2c3a441b532c133262a69acc Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 25 Apr 2021 11:32:49 +0200 Subject: [PATCH 03/79] tmtc update --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 3b5d92f9..7cc06ef0 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 3b5d92f9083392d8dd040470ae56fa610d0de8ad +Subproject commit 7cc06ef0e0882d286bab8156ca756e0211e5ebae From daea8373b507d192065f6d63673560b70ff2fd60 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 25 Apr 2021 12:35:24 +0200 Subject: [PATCH 04/79] OBSW VERsion --- common/config/OBSWVersion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config/OBSWVersion.h b/common/config/OBSWVersion.h index 548363f2..7ac812e6 100644 --- a/common/config/OBSWVersion.h +++ b/common/config/OBSWVersion.h @@ -4,7 +4,7 @@ const char* const SW_NAME = "eive"; #define SW_VERSION 1 -#define SW_SUBVERSION 1 +#define SW_SUBVERSION 2 #define SW_SUBSUBVERSION 0 #endif /* COMMON_CONFIG_OBSWVERSION_H_ */ From c1ae98f1c886f5b31c3b377d99c948ccb0b772a1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 25 Apr 2021 12:37:59 +0200 Subject: [PATCH 05/79] obsw version update --- common/config/OBSWVersion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config/OBSWVersion.h b/common/config/OBSWVersion.h index 7ac812e6..548363f2 100644 --- a/common/config/OBSWVersion.h +++ b/common/config/OBSWVersion.h @@ -4,7 +4,7 @@ const char* const SW_NAME = "eive"; #define SW_VERSION 1 -#define SW_SUBVERSION 2 +#define SW_SUBVERSION 1 #define SW_SUBSUBVERSION 0 #endif /* COMMON_CONFIG_OBSWVERSION_H_ */ From 1a7186ee1ef2e7e31af0e8a55ed12ed9fb11adc3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 5 May 2021 20:25:52 +0200 Subject: [PATCH 06/79] added BBB support --- .gitignore | 4 +- CMakeLists.txt | 12 ++- {bsp_rpi => bsp_linux_board}/CMakeLists.txt | 6 -- {bsp_rpi => bsp_linux_board}/InitMission.cpp | 0 {bsp_rpi => bsp_linux_board}/InitMission.h | 0 .../ObjectFactory.cpp | 0 {bsp_rpi => bsp_linux_board}/ObjectFactory.h | 0 .../boardconfig/CMakeLists.txt | 0 .../boardconfig/etl_profile.h | 0 .../boardconfig/gcov.h | 0 .../boardconfig/print.c | 0 .../boardconfig/print.h | 0 .../boardconfig/rpi_config.h | 0 .../boardtest/CMakeLists.txt | 0 {bsp_rpi => bsp_linux_board}/main.cpp | 0 bsp_rpi/gpio/CMakeLists.txt | 8 -- cmake/BBBCrossCompileConfig.cmake | 98 +++++++++++++++++++ cmake/HardwareOsPreConfig.cmake | 4 +- cmake/PreProjectConfig.cmake | 9 +- .../BeagleBoneBlack/create_cmake_debug_cfg.sh | 30 ++++++ .../crosscompile/bbb_path_helper.sh | 3 + .../crosscompile/create_cmake_debug_cfg.sh | 30 ++++++ .../crosscompile/create_cmake_release_cfg.sh | 30 ++++++ .../create_cmake_relwithdeb_cfg.sh | 30 ++++++ 24 files changed, 243 insertions(+), 21 deletions(-) rename {bsp_rpi => bsp_linux_board}/CMakeLists.txt (83%) rename {bsp_rpi => bsp_linux_board}/InitMission.cpp (100%) rename {bsp_rpi => bsp_linux_board}/InitMission.h (100%) rename {bsp_rpi => bsp_linux_board}/ObjectFactory.cpp (100%) rename {bsp_rpi => bsp_linux_board}/ObjectFactory.h (100%) rename {bsp_rpi => bsp_linux_board}/boardconfig/CMakeLists.txt (100%) rename {bsp_rpi => bsp_linux_board}/boardconfig/etl_profile.h (100%) rename {bsp_rpi => bsp_linux_board}/boardconfig/gcov.h (100%) rename {bsp_rpi => bsp_linux_board}/boardconfig/print.c (100%) rename {bsp_rpi => bsp_linux_board}/boardconfig/print.h (100%) rename {bsp_rpi => bsp_linux_board}/boardconfig/rpi_config.h (100%) rename {bsp_rpi => bsp_linux_board}/boardtest/CMakeLists.txt (100%) rename {bsp_rpi => bsp_linux_board}/main.cpp (100%) delete mode 100644 bsp_rpi/gpio/CMakeLists.txt create mode 100644 cmake/BBBCrossCompileConfig.cmake create mode 100644 cmake/scripts/BeagleBoneBlack/create_cmake_debug_cfg.sh create mode 100644 cmake/scripts/BeagleBoneBlack/crosscompile/bbb_path_helper.sh create mode 100644 cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_debug_cfg.sh create mode 100644 cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_release_cfg.sh create mode 100644 cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_relwithdeb_cfg.sh diff --git a/.gitignore b/.gitignore index 2ccfca61..f9bfaa1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ -_obj -_bin -_dep +/build* Debug Debug* diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e4eb527..f32d4e3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,10 @@ if(NOT OS_FSFW) set(OS_FSFW host CACHE STRING "OS for the FSFW.") endif() +if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack") + option(LINUX_CROSS_COMPILE ON) +endif() + # Perform steps like loading toolchain files where applicable. include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake) pre_project_config() @@ -65,7 +69,9 @@ include (${CMAKE_SCRIPT_PATH}/HardwareOsPreConfig.cmake) pre_source_hw_os_config() if(TGT_BSP) - if(${TGT_BSP} MATCHES "arm/q7s" OR ${TGT_BSP} MATCHES "arm/raspberrypi") + if(${TGT_BSP} MATCHES "arm/q7s" OR ${TGT_BSP} MATCHES "arm/raspberrypi" + OR ${TGT_BSP} MATCHES "arm/beagleboneblack" + ) set(ROOT_CONFIG_FOLDER TRUE) set(FSFW_CONFIG_PATH "fsfwconfig") set(ADD_LINUX_FILES TRUE) @@ -78,6 +84,10 @@ if(TGT_BSP) set(FSFW_HAL_ADD_RASPBERRY_PI ON) endif() + if(${TGT_BSP} MATCHES "arm/beagleboneblack") + add_definitions(-DBEAGLEBONEBLACK) + endif() + if(${TGT_BSP} MATCHES "arm/q7s") add_definitions(-DXIPHOS_Q7S) endif() diff --git a/bsp_rpi/CMakeLists.txt b/bsp_linux_board/CMakeLists.txt similarity index 83% rename from bsp_rpi/CMakeLists.txt rename to bsp_linux_board/CMakeLists.txt index da35633d..5963d48c 100644 --- a/bsp_rpi/CMakeLists.txt +++ b/bsp_linux_board/CMakeLists.txt @@ -6,9 +6,3 @@ target_sources(${TARGET_NAME} PUBLIC add_subdirectory(boardconfig) add_subdirectory(boardtest) -add_subdirectory(gpio) - - - - - diff --git a/bsp_rpi/InitMission.cpp b/bsp_linux_board/InitMission.cpp similarity index 100% rename from bsp_rpi/InitMission.cpp rename to bsp_linux_board/InitMission.cpp diff --git a/bsp_rpi/InitMission.h b/bsp_linux_board/InitMission.h similarity index 100% rename from bsp_rpi/InitMission.h rename to bsp_linux_board/InitMission.h diff --git a/bsp_rpi/ObjectFactory.cpp b/bsp_linux_board/ObjectFactory.cpp similarity index 100% rename from bsp_rpi/ObjectFactory.cpp rename to bsp_linux_board/ObjectFactory.cpp diff --git a/bsp_rpi/ObjectFactory.h b/bsp_linux_board/ObjectFactory.h similarity index 100% rename from bsp_rpi/ObjectFactory.h rename to bsp_linux_board/ObjectFactory.h diff --git a/bsp_rpi/boardconfig/CMakeLists.txt b/bsp_linux_board/boardconfig/CMakeLists.txt similarity index 100% rename from bsp_rpi/boardconfig/CMakeLists.txt rename to bsp_linux_board/boardconfig/CMakeLists.txt diff --git a/bsp_rpi/boardconfig/etl_profile.h b/bsp_linux_board/boardconfig/etl_profile.h similarity index 100% rename from bsp_rpi/boardconfig/etl_profile.h rename to bsp_linux_board/boardconfig/etl_profile.h diff --git a/bsp_rpi/boardconfig/gcov.h b/bsp_linux_board/boardconfig/gcov.h similarity index 100% rename from bsp_rpi/boardconfig/gcov.h rename to bsp_linux_board/boardconfig/gcov.h diff --git a/bsp_rpi/boardconfig/print.c b/bsp_linux_board/boardconfig/print.c similarity index 100% rename from bsp_rpi/boardconfig/print.c rename to bsp_linux_board/boardconfig/print.c diff --git a/bsp_rpi/boardconfig/print.h b/bsp_linux_board/boardconfig/print.h similarity index 100% rename from bsp_rpi/boardconfig/print.h rename to bsp_linux_board/boardconfig/print.h diff --git a/bsp_rpi/boardconfig/rpi_config.h b/bsp_linux_board/boardconfig/rpi_config.h similarity index 100% rename from bsp_rpi/boardconfig/rpi_config.h rename to bsp_linux_board/boardconfig/rpi_config.h diff --git a/bsp_rpi/boardtest/CMakeLists.txt b/bsp_linux_board/boardtest/CMakeLists.txt similarity index 100% rename from bsp_rpi/boardtest/CMakeLists.txt rename to bsp_linux_board/boardtest/CMakeLists.txt diff --git a/bsp_rpi/main.cpp b/bsp_linux_board/main.cpp similarity index 100% rename from bsp_rpi/main.cpp rename to bsp_linux_board/main.cpp diff --git a/bsp_rpi/gpio/CMakeLists.txt b/bsp_rpi/gpio/CMakeLists.txt deleted file mode 100644 index b816684d..00000000 --- a/bsp_rpi/gpio/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -target_sources(${TARGET_NAME} PUBLIC -) - - - - - - diff --git a/cmake/BBBCrossCompileConfig.cmake b/cmake/BBBCrossCompileConfig.cmake new file mode 100644 index 00000000..b32897f5 --- /dev/null +++ b/cmake/BBBCrossCompileConfig.cmake @@ -0,0 +1,98 @@ +# BBB_ROOTFS should point to the local directory which contains all the +# libraries and includes from the target raspi. +# The following command can be used to do this, replace and the +# local accordingly: +# rsync -vR --progress -rl --delete-after --safe-links pi@:/{lib,usr,opt/vc/lib} +# RASPBIAN_ROOTFS needs to be passed to the CMake command or defined in the +# application CMakeLists.txt before loading the toolchain file. + +# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command + +if(NOT DEFINED ENV{BBB_ROOTFS}) + message(FATAL_ERROR + "Define the BBB_ROOTFS variable to point to the Beagle Bone Black rootfs." + ) +else() + set(SYSROOT_PATH "$ENV{BBB_ROOTFS}") + message(STATUS "Beagle Bone Black sysroot: ${SYSROOT_PATH}") +endif() + +if(NOT DEFINED ENV{CROSS_COMPILE}) + set(CROSS_COMPILE "arm-linux-gnueabihf") + message(STATUS + "No CROSS_COMPILE environmental variable set, using default ARM linux " + "cross compiler name ${CROSS_COMPILE}" + ) +else() + set(CROSS_COMPILE "$ENV{CROSS_COMPILE}") + message(STATUS + "Using environmental variable CROSS_COMPILE as cross-compiler: " + "$ENV{CROSS_COMPILE}" + ) +endif() + +message(STATUS "Using sysroot path: ${SYSROOT_PATH}") + +set(CROSS_COMPILE_CC "${CROSS_COMPILE}-gcc") +set(CROSS_COMPILE_CXX "${CROSS_COMPILE}-g++") +set(CROSS_COMPILE_LD "${CROSS_COMPILE}-ld") +set(CROSS_COMPILE_AR "${CROSS_COMPILE}-ar") +set(CROSS_COMPILE_RANLIB "${CROSS_COMPILE}-ranlib") +set(CROSS_COMPILE_STRIP "${CROSS_COMPILE}-strip") +set(CROSS_COMPILE_NM "${CROSS_COMPILE}-nm") +set(CROSS_COMPILE_OBJCOPY "${CROSS_COMPILE}-objcopy") +set(CROSS_COMPILE_SIZE "${CROSS_COMPILE}-size") + +# At the very least, cross compile gcc and g++ have to be set! +find_program (CROSS_COMPILE_CC_FOUND ${CROSS_COMPILE_CC} REQUIRED) +find_program (CROSS_COMPILE_CXX_FOUND ${CROSS_COMPILE_CXX} REQUIRED) + +set(CMAKE_CROSSCOMPILING TRUE) +set(CMAKE_SYSROOT "${SYSROOT_PATH}") + +# Define name of the target system +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_PROCESSOR "arm") + +# Define the compiler +set(CMAKE_C_COMPILER ${CROSS_COMPILE_CC}) +set(CMAKE_CXX_COMPILER ${CROSS_COMPILE_CXX}) + +# List of library dirs where LD has to look. Pass them directly through gcc. +# LD_LIBRARY_PATH is not evaluated by arm-*-ld +set(LIB_DIRS + "${SYSROOT_PATH}/lib/${CROSS_COMPILE}" + "${SYSROOT_PATH}/usr/local/lib" + "${SYSROOT_PATH}/usr/lib/${CROSS_COMPILE}" + "${SYSROOT_PATH}/usr/lib" +) +# You can additionally check the linker paths if you add the +# flags ' -Xlinker --verbose' +set(COMMON_FLAGS "-I${SYSROOT_PATH}/usr/include") +foreach(LIB ${LIB_DIRS}) + set(COMMON_FLAGS "${COMMON_FLAGS} -L${LIB} -Wl,-rpath-link,${LIB}") +endforeach() + +set(CMAKE_PREFIX_PATH + "${CMAKE_PREFIX_PATH}" + "${SYSROOT_PATH}/usr/lib/${CROSS_COMPILE}" +) + +set(CMAKE_C_FLAGS + "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard ${COMMON_FLAGS}" + CACHE STRING "Flags for Beagle Bone Black" +) +set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}" + CACHE STRING "Flags for Beagle Bone Black" +) + +set(CMAKE_FIND_ROOT_PATH + "${CMAKE_INSTALL_PREFIX};${CMAKE_PREFIX_PATH};${CMAKE_SYSROOT}" +) + +# search for programs in the build host directories +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +# for libraries and headers in the target directories +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) diff --git a/cmake/HardwareOsPreConfig.cmake b/cmake/HardwareOsPreConfig.cmake index ab5c16fd..38248fce 100644 --- a/cmake/HardwareOsPreConfig.cmake +++ b/cmake/HardwareOsPreConfig.cmake @@ -53,8 +53,8 @@ endif() if(TGT_BSP) - if (${TGT_BSP} MATCHES "arm/raspberrypi") - set(BSP_PATH "bsp_rpi") + if (${TGT_BSP} MATCHES "arm/raspberrypi" OR ${TGT_BSP} MATCHES "arm/beagleboneblack") + set(BSP_PATH "bsp_linux_board") elseif(${TGT_BSP} MATCHES "arm/q7s") set(BSP_PATH "bsp_q7s") else() diff --git a/cmake/PreProjectConfig.cmake b/cmake/PreProjectConfig.cmake index f54da048..b78b9d33 100644 --- a/cmake/PreProjectConfig.cmake +++ b/cmake/PreProjectConfig.cmake @@ -51,7 +51,14 @@ if(${OS_FSFW} STREQUAL linux AND TGT_BSP) "${CMAKE_SCRIPT_PATH}/RPiCrossCompileConfig.cmake" PARENT_SCOPE ) - else() + elseif(${TGT_BSP} MATCHES "arm/beagleboneblack") + if(LINUX_CROSS_COMPILE) + set(CMAKE_TOOLCHAIN_FILE + "${CMAKE_SCRIPT_PATH}/BBBCrossCompileConfig.cmake" + PARENT_SCOPE + ) + endif() + else() message(WARNING "Target BSP (TGT_BSP) ${TGT_BSP} unknown!") endif() endif() diff --git a/cmake/scripts/BeagleBoneBlack/create_cmake_debug_cfg.sh b/cmake/scripts/BeagleBoneBlack/create_cmake_debug_cfg.sh new file mode 100644 index 00000000..cfa71d02 --- /dev/null +++ b/cmake/scripts/BeagleBoneBlack/create_cmake_debug_cfg.sh @@ -0,0 +1,30 @@ +#!/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/beagleboneblack" +build_generator="" +builddir="build-Debug-BBB" +defines="LINUX_CROSS_COMPILE=OFF" +if [ "${OS}" = "Windows_NT" ]; then + build_generator="MinGW Makefiles" +# Could be other OS but this works for now. +else + build_generator="Unix Makefiles" +fi + +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ + -l "${builddir}" -d "${defines}" diff --git a/cmake/scripts/BeagleBoneBlack/crosscompile/bbb_path_helper.sh b/cmake/scripts/BeagleBoneBlack/crosscompile/bbb_path_helper.sh new file mode 100644 index 00000000..340713e1 --- /dev/null +++ b/cmake/scripts/BeagleBoneBlack/crosscompile/bbb_path_helper.sh @@ -0,0 +1,3 @@ +export PATH=$PATH:"$HOME/beaglebone//bin" +export CROSS_COMPILE="arm-linux-gnueabihf" +export BBB_ROOTFS="${HOME}/raspberrypi/rootfs" diff --git a/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_debug_cfg.sh b/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_debug_cfg.sh new file mode 100644 index 00000000..b413d07f --- /dev/null +++ b/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_debug_cfg.sh @@ -0,0 +1,30 @@ +#!/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/beagleboneblack" +build_generator="" +builddir="build-Debug-BBB" +defines="LINUX_CROSS_COMPILE=ON" +if [ "${OS}" = "Windows_NT" ]; then + build_generator="MinGW Makefiles" +# Could be other OS but this works for now. +else + build_generator="Unix Makefiles" +fi + +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ + -l "${builddir}" -d "${defines}" diff --git a/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_release_cfg.sh b/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_release_cfg.sh new file mode 100644 index 00000000..81e3322d --- /dev/null +++ b/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_release_cfg.sh @@ -0,0 +1,30 @@ +#!/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/beagleboneblack" +build_generator="" +builddir="build-Release-BBB" +defines="LINUX_CROSS_COMPILE=ON" +if [ "${OS}" = "Windows_NT" ]; then + build_generator="MinGW Makefiles" +# Could be other OS but this works for now. +else + build_generator="Unix Makefiles" +fi + +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ + -l "${builddir}" -d "${defines}" diff --git a/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_relwithdeb_cfg.sh b/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_relwithdeb_cfg.sh new file mode 100644 index 00000000..81e3322d --- /dev/null +++ b/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_relwithdeb_cfg.sh @@ -0,0 +1,30 @@ +#!/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/beagleboneblack" +build_generator="" +builddir="build-Release-BBB" +defines="LINUX_CROSS_COMPILE=ON" +if [ "${OS}" = "Windows_NT" ]; then + build_generator="MinGW Makefiles" +# Could be other OS but this works for now. +else + build_generator="Unix Makefiles" +fi + +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ + -l "${builddir}" -d "${defines}" From 041b316c6c48c35bc0c04b7c2416f66a98b37d46 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 5 May 2021 22:43:17 +0200 Subject: [PATCH 07/79] beagle bone build working --- .gitignore | 3 +- cmake/PreProjectConfig.cmake | 3 +- .../inspectionProfiles/profiles_settings.xml | 6 -- cmake/scripts/.idea/misc.xml | 4 - cmake/scripts/.idea/modules.xml | 8 -- cmake/scripts/.idea/scripts.iml | 8 -- cmake/scripts/.idea/vcs.xml | 6 -- cmake/scripts/.idea/workspace.xml | 89 ------------------- cmake/scripts/cmake_build_config.py | 33 +++++-- fsfw_hal | 2 +- 10 files changed, 28 insertions(+), 134 deletions(-) delete mode 100644 cmake/scripts/.idea/inspectionProfiles/profiles_settings.xml delete mode 100644 cmake/scripts/.idea/misc.xml delete mode 100644 cmake/scripts/.idea/modules.xml delete mode 100644 cmake/scripts/.idea/scripts.iml delete mode 100644 cmake/scripts/.idea/vcs.xml delete mode 100644 cmake/scripts/.idea/workspace.xml diff --git a/.gitignore b/.gitignore index f9bfaa1d..70a3325b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ RelWithDebInfo* .cproject __pycache__ +.idea + !misc/eclipse/**/.cproject !misc/eclipse/**/.project -/eive_obsw cmake debug/ diff --git a/cmake/PreProjectConfig.cmake b/cmake/PreProjectConfig.cmake index b78b9d33..8a013d83 100644 --- a/cmake/PreProjectConfig.cmake +++ b/cmake/PreProjectConfig.cmake @@ -11,7 +11,6 @@ endif() # Disable compiler checks for cross-compiling. if(${OS_FSFW} STREQUAL linux AND TGT_BSP) - if(${TGT_BSP} MATCHES "arm/q7s") set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SCRIPT_PATH}/Q7SCrossCompileConfig.cmake" @@ -38,7 +37,7 @@ if(${OS_FSFW} STREQUAL linux AND TGT_BSP) else() message(STATUS "Setting RASPBERRY_VERSION to ${RASPBERRY_VERSION}") set(RASPBERRY_VERSION ${RASPBERRY_VERSION} CACHE STRING "Raspberry Pi version") - set(ENV{RASPBERRY_VERSION} ${RASPBERRY_VERSION}) + set(ENV{RASPBERRY_VERSION} ${RASPBERRY_VERSION}) endif() else() message(STATUS diff --git a/cmake/scripts/.idea/inspectionProfiles/profiles_settings.xml b/cmake/scripts/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2da..00000000 --- a/cmake/scripts/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/cmake/scripts/.idea/misc.xml b/cmake/scripts/.idea/misc.xml deleted file mode 100644 index d56657ad..00000000 --- a/cmake/scripts/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/cmake/scripts/.idea/modules.xml b/cmake/scripts/.idea/modules.xml deleted file mode 100644 index bb83e262..00000000 --- a/cmake/scripts/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/cmake/scripts/.idea/scripts.iml b/cmake/scripts/.idea/scripts.iml deleted file mode 100644 index d0876a78..00000000 --- a/cmake/scripts/.idea/scripts.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/cmake/scripts/.idea/vcs.xml b/cmake/scripts/.idea/vcs.xml deleted file mode 100644 index c2365ab1..00000000 --- a/cmake/scripts/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/cmake/scripts/.idea/workspace.xml b/cmake/scripts/.idea/workspace.xml deleted file mode 100644 index 70a189f3..00000000 --- a/cmake/scripts/.idea/workspace.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1609084345199 - - - - - - - - - - - - \ No newline at end of file diff --git a/cmake/scripts/cmake_build_config.py b/cmake/scripts/cmake_build_config.py index 32b560f6..67f175d9 100644 --- a/cmake/scripts/cmake_build_config.py +++ b/cmake/scripts/cmake_build_config.py @@ -18,18 +18,26 @@ def main(): print("-- Python CMake build configurator utility --") print("Parsing command line arguments..") - parser = argparse.ArgumentParser(description="Processing arguments for CMake build configuration.") + parser = argparse.ArgumentParser( + description="Processing arguments for CMake build configuration." + ) parser.add_argument("-o", "--osal", type=str, choices=["freertos", "linux", "rtems", "host"], help="FSFW OSAL. Valid arguments: host, linux, rtems, freertos") - parser.add_argument("-b", "--buildtype", type=str, choices=["debug", "release", "size", "reldeb"], - help="CMake build type. Valid arguments: debug, release, size, reldeb (Release with Debug " - "Information)", default="debug") + parser.add_argument( + "-b", "--buildtype", type=str, choices=["debug", "release", "size", "reldeb"], + help="CMake build type. Valid arguments: debug, release, size, reldeb (Release with Debug " + "Information)", default="debug" + ) parser.add_argument("-l", "--builddir", type=str, help="Specify build directory.") parser.add_argument("-g", "--generator", type=str, help="CMake Generator") - parser.add_argument("-d", "--defines", - help="Additional custom defines passed to CMake (supply without -D prefix!)", - nargs="*", type=str) - parser.add_argument("-t", "--target-bsp", type=str, help="Target BSP, combination of architecture and machine") + parser.add_argument( + "-d", "--defines", + help="Additional custom defines passed to CMake (supply without -D prefix!)", + nargs="*", type=str + ) + parser.add_argument( + "-t", "--target-bsp", type=str, help="Target BSP, combination of architecture and machine" + ) args = parser.parse_args() @@ -64,6 +72,12 @@ def main(): else: cmake_target_cfg_cmd = "" + define_string = "" + if args.defines is not None: + define_list = args.defines[0].split() + for define in define_list: + define_string += f"-D{define} " + build_folder = cmake_build_type if args.builddir is not None: build_folder = args.builddir @@ -85,7 +99,8 @@ def main(): os.chdir(build_folder) cmake_command = f"cmake {generator_cmake_arg} -DOS_FSFW=\"{osal}\" " \ - f"-DCMAKE_BUILD_TYPE=\"{cmake_build_type}\" {cmake_target_cfg_cmd} {source_location}" + f"-DCMAKE_BUILD_TYPE=\"{cmake_build_type}\" {cmake_target_cfg_cmd} " \ + f"{define_string} {source_location}" # Remove redundant spaces cmake_command = ' '.join(cmake_command.split()) print("Running CMake command: ") diff --git a/fsfw_hal b/fsfw_hal index 14fe3257..a85c0146 160000 --- a/fsfw_hal +++ b/fsfw_hal @@ -1 +1 @@ -Subproject commit 14fe32572d62db9d19707dc1f9bb6fecb1993b73 +Subproject commit a85c01465bc8687773676f05c5e7eb8af54b25ff From 32d39c4d431e8cd31e3a0611eede8c5b67fb5343 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 5 May 2021 22:47:24 +0200 Subject: [PATCH 08/79] fixes for bbb build --- bsp_linux_board/ObjectFactory.cpp | 2 +- linux/boardtest/SpiTestClass.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bsp_linux_board/ObjectFactory.cpp b/bsp_linux_board/ObjectFactory.cpp index 960abfe6..0518ac87 100644 --- a/bsp_linux_board/ObjectFactory.cpp +++ b/bsp_linux_board/ObjectFactory.cpp @@ -47,7 +47,7 @@ void Factory::setStaticFrameworkObjectIds() { LocalDataPoolManager::defaultHkDestination = objects::NO_OBJECT; VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION; - TmPacketStored::timeStamperId = objects::TIME_STAMPER; + TmPacketBase::timeStamperId = objects::TIME_STAMPER; } diff --git a/linux/boardtest/SpiTestClass.h b/linux/boardtest/SpiTestClass.h index f93eb9c2..dd112a0e 100644 --- a/linux/boardtest/SpiTestClass.h +++ b/linux/boardtest/SpiTestClass.h @@ -55,6 +55,15 @@ private: uint8_t gyro2L3gd20ChipSelect = 3; uint8_t mgm2Lis3mdlChipSelect = 0; uint8_t mgm3Rm3100ChipSelect = 23; +#else + uint8_t mgm0Lis3mdlChipSelect = 0; + uint8_t mgm1Rm3100ChipSelect = 0; + uint8_t gyro0AdisResetLine = 0; + uint8_t gyro0AdisChipSelect = 0; + uint8_t gyro1L3gd20ChipSelect = 0; + uint8_t gyro2L3gd20ChipSelect = 0; + uint8_t mgm2Lis3mdlChipSelect = 0; + uint8_t mgm3Rm3100ChipSelect = 0; #endif static constexpr uint8_t STM_READ_MASK = 0b1000'0000; From 80f52283c48071c8b6158da7066cba003fd2d557 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 5 May 2021 22:48:35 +0200 Subject: [PATCH 09/79] fsfw update --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 5273ffa7..d7d24bd9 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 5273ffa721dd83634ebbcc37c4646752f0bea20f +Subproject commit d7d24bd9aac7522eb096ea9138eb61559fde9012 From b583e61a2fcab49459a538e633a30c10c3fc6494 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 5 May 2021 22:51:29 +0200 Subject: [PATCH 10/79] correct board output now --- bsp_linux_board/main.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bsp_linux_board/main.cpp b/bsp_linux_board/main.cpp index 8eea768c..67801c4b 100644 --- a/bsp_linux_board/main.cpp +++ b/bsp_linux_board/main.cpp @@ -5,6 +5,14 @@ #include +#ifdef RASPBERRY_PI +static const char* const BOARD_NAME = "Raspberry Pi"; +#elif defined(BEAGLEBONEBLACK) +static const char* const BOARD_NAME = "Beaglebone Black"; +#else +static const char* const BOARD_NAME = "Unknown Board"; +#endif + /** * @brief This is the main program and entry point for the Raspberry Pi. * @return @@ -12,7 +20,7 @@ int main(void) { std::cout << "-- EIVE OBSW --" << std::endl; - std::cout << "-- Compiled for Linux (Raspberry Pi) --" << std::endl; + std::cout << "-- Compiled for Linux board " << BOARD_NAME << " --" << std::endl; std::cout << "-- Software version " << SW_NAME << " v" << SW_VERSION << "." << SW_SUBVERSION << "." << SW_SUBSUBVERSION << " -- " << std::endl; std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl; From 9c7fa8c5e7bf782256e2d26862b439858527d7fc Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Thu, 13 May 2021 13:35:24 +0200 Subject: [PATCH 11/79] updated submodules --- fsfw | 2 +- fsfw_hal | 2 +- thirdparty/etl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fsfw b/fsfw index 5273ffa7..e7d24563 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 5273ffa721dd83634ebbcc37c4646752f0bea20f +Subproject commit e7d245635047439ca4b5a46d05bf58437a5aa33a diff --git a/fsfw_hal b/fsfw_hal index 14fe3257..a0f698ff 160000 --- a/fsfw_hal +++ b/fsfw_hal @@ -1 +1 @@ -Subproject commit 14fe32572d62db9d19707dc1f9bb6fecb1993b73 +Subproject commit a0f698fffa4dd5c9f86337c5d6170f9321cb8de7 diff --git a/thirdparty/etl b/thirdparty/etl index ae06e641..c308dc42 160000 --- a/thirdparty/etl +++ b/thirdparty/etl @@ -1 +1 @@ -Subproject commit ae06e6417702b770c49289c9e7162cb3f4a5a217 +Subproject commit c308dc427b7a34e54f33860fb2e244564b2740b4 From 626db76a606d829811e721543d9534384a027429 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Mon, 17 May 2021 13:54:12 +0200 Subject: [PATCH 12/79] added etl and tmtc --- thirdparty/etl | 2 +- tmtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/thirdparty/etl b/thirdparty/etl index c308dc42..0efecca7 160000 --- a/thirdparty/etl +++ b/thirdparty/etl @@ -1 +1 @@ -Subproject commit c308dc427b7a34e54f33860fb2e244564b2740b4 +Subproject commit 0efecca700c6d0847f91b5540638571ba298c793 diff --git a/tmtc b/tmtc index 06750809..574a3e92 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 06750809cb52044392e0683896538a652f11a512 +Subproject commit 574a3e92074d9d4d0335dad3ddc5962e1369f5d5 From 8e65dee0329e7bb7937d275d2a864134ff8d5f8c Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 May 2021 15:59:46 +0200 Subject: [PATCH 13/79] update fsfw_hal --- fsfw_hal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw_hal b/fsfw_hal index a85c0146..a0f698ff 160000 --- a/fsfw_hal +++ b/fsfw_hal @@ -1 +1 @@ -Subproject commit a85c01465bc8687773676f05c5e7eb8af54b25ff +Subproject commit a0f698fffa4dd5c9f86337c5d6170f9321cb8de7 From 9678af9f3d4e7c519c1267f14375aa1a90688b64 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 May 2021 16:10:53 +0200 Subject: [PATCH 14/79] updating everything --- bsp_hosted/ObjectFactory.cpp | 6 ++--- bsp_hosted/fsfwconfig/FSFWConfig.h | 25 ++++++++++++------- cmake/scripts/Linux/create_cmake_debug_cfg.sh | 2 +- .../scripts/Linux/create_cmake_release_cfg.sh | 2 +- .../Linux/create_cmake_relwithdeb_cfg.sh | 25 ------------------- cmake/scripts/Linux/create_cmake_size_cfg.sh | 20 --------------- 6 files changed, 20 insertions(+), 60 deletions(-) delete mode 100755 cmake/scripts/Linux/create_cmake_relwithdeb_cfg.sh delete mode 100755 cmake/scripts/Linux/create_cmake_size_cfg.sh diff --git a/bsp_hosted/ObjectFactory.cpp b/bsp_hosted/ObjectFactory.cpp index f3d7591d..da07b0b5 100644 --- a/bsp_hosted/ObjectFactory.cpp +++ b/bsp_hosted/ObjectFactory.cpp @@ -33,16 +33,14 @@ void Factory::setStaticFrameworkObjectIds(){ TmFunnel::storageDestination = objects::NO_OBJECT; VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION; - TmPacketStored::timeStamperId = objects::TIME_STAMPER; + TmPacketBase::timeStamperId = objects::TIME_STAMPER; } void ObjectFactory::produce(){ Factory::setStaticFrameworkObjectIds(); ObjectFactory::produceGenericObjects(); - new UdpTmTcBridge(objects::UDP_BRIDGE, - objects::CCSDS_PACKET_DISTRIBUTOR, - objects::TM_STORE, objects::TC_STORE); + new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR); new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE); } diff --git a/bsp_hosted/fsfwconfig/FSFWConfig.h b/bsp_hosted/fsfwconfig/FSFWConfig.h index e3def8fe..3174d596 100644 --- a/bsp_hosted/fsfwconfig/FSFWConfig.h +++ b/bsp_hosted/fsfwconfig/FSFWConfig.h @@ -7,18 +7,17 @@ //! Used to determine whether C++ ostreams are used which can increase //! the binary size significantly. If this is disabled, //! the C stdio functions can be used alternatively -#define FSFW_CPP_OSTREAM_ENABLED 1 +#define FSFW_CPP_OSTREAM_ENABLED 1 //! More FSFW related printouts depending on level. Useful for development. -#define FSFW_VERBOSE_LEVEL 1 +#define FSFW_VERBOSE_LEVEL 1 //! Can be used to completely disable printouts, even the C stdio ones. #if FSFW_CPP_OSTREAM_ENABLED == 0 && FSFW_VERBOSE_LEVEL == 0 - #define FSFW_DISABLE_PRINTOUT 0 + #define FSFW_DISABLE_PRINTOUT 0 #endif -//! Can be used to disable the ANSI color sequences for C stdio. -#define FSFW_COLORED_OUTPUT 1 +#define FSFW_USE_PUS_C_TELEMETRY 1 //! Can be used to disable the ANSI color sequences for C stdio. #define FSFW_COLORED_OUTPUT 1 @@ -43,10 +42,17 @@ //! Specify whether a special mode store is used for Subsystem components. #define FSFW_USE_MODESTORE 0 +//! Defines if the real time scheduler for linux should be used. +//! If set to 0, this will also disable priority settings for linux +//! as most systems will not allow to set nice values without privileges +//! For embedded linux system set this to 1. +//! If set to 1 the binary needs "cap_sys_nice=eip" privileges to run +#define FSFW_USE_REALTIME_FOR_LINUX 0 + namespace fsfwconfig { -//! Default timestamp size. The default timestamp will be an eight byte CDC -//! short timestamp. -static constexpr uint8_t FSFW_MISSION_TIMESTAMP_SIZE = 8; + +//! Default timestamp size. The default timestamp will be an seven byte CDC short timestamp. +static constexpr uint8_t FSFW_MISSION_TIMESTAMP_SIZE = 7; //! Configure the allocated pool sizes for the event manager. static constexpr size_t FSFW_EVENTMGMR_MATCHTREE_NODES = 240; @@ -55,11 +61,12 @@ static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120; //! Defines the FIFO depth of each commanding service base which //! also determines how many commands a CSB service can handle in one cycle -//! simulataneously. This will increase the required RAM for +//! simultaneously. This will increase the required RAM for //! each CSB service ! static constexpr uint8_t FSFW_CSB_FIFO_DEPTH = 6; static constexpr size_t FSFW_PRINT_BUFFER_SIZE = 124; + } #endif /* CONFIG_FSFWCONFIG_H_ */ diff --git a/cmake/scripts/Linux/create_cmake_debug_cfg.sh b/cmake/scripts/Linux/create_cmake_debug_cfg.sh index 1f75c12a..172f890d 100755 --- a/cmake/scripts/Linux/create_cmake_debug_cfg.sh +++ b/cmake/scripts/Linux/create_cmake_debug_cfg.sh @@ -16,7 +16,7 @@ fi build_generator="Unix Makefiles" os_fsfw="linux" -builddir="Debug-Linux" +builddir="build-Debug-Linux" echo "Running command (without the leading +):" set -x # Print command diff --git a/cmake/scripts/Linux/create_cmake_release_cfg.sh b/cmake/scripts/Linux/create_cmake_release_cfg.sh index ffd85ae7..019a951d 100755 --- a/cmake/scripts/Linux/create_cmake_release_cfg.sh +++ b/cmake/scripts/Linux/create_cmake_release_cfg.sh @@ -16,7 +16,7 @@ fi build_generator="Unix Makefiles" os_fsfw="linux" -builddir="Release-Linux" +builddir="build-Release-Linux" echo "Running command (without the leading +):" set -x # Print command diff --git a/cmake/scripts/Linux/create_cmake_relwithdeb_cfg.sh b/cmake/scripts/Linux/create_cmake_relwithdeb_cfg.sh deleted file mode 100755 index 31376322..00000000 --- a/cmake/scripts/Linux/create_cmake_relwithdeb_cfg.sh +++ /dev/null @@ -1,25 +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 "create_cmake_cfg.sh not found in upper directories!" - exit 1 -fi - -build_generator="Unix Makefiles" -os_fsfw="linux" -builddir="RelWithDeb-Linux" - -echo "Running command (without the leading +):" -set -x # Print command -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" -# Use this if commands are added which should not be printed -# set +x diff --git a/cmake/scripts/Linux/create_cmake_size_cfg.sh b/cmake/scripts/Linux/create_cmake_size_cfg.sh deleted file mode 100755 index d4500d6d..00000000 --- a/cmake/scripts/Linux/create_cmake_size_cfg.sh +++ /dev/null @@ -1,20 +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 "create_cmake_cfg.sh not found in upper directories!" - exit 1 -fi - -build_generator="Unix Makefiles" -os_fsfw="linux" - -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "size" From 41de3d1f00e9823f4a04ba44fca2a342c5a89d2a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 May 2021 16:22:51 +0200 Subject: [PATCH 15/79] common config files --- CMakeLists.txt | 4 +- .../fsfwconfig/objects/systemObjectList.h | 21 +------- bsp_hosted/fsfwconfig/returnvalues/classIds.h | 5 +- common/config/commonClassIds.h | 23 +++++++++ common/config/commonObjects.h | 49 +++++++++++++++++++ fsfwconfig/objects/systemObjectList.h | 40 +-------------- fsfwconfig/returnvalues/classIds.h | 11 +---- 7 files changed, 81 insertions(+), 72 deletions(-) create mode 100644 common/config/commonClassIds.h create mode 100644 common/config/commonObjects.h diff --git a/CMakeLists.txt b/CMakeLists.txt index f32d4e3e..ec57a867 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ set(ETL_LIB_PATH ${THIRD_PARTY_FOLDER}/etl) set(LWGPS_LIB_PATH ${THIRD_PARTY_FOLDER}/lwgps) set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF) -set(ADD_LINUX_FILES TRUE) +set(ADD_LINUX_FILES False) # Analyse different OS and architecture/target options, determine BSP_PATH, # display information about compiler etc. @@ -94,7 +94,9 @@ if(TGT_BSP) else() # Required by FSFW library set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig") + set(FSFW_ADDITIONAL_INC_PATH "${COMMON_PATH}/config") endif() + # Set for lwgps library set(LWGPS_CONFIG_PATH "${COMMON_PATH}/config") diff --git a/bsp_hosted/fsfwconfig/objects/systemObjectList.h b/bsp_hosted/fsfwconfig/objects/systemObjectList.h index d7a1abd7..21a5f939 100644 --- a/bsp_hosted/fsfwconfig/objects/systemObjectList.h +++ b/bsp_hosted/fsfwconfig/objects/systemObjectList.h @@ -2,15 +2,11 @@ #define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ #include +#include // The objects will be instantiated in the ID order namespace objects { enum sourceObjects: uint32_t { - /* First Byte 0x50-0x52 reserved for PUS Services **/ - CCSDS_PACKET_DISTRIBUTOR = 0x50000100, - PUS_PACKET_DISTRIBUTOR = 0x50000200, - UDP_BRIDGE = 0x50000300, - UDP_POLLING_TASK = 0x50000400, PUS_SERVICE_3 = 0x51000300, PUS_SERVICE_5 = 0x51000400, @@ -27,21 +23,6 @@ namespace objects { DUMMY_INTERFACE = 0xCAFECAFE, DUMMY_HANDLER = 0x4400AFFE, - /* 0x44 ('D') for device handlers */ - P60DOCK_HANDLER = 0x44000001, - PDU1_HANDLER = 0x44000002, - PDU2_HANDLER = 0x44000003, - ACU_HANDLER = 0x44000004, - TMP1075_HANDLER_1 = 0x44000005, - TMP1075_HANDLER_2 = 0x44000006, - MGM_0_LIS3_HANDLER = 0x4400007, - MGM_1_RM3100_HANDLER = 0x44000008, - MGM_2_LIS3_HANDLER = 0x44000009, - MGM_3_RM3100_HANDLER = 0x44000010, - GYRO_0_ADIS_HANDLER = 0x44000011, - GYRO_1_L3G_HANDLER = 0x44000012, - GYRO_2_L3G_HANDLER = 0x44000013, - /* 0x49 ('I') for Communication Interfaces **/ ARDUINO_COM_IF = 0x49000001 }; diff --git a/bsp_hosted/fsfwconfig/returnvalues/classIds.h b/bsp_hosted/fsfwconfig/returnvalues/classIds.h index 21371c15..cc159fec 100644 --- a/bsp_hosted/fsfwconfig/returnvalues/classIds.h +++ b/bsp_hosted/fsfwconfig/returnvalues/classIds.h @@ -1,6 +1,7 @@ #ifndef CONFIG_RETURNVALUES_CLASSIDS_H_ #define CONFIG_RETURNVALUES_CLASSIDS_H_ +#include "commonClassIds.h" #include /** @@ -10,9 +11,7 @@ */ namespace CLASS_ID { enum { - MISSION_CLASS_ID_START = FW_CLASS_ID_COUNT, - MGM_LIS3MDL, - MGM_RM3100 + CLASS_ID_START = COMMON_CLASS_ID_END, }; } diff --git a/common/config/commonClassIds.h b/common/config/commonClassIds.h new file mode 100644 index 00000000..c42dda0f --- /dev/null +++ b/common/config/commonClassIds.h @@ -0,0 +1,23 @@ +#ifndef COMMON_CONFIG_COMMONCLASSIDS_H_ +#define COMMON_CONFIG_COMMONCLASSIDS_H_ + +#include +#include + +namespace CLASS_ID { +enum commonClassIds: uint8_t { + MISSION_CLASS_ID_START = FW_CLASS_ID_COUNT, + MGM_LIS3MDL, + MGM_RM3100, + PCDU_HANDLER, + HEATER_HANDLER, + SYRLINKS_HANDLER, + IMTQ_HANDLER, + PLOC_HANDLER, + SUS_HANDLER, + COMMON_CLASS_ID_END +}; + +} + +#endif /* COMMON_CONFIG_COMMONCLASSIDS_H_ */ diff --git a/common/config/commonObjects.h b/common/config/commonObjects.h new file mode 100644 index 00000000..fd7e5a92 --- /dev/null +++ b/common/config/commonObjects.h @@ -0,0 +1,49 @@ +#ifndef COMMON_CONFIG_COMMONOBJECTS_H_ +#define COMMON_CONFIG_COMMONOBJECTS_H_ + +#include + +namespace objects { +enum commonObjects: uint32_t { + /* First Byte 0x50-0x52 reserved for PUS Services **/ + CCSDS_PACKET_DISTRIBUTOR = 0x50000100, + PUS_PACKET_DISTRIBUTOR = 0x50000200, + UDP_BRIDGE = 0x50000300, + UDP_POLLING_TASK = 0x50000400, + + /* 0x44 ('D') for device handlers */ + P60DOCK_HANDLER = 0x44000001, + PDU1_HANDLER = 0x44000002, + PDU2_HANDLER = 0x44000003, + ACU_HANDLER = 0x44000004, + TMP1075_HANDLER_1 = 0x44000005, + TMP1075_HANDLER_2 = 0x44000006, + MGM_0_LIS3_HANDLER = 0x44000007, + MGM_1_RM3100_HANDLER = 0x44000008, + MGM_2_LIS3_HANDLER = 0x44000009, + MGM_3_RM3100_HANDLER = 0x44000010, + GYRO_0_ADIS_HANDLER = 0x44000011, + GYRO_1_L3G_HANDLER = 0x44000012, + GYRO_2_L3G_HANDLER = 0x44000013, + + IMTQ_HANDLER = 0x44000014, + PLOC_HANDLER = 0x44000015, + + SUS_1 = 0x44000016, + SUS_2 = 0x44000017, + SUS_3 = 0x44000018, + SUS_4 = 0x44000019, + SUS_5 = 0x4400001A, + SUS_6 = 0x4400001B, + SUS_7 = 0x4400001C, + SUS_8 = 0x4400001D, + SUS_9 = 0x4400001E, + SUS_10 = 0x4400001F, + SUS_11 = 0x44000021, + SUS_12 = 0x44000022, + SUS_13 = 0x44000023, +}; +} + + +#endif /* COMMON_CONFIG_COMMONOBJECTS_H_ */ diff --git a/fsfwconfig/objects/systemObjectList.h b/fsfwconfig/objects/systemObjectList.h index 746e83cf..95730e09 100644 --- a/fsfwconfig/objects/systemObjectList.h +++ b/fsfwconfig/objects/systemObjectList.h @@ -3,6 +3,7 @@ #include #include +#include // The objects will be instantiated in the ID order namespace objects { @@ -11,12 +12,6 @@ namespace objects { FW_ADDRESS_START = PUS_SERVICE_1_VERIFICATION, FW_ADDRESS_END = TIME_STAMPER, - /* First Byte 0x50-0x52 reserved for PUS Services **/ - CCSDS_PACKET_DISTRIBUTOR = 0x50000100, - PUS_PACKET_DISTRIBUTOR = 0x50000200, - UDP_BRIDGE = 0x50000300, - UDP_POLLING_TASK = 0x50000400, - PUS_SERVICE_3 = 0x51000300, PUS_SERVICE_5 = 0x51000400, PUS_SERVICE_6 = 0x51000500, @@ -36,39 +31,6 @@ namespace objects { /* 0x47 ('G') for Gpio Interfaces */ GPIO_IF = 0x47000001, - /* 0x44 ('D') for device handlers */ - P60DOCK_HANDLER = 0x44000001, - PDU1_HANDLER = 0x44000002, - PDU2_HANDLER = 0x44000003, - ACU_HANDLER = 0x44000004, - TMP1075_HANDLER_1 = 0x44000005, - TMP1075_HANDLER_2 = 0x44000006, - MGM_0_LIS3_HANDLER = 0x44000007, - MGM_1_RM3100_HANDLER = 0x44000008, - MGM_2_LIS3_HANDLER = 0x44000009, - MGM_3_RM3100_HANDLER = 0x44000010, - GYRO_0_ADIS_HANDLER = 0x44000011, - GYRO_1_L3G_HANDLER = 0x44000012, - GYRO_2_L3G_HANDLER = 0x44000013, - - IMTQ_HANDLER = 0x44000014, - PLOC_HANDLER = 0x44000015, - - - SUS_1 = 0x44000016, - SUS_2 = 0x44000017, - SUS_3 = 0x44000018, - SUS_4 = 0x44000019, - SUS_5 = 0x4400001A, - SUS_6 = 0x4400001B, - SUS_7 = 0x4400001C, - SUS_8 = 0x4400001D, - SUS_9 = 0x4400001E, - SUS_10 = 0x4400001F, - SUS_11 = 0x44000021, - SUS_12 = 0x44000022, - SUS_13 = 0x44000023, - /* Custom device handler */ PCDU_HANDLER = 0x44001000, SOLAR_ARRAY_DEPL_HANDLER = 0x44001001, diff --git a/fsfwconfig/returnvalues/classIds.h b/fsfwconfig/returnvalues/classIds.h index 50bb3cea..5b39df62 100644 --- a/fsfwconfig/returnvalues/classIds.h +++ b/fsfwconfig/returnvalues/classIds.h @@ -2,6 +2,7 @@ #define FSFWCONFIG_RETURNVALUES_CLASSIDS_H_ #include +#include /** * Source IDs starts at 73 for now @@ -10,18 +11,10 @@ */ namespace CLASS_ID { enum { - MISSION_CLASS_ID_START = FW_CLASS_ID_COUNT, - MGM_LIS3MDL, - MGM_RM3100, + CLASS_ID_START = COMMON_CLASS_ID_END, LINUX_LIBGPIO_IF, LINUX_SPI_COM_IF, - PCDU_HANDLER, - HEATER_HANDLER, SA_DEPL_HANDLER, - SYRLINKS_HANDLER, - IMTQ_HANDLER, - PLOC_HANDLER, - SUS_HANDLER }; } From 6f9a1853ffc6b709e085b6f5d9f74d63bf5f1544 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 May 2021 16:37:29 +0200 Subject: [PATCH 16/79] host compiling again --- .../fsfwconfig/events/subsystemIdRanges.h | 14 ++-------- common/config/commonSubsystemId.h | 26 +++++++++++++++++++ fsfwconfig/events/subsystemIdRanges.h | 15 ++--------- linux/CMakeLists.txt | 1 + linux/devices/CMakeLists.txt | 5 ++++ {bsp_q7s => linux}/devices/HeaterHandler.cpp | 5 ++-- {bsp_q7s => linux}/devices/HeaterHandler.h | 0 .../devices/SolarArrayDeploymentHandler.cpp | 0 .../devices/SolarArrayDeploymentHandler.h | 0 {mission => linux}/devices/SusHandler.cpp | 5 ++-- {mission => linux}/devices/SusHandler.h | 0 mission/devices/CMakeLists.txt | 1 - mission/devices/IMTQHandler.cpp | 4 +-- mission/devices/PlocHandler.cpp | 3 +-- mission/devices/PlocHandler.h | 2 +- mission/devices/SyrlinksHkHandler.cpp | 5 ++-- 16 files changed, 49 insertions(+), 37 deletions(-) create mode 100644 common/config/commonSubsystemId.h create mode 100644 linux/devices/CMakeLists.txt rename {bsp_q7s => linux}/devices/HeaterHandler.cpp (99%) rename {bsp_q7s => linux}/devices/HeaterHandler.h (100%) rename {bsp_q7s => linux}/devices/SolarArrayDeploymentHandler.cpp (100%) rename {bsp_q7s => linux}/devices/SolarArrayDeploymentHandler.h (100%) rename {mission => linux}/devices/SusHandler.cpp (99%) rename {mission => linux}/devices/SusHandler.h (100%) diff --git a/bsp_hosted/fsfwconfig/events/subsystemIdRanges.h b/bsp_hosted/fsfwconfig/events/subsystemIdRanges.h index 51534f60..98776b6a 100644 --- a/bsp_hosted/fsfwconfig/events/subsystemIdRanges.h +++ b/bsp_hosted/fsfwconfig/events/subsystemIdRanges.h @@ -1,7 +1,7 @@ #ifndef CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_ #define CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_ -#include +#include "commonSubsystemId.h" #include /** @@ -10,17 +10,7 @@ */ namespace SUBSYSTEM_ID { enum: uint8_t { - SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE, - PUS_SERVICE_2, - PUS_SERVICE_3, - PUS_SERVICE_5, - PUS_SERVICE_6, - PUS_SERVICE_8, - PUS_SERVICE_23, - MGM_LIS3MDL, - MGM_RM3100, - - DUMMY_DEVICE, + SUBSYSTEM_ID_START = COMMON_SUBSYSTEM_ID_END }; } diff --git a/common/config/commonSubsystemId.h b/common/config/commonSubsystemId.h new file mode 100644 index 00000000..b19fea3a --- /dev/null +++ b/common/config/commonSubsystemId.h @@ -0,0 +1,26 @@ +#ifndef COMMON_CONFIG_COMMONSUBSYSTEMID_H_ +#define COMMON_CONFIG_COMMONSUBSYSTEMID_H_ + +#include + +namespace SUBSYSTEM_ID { +enum: uint8_t { + COMMON_SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE, + PUS_SERVICE_2, + PUS_SERVICE_3, + PUS_SERVICE_5, + PUS_SERVICE_6, + PUS_SERVICE_8, + PUS_SERVICE_23, + MGM_LIS3MDL, + MGM_RM3100, + PCDU_HANDLER, + HEATER_HANDLER, + SA_DEPL_HANDLER, + PLOC_HANDLER, + COMMON_SUBSYSTEM_ID_END +}; +} + + +#endif /* COMMON_CONFIG_COMMONSUBSYSTEMID_H_ */ diff --git a/fsfwconfig/events/subsystemIdRanges.h b/fsfwconfig/events/subsystemIdRanges.h index b33ee807..f6f6b161 100644 --- a/fsfwconfig/events/subsystemIdRanges.h +++ b/fsfwconfig/events/subsystemIdRanges.h @@ -1,6 +1,7 @@ #ifndef FSFWCONFIG_EVENTS_SUBSYSTEMIDRANGES_H_ #define FSFWCONFIG_EVENTS_SUBSYSTEMIDRANGES_H_ +#include "commonSubsystemId.h" #include #include @@ -10,19 +11,7 @@ */ namespace SUBSYSTEM_ID { enum: uint8_t { - SUBSYSTE_ID_START = FW_SUBSYSTEM_ID_RANGE, - PUS_SERVICE_2, - PUS_SERVICE_3, - PUS_SERVICE_5, - PUS_SERVICE_6, - PUS_SERVICE_8, - PUS_SERVICE_23, - MGM_LIS3MDL, - MGM_RM3100, - PCDU_HANDLER, - HEATER_HANDLER, - SA_DEPL_HANDLER, - PLOC_HANDLER + SUBSYSTEM_ID_START = COMMON_SUBSYSTEM_ID_END }; } diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 7e6d1f35..1e00391b 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -2,3 +2,4 @@ add_subdirectory(csp) add_subdirectory(uart) add_subdirectory(utility) add_subdirectory(boardtest) +add_subdirectory(devices) diff --git a/linux/devices/CMakeLists.txt b/linux/devices/CMakeLists.txt new file mode 100644 index 00000000..3871a6a6 --- /dev/null +++ b/linux/devices/CMakeLists.txt @@ -0,0 +1,5 @@ +target_sources(${TARGET_NAME} PRIVATE + HeaterHandler.cpp + SolarArrayDeploymentHandler.cpp + SusHandler.cpp +) diff --git a/bsp_q7s/devices/HeaterHandler.cpp b/linux/devices/HeaterHandler.cpp similarity index 99% rename from bsp_q7s/devices/HeaterHandler.cpp rename to linux/devices/HeaterHandler.cpp index 6c5af7be..6f38eb52 100644 --- a/bsp_q7s/devices/HeaterHandler.cpp +++ b/linux/devices/HeaterHandler.cpp @@ -1,7 +1,8 @@ #include "HeaterHandler.h" -#include +#include "devices/gpioIds.h" +#include "devices/powerSwitcherList.h" + #include -#include #include HeaterHandler::HeaterHandler(object_id_t setObjectId_, object_id_t gpioDriverId_, diff --git a/bsp_q7s/devices/HeaterHandler.h b/linux/devices/HeaterHandler.h similarity index 100% rename from bsp_q7s/devices/HeaterHandler.h rename to linux/devices/HeaterHandler.h diff --git a/bsp_q7s/devices/SolarArrayDeploymentHandler.cpp b/linux/devices/SolarArrayDeploymentHandler.cpp similarity index 100% rename from bsp_q7s/devices/SolarArrayDeploymentHandler.cpp rename to linux/devices/SolarArrayDeploymentHandler.cpp diff --git a/bsp_q7s/devices/SolarArrayDeploymentHandler.h b/linux/devices/SolarArrayDeploymentHandler.h similarity index 100% rename from bsp_q7s/devices/SolarArrayDeploymentHandler.h rename to linux/devices/SolarArrayDeploymentHandler.h diff --git a/mission/devices/SusHandler.cpp b/linux/devices/SusHandler.cpp similarity index 99% rename from mission/devices/SusHandler.cpp rename to linux/devices/SusHandler.cpp index 59560707..c658eb67 100644 --- a/mission/devices/SusHandler.cpp +++ b/linux/devices/SusHandler.cpp @@ -1,6 +1,7 @@ -#include +#include "OBSWConfig.h" #include -#include + +#include #include SusHandler::SusHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie, diff --git a/mission/devices/SusHandler.h b/linux/devices/SusHandler.h similarity index 100% rename from mission/devices/SusHandler.h rename to linux/devices/SusHandler.h diff --git a/mission/devices/CMakeLists.txt b/mission/devices/CMakeLists.txt index 9965fedc..4088d98b 100644 --- a/mission/devices/CMakeLists.txt +++ b/mission/devices/CMakeLists.txt @@ -15,7 +15,6 @@ target_sources(${TARGET_NAME} PUBLIC IMTQHandler.cpp PlocHandler.cpp RadiationSensorHandler.cpp - SusHandler.cpp ) diff --git a/mission/devices/IMTQHandler.cpp b/mission/devices/IMTQHandler.cpp index 3111c39d..5751dd50 100644 --- a/mission/devices/IMTQHandler.cpp +++ b/mission/devices/IMTQHandler.cpp @@ -1,9 +1,9 @@ #include "IMTQHandler.h" +#include "OBSWConfig.h" -#include #include #include -#include + IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) : DeviceHandlerBase(objectId, comIF, comCookie), engHkDataset(this), calMtmMeasurementSet( diff --git a/mission/devices/PlocHandler.cpp b/mission/devices/PlocHandler.cpp index b0660ba0..2101915a 100644 --- a/mission/devices/PlocHandler.cpp +++ b/mission/devices/PlocHandler.cpp @@ -1,9 +1,8 @@ #include "PlocHandler.h" +#include "OBSWConfig.h" -#include #include #include -#include PlocHandler::PlocHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) : DeviceHandlerBase(objectId, comIF, comCookie) { diff --git a/mission/devices/PlocHandler.h b/mission/devices/PlocHandler.h index 06965d0f..c92b3705 100644 --- a/mission/devices/PlocHandler.h +++ b/mission/devices/PlocHandler.h @@ -3,7 +3,7 @@ #include #include -#include +#include /** * @brief This is the device handler for the PLOC. diff --git a/mission/devices/SyrlinksHkHandler.cpp b/mission/devices/SyrlinksHkHandler.cpp index bab5e551..7900b8e4 100644 --- a/mission/devices/SyrlinksHkHandler.cpp +++ b/mission/devices/SyrlinksHkHandler.cpp @@ -1,8 +1,9 @@ +#include "OBSWConfig.h" + #include -#include #include #include -#include + SyrlinksHkHandler::SyrlinksHkHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) : DeviceHandlerBase(objectId, comIF, comCookie), rxDataset(this), txDataset(this) { From d380e3106a567b0aba49b802a209fa4f9d1fe62a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 May 2021 16:53:06 +0200 Subject: [PATCH 17/79] q7s compiling --- CMakeLists.txt | 3 ++- bsp_q7s/CMakeLists.txt | 1 - bsp_q7s/ObjectFactory.cpp | 26 ++++++++++--------- bsp_q7s/devices/CMakeLists.txt | 4 --- cmake/scripts/Q7S/create_cmake_debug_cfg.sh | 4 ++- cmake/scripts/Q7S/create_cmake_release_cfg.sh | 4 ++- .../Q7S/create_cmake_relwithdeb_cfg.sh | 4 ++- etl | 1 - .../pollingSequenceFactory.cpp | 6 ++--- linux/devices/SusHandler.cpp | 2 +- 10 files changed, 29 insertions(+), 26 deletions(-) delete mode 100644 bsp_q7s/devices/CMakeLists.txt delete mode 160000 etl diff --git a/CMakeLists.txt b/CMakeLists.txt index ec57a867..c799f927 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,9 +94,10 @@ if(TGT_BSP) else() # Required by FSFW library set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig") - set(FSFW_ADDITIONAL_INC_PATH "${COMMON_PATH}/config") endif() +# Set common config path for FSFW +set(FSFW_ADDITIONAL_INC_PATH "${COMMON_PATH}/config") # Set for lwgps library set(LWGPS_CONFIG_PATH "${COMMON_PATH}/config") diff --git a/bsp_q7s/CMakeLists.txt b/bsp_q7s/CMakeLists.txt index e567628e..f741a46b 100644 --- a/bsp_q7s/CMakeLists.txt +++ b/bsp_q7s/CMakeLists.txt @@ -6,7 +6,6 @@ target_sources(${TARGET_NAME} PUBLIC add_subdirectory(boardconfig) add_subdirectory(comIF) -add_subdirectory(devices) add_subdirectory(boardtest) add_subdirectory(gpio) diff --git a/bsp_q7s/ObjectFactory.cpp b/bsp_q7s/ObjectFactory.cpp index 297f8167..22418bc5 100644 --- a/bsp_q7s/ObjectFactory.cpp +++ b/bsp_q7s/ObjectFactory.cpp @@ -1,16 +1,18 @@ #include "ObjectFactory.h" -#include -#include -#include -#include -#include -#include -#include +#include "OBSWConfig.h" +#include "tmtc/apid.h" +#include "devices/addresses.h" +#include "devices/gpioIds.h" +#include "tmtc/pusIds.h" +#include "devices/powerSwitcherList.h" +#include "devices/spi.h" -#include -#include #include +#include +#include +#include + #include #include #include @@ -26,7 +28,7 @@ #include #include #include -#include + #include #include @@ -42,6 +44,7 @@ #include #include + #include #include #include @@ -554,8 +557,7 @@ void ObjectFactory::produce(){ #endif /* TE0720 == 0 */ - new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR, objects::TM_STORE, - objects::TC_STORE); + new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR); new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE); #if TE0720 == 1 && TEST_LIBGPIOD == 1 diff --git a/bsp_q7s/devices/CMakeLists.txt b/bsp_q7s/devices/CMakeLists.txt deleted file mode 100644 index 9e6fb793..00000000 --- a/bsp_q7s/devices/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -target_sources(${TARGET_NAME} PRIVATE - HeaterHandler.cpp - SolarArrayDeploymentHandler.cpp -) diff --git a/cmake/scripts/Q7S/create_cmake_debug_cfg.sh b/cmake/scripts/Q7S/create_cmake_debug_cfg.sh index 7f6753ac..4875c59a 100755 --- a/cmake/scripts/Q7S/create_cmake_debug_cfg.sh +++ b/cmake/scripts/Q7S/create_cmake_debug_cfg.sh @@ -16,6 +16,7 @@ fi os_fsfw="linux" tgt_bsp="arm/q7s" +build_dir="build-Debug-Q7S" build_generator="" if [ "${OS}" = "Windows_NT" ]; then build_generator="MinGW Makefiles" @@ -24,4 +25,5 @@ else build_generator="Unix Makefiles" fi -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ + -l"${build_dir}" diff --git a/cmake/scripts/Q7S/create_cmake_release_cfg.sh b/cmake/scripts/Q7S/create_cmake_release_cfg.sh index 6048a1c6..0e2c543c 100755 --- a/cmake/scripts/Q7S/create_cmake_release_cfg.sh +++ b/cmake/scripts/Q7S/create_cmake_release_cfg.sh @@ -16,6 +16,7 @@ fi os_fsfw="linux" tgt_bsp="arm/q7s" +build_dir="build-Release-Q7S" build_generator="" if [ "${OS}" = "Windows_NT" ]; then build_generator="MinGW Makefiles" @@ -24,4 +25,5 @@ else build_generator="Unix Makefiles" fi -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \ + -l"${build_dir}" diff --git a/cmake/scripts/Q7S/create_cmake_relwithdeb_cfg.sh b/cmake/scripts/Q7S/create_cmake_relwithdeb_cfg.sh index 346067cd..121f2d7e 100755 --- a/cmake/scripts/Q7S/create_cmake_relwithdeb_cfg.sh +++ b/cmake/scripts/Q7S/create_cmake_relwithdeb_cfg.sh @@ -16,6 +16,7 @@ fi os_fsfw="linux" tgt_bsp="arm/q7s" +build_dir="build-Release-Q7S" build_generator="" if [ "${OS}" = "Windows_NT" ]; then build_generator="MinGW Makefiles" @@ -24,4 +25,5 @@ else build_generator="Unix Makefiles" fi -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "reldeb" -t "${tgt_bsp}" +python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "reldeb" -t "${tgt_bsp}" \ + -l"${build_dir}" diff --git a/etl b/etl deleted file mode 160000 index ae06e641..00000000 --- a/etl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ae06e6417702b770c49289c9e7162cb3f4a5a217 diff --git a/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index 1199ae2c..578b0c44 100644 --- a/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -1,12 +1,12 @@ #include "pollingSequenceFactory.h" -#include +#include "linux/devices/SusHandler.h" +#include "OBSWConfig.h" + #include #include #include #include #include -#include -#include ReturnValue_t pst::pollingSequenceInitDefault(FixedTimeslotTaskIF *thisSequence) diff --git a/linux/devices/SusHandler.cpp b/linux/devices/SusHandler.cpp index c658eb67..c31160c4 100644 --- a/linux/devices/SusHandler.cpp +++ b/linux/devices/SusHandler.cpp @@ -1,5 +1,5 @@ +#include "SusHandler.h" #include "OBSWConfig.h" -#include #include #include From ed3277f437303676c254076318d7f72e5f7ba914 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 May 2021 17:05:16 +0200 Subject: [PATCH 18/79] updated project files --- misc/eclipse/.cproject | 241 +++++++++++++++++---------------- misc/eclipse/make/.cproject | 257 ------------------------------------ misc/eclipse/make/.project | 27 ---- 3 files changed, 127 insertions(+), 398 deletions(-) delete mode 100644 misc/eclipse/make/.cproject delete mode 100644 misc/eclipse/make/.project diff --git a/misc/eclipse/.cproject b/misc/eclipse/.cproject index 6caf4a08..1b85c534 100644 --- a/misc/eclipse/.cproject +++ b/misc/eclipse/.cproject @@ -19,7 +19,7 @@ - + @@ -121,7 +121,7 @@ - +