From 3f177d3321cadf80bf933bc1b8567cb9364fc9c5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Jun 2021 15:18:41 +0200 Subject: [PATCH 1/5] simple mode implemented --- CMakeLists.txt | 4 +++ bsp_q7s/CMakeLists.txt | 2 -- bsp_q7s/boardconfig/q7sConfig.h.in | 1 + bsp_q7s/core/CMakeLists.txt | 3 ++ bsp_q7s/{ => core}/InitMission.cpp | 0 bsp_q7s/{ => core}/InitMission.h | 0 bsp_q7s/{ => core}/ObjectFactory.cpp | 0 bsp_q7s/{ => core}/ObjectFactory.h | 0 bsp_q7s/core/obsw.cpp | 25 ++++++++++++++ bsp_q7s/core/obsw.h | 10 ++++++ bsp_q7s/main.cpp | 32 +++++------------ bsp_q7s/simple/simple.cpp | 5 +++ bsp_q7s/simple/simple.h | 10 ++++++ cmake/scripts/Q7S/make_debug_cfg.sh | 8 ++++- cmake/scripts/Q7S/make_release_cfg.sh | 11 ++++-- cmake/scripts/Q7S/ninja_debug_cfg.sh | 23 ------------- ...reldeb_cfg.sh => simple_make_debug_cfg.sh} | 12 +++++-- cmake/scripts/Q7S/simple_ninja_debug_cfg.sh | 34 +++++++++++++++++++ 18 files changed, 125 insertions(+), 55 deletions(-) rename bsp_q7s/{ => core}/InitMission.cpp (100%) rename bsp_q7s/{ => core}/InitMission.h (100%) rename bsp_q7s/{ => core}/ObjectFactory.cpp (100%) rename bsp_q7s/{ => core}/ObjectFactory.h (100%) create mode 100644 bsp_q7s/core/obsw.cpp create mode 100644 bsp_q7s/core/obsw.h create mode 100644 bsp_q7s/simple/simple.cpp create mode 100644 bsp_q7s/simple/simple.h delete mode 100755 cmake/scripts/Q7S/ninja_debug_cfg.sh rename cmake/scripts/Q7S/{make_reldeb_cfg.sh => simple_make_debug_cfg.sh} (59%) create mode 100755 cmake/scripts/Q7S/simple_ninja_debug_cfg.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 33c6edfc..10149bb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,10 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +if(TGT_BSP MATCHES "arm/q7s") + option(Q7S_SIMPLE_MODE OFF "Simple mode with a minimal main function") +endif() + option(ADD_ETL_LIB "Add ETL library" ON) if(NOT OS_FSFW) set(OS_FSFW host CACHE STRING "OS for the FSFW.") diff --git a/bsp_q7s/CMakeLists.txt b/bsp_q7s/CMakeLists.txt index ce790656..ca260250 100644 --- a/bsp_q7s/CMakeLists.txt +++ b/bsp_q7s/CMakeLists.txt @@ -1,7 +1,5 @@ target_sources(${TARGET_NAME} PUBLIC - InitMission.cpp main.cpp - ObjectFactory.cpp ) add_subdirectory(boardconfig) diff --git a/bsp_q7s/boardconfig/q7sConfig.h.in b/bsp_q7s/boardconfig/q7sConfig.h.in index 81b96a7e..6ee84821 100644 --- a/bsp_q7s/boardconfig/q7sConfig.h.in +++ b/bsp_q7s/boardconfig/q7sConfig.h.in @@ -1,6 +1,7 @@ #ifndef BSP_Q7S_BOARDCONFIG_Q7S_CONFIG_H_ #define BSP_Q7S_BOARDCONFIG_Q7S_CONFIG_H_ +#cmakedefine01 Q7S_SIMPLE_MODE #define Q7S_ADD_RTD_DEVICES 0 /* Only one of those 2 should be enabled! */ diff --git a/bsp_q7s/core/CMakeLists.txt b/bsp_q7s/core/CMakeLists.txt index 4b2364c1..fc397f2f 100644 --- a/bsp_q7s/core/CMakeLists.txt +++ b/bsp_q7s/core/CMakeLists.txt @@ -1,3 +1,6 @@ target_sources(${TARGET_NAME} PRIVATE CoreController.cpp + obsw.cpp + InitMission.cpp + ObjectFactory.cpp ) diff --git a/bsp_q7s/InitMission.cpp b/bsp_q7s/core/InitMission.cpp similarity index 100% rename from bsp_q7s/InitMission.cpp rename to bsp_q7s/core/InitMission.cpp diff --git a/bsp_q7s/InitMission.h b/bsp_q7s/core/InitMission.h similarity index 100% rename from bsp_q7s/InitMission.h rename to bsp_q7s/core/InitMission.h diff --git a/bsp_q7s/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp similarity index 100% rename from bsp_q7s/ObjectFactory.cpp rename to bsp_q7s/core/ObjectFactory.cpp diff --git a/bsp_q7s/ObjectFactory.h b/bsp_q7s/core/ObjectFactory.h similarity index 100% rename from bsp_q7s/ObjectFactory.h rename to bsp_q7s/core/ObjectFactory.h diff --git a/bsp_q7s/core/obsw.cpp b/bsp_q7s/core/obsw.cpp new file mode 100644 index 00000000..f813bcae --- /dev/null +++ b/bsp_q7s/core/obsw.cpp @@ -0,0 +1,25 @@ +#include "obsw.h" +#include "OBSWVersion.h" +#include "InitMission.h" +#include "fsfw/tasks/TaskFactory.h" +#include + +int obsw::obsw() { + std::cout << "-- EIVE OBSW --" << std::endl; +#if TE0720 == 0 + std::cout << "-- Compiled for Linux (Xiphos Q7S) --" << std::endl; +#else + std::cout << "-- Compiled for Linux (TE0720) --" << std::endl; +#endif + std::cout << "-- Software version " << SW_NAME << " v" << SW_VERSION << "." + << SW_SUBVERSION << "." << SW_SUBSUBVERSION << " -- " << std::endl; + std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl; + + initmission::initMission(); + + for(;;) { + /* Suspend main thread by sleeping it. */ + TaskFactory::delayTask(5000); + } + return 0; +} diff --git a/bsp_q7s/core/obsw.h b/bsp_q7s/core/obsw.h new file mode 100644 index 00000000..c2d974ae --- /dev/null +++ b/bsp_q7s/core/obsw.h @@ -0,0 +1,10 @@ +#ifndef BSP_Q7S_CORE_OBSW_H_ +#define BSP_Q7S_CORE_OBSW_H_ + +namespace obsw { + +int obsw(); + +}; + +#endif /* BSP_Q7S_CORE_OBSW_H_ */ diff --git a/bsp_q7s/main.cpp b/bsp_q7s/main.cpp index 06f454c2..93968b76 100644 --- a/bsp_q7s/main.cpp +++ b/bsp_q7s/main.cpp @@ -1,11 +1,10 @@ -#include "InitMission.h" -#include -#include -#include "OBSWConfig.h" +#include "q7sConfig.h" -#include - -#include +#if Q7S_SIMPLE_MODE == 0 +#include "core/obsw.h" +#else +#include "simple/simple.h" +#endif /** * @brief This is the main program for the target hardware. @@ -13,22 +12,9 @@ */ int main(void) { - std::cout << "-- EIVE OBSW --" << std::endl; -#if TE0720 == 0 - std::cout << "-- Compiled for Linux (Xiphos Q7S) --" << std::endl; +#if Q7S_SIMPLE_MODE == 0 + return obsw::obsw(); #else - std::cout << "-- Compiled for Linux (TE0720) --" << std::endl; + return simple::simple(); #endif - std::cout << "-- Software version " << SW_NAME << " v" << SW_VERSION << "." - << SW_SUBVERSION << "." << SW_SUBSUBVERSION << " -- " << std::endl; - std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl; - - initmission::initMission(); - - for(;;) { - /* Suspend main thread by sleeping it. */ - TaskFactory::delayTask(5000); - } } - - diff --git a/bsp_q7s/simple/simple.cpp b/bsp_q7s/simple/simple.cpp new file mode 100644 index 00000000..6261bfe3 --- /dev/null +++ b/bsp_q7s/simple/simple.cpp @@ -0,0 +1,5 @@ +#include "simple.h" + +int simple::simple() { + return 0; +} diff --git a/bsp_q7s/simple/simple.h b/bsp_q7s/simple/simple.h new file mode 100644 index 00000000..096a7b7c --- /dev/null +++ b/bsp_q7s/simple/simple.h @@ -0,0 +1,10 @@ +#ifndef BSP_Q7S_SIMPLE_SIMPLE_H_ +#define BSP_Q7S_SIMPLE_SIMPLE_H_ + +namespace simple { + +int simple(); + +} + +#endif /* BSP_Q7S_SIMPLE_SIMPLE_H_ */ diff --git a/cmake/scripts/Q7S/make_debug_cfg.sh b/cmake/scripts/Q7S/make_debug_cfg.sh index 4875c59a..4613d36a 100755 --- a/cmake/scripts/Q7S/make_debug_cfg.sh +++ b/cmake/scripts/Q7S/make_debug_cfg.sh @@ -20,10 +20,16 @@ build_dir="build-Debug-Q7S" build_generator="" 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 -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ +echo "Running command (without the leading +):" +set -x # Print command +${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ -l"${build_dir}" +# set +x + diff --git a/cmake/scripts/Q7S/make_release_cfg.sh b/cmake/scripts/Q7S/make_release_cfg.sh index 0e2c543c..9d7992f3 100755 --- a/cmake/scripts/Q7S/make_release_cfg.sh +++ b/cmake/scripts/Q7S/make_release_cfg.sh @@ -16,14 +16,19 @@ fi os_fsfw="linux" tgt_bsp="arm/q7s" -build_dir="build-Release-Q7S" +build_dir="build-Debug-Q7S" build_generator="" 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 -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \ - -l"${build_dir}" +echo "Running command (without the leading +):" +set -x # Print command +${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ + -l"${build_dir}" +# set +x diff --git a/cmake/scripts/Q7S/ninja_debug_cfg.sh b/cmake/scripts/Q7S/ninja_debug_cfg.sh deleted file mode 100755 index 3a8ac631..00000000 --- a/cmake/scripts/Q7S/ninja_debug_cfg.sh +++ /dev/null @@ -1,23 +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-Debug-Q7S" -build_generator="Ninja" - -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/make_reldeb_cfg.sh b/cmake/scripts/Q7S/simple_make_debug_cfg.sh similarity index 59% rename from cmake/scripts/Q7S/make_reldeb_cfg.sh rename to cmake/scripts/Q7S/simple_make_debug_cfg.sh index 121f2d7e..2ca0ab79 100755 --- a/cmake/scripts/Q7S/make_reldeb_cfg.sh +++ b/cmake/scripts/Q7S/simple_make_debug_cfg.sh @@ -16,14 +16,20 @@ fi os_fsfw="linux" tgt_bsp="arm/q7s" -build_dir="build-Release-Q7S" +build_dir="build-Debug-Q7S" build_generator="" +definitions="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 -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "reldeb" -t "${tgt_bsp}" \ - -l"${build_dir}" +echo "Running command (without the leading +):" +set -x # Print command +${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ + -l"${build_dir}" -d "${definitions} +# set +x diff --git a/cmake/scripts/Q7S/simple_ninja_debug_cfg.sh b/cmake/scripts/Q7S/simple_ninja_debug_cfg.sh new file mode 100755 index 00000000..0ec8a155 --- /dev/null +++ b/cmake/scripts/Q7S/simple_ninja_debug_cfg.sh @@ -0,0 +1,34 @@ +#!/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-Debug-Q7S" +build_generator="Ninja" +definitions="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} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ + -l"${build_dir}" -d "${definitions} +# set +x + From 7d7b119d01b35e6491be1efa6c43932fcfaef279 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Jun 2021 15:32:15 +0200 Subject: [PATCH 2/5] simple mode working --- CMakeLists.txt | 43 +++++++++++---------- bsp_q7s/CMakeLists.txt | 14 ++++--- bsp_q7s/simple/CMakeLists.txt | 3 ++ cmake/scripts/Q7S/simple_make_debug_cfg.sh | 2 +- cmake/scripts/Q7S/simple_ninja_debug_cfg.sh | 2 +- 5 files changed, 37 insertions(+), 27 deletions(-) create mode 100644 bsp_q7s/simple/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 10149bb6..10c3a349 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,9 +78,11 @@ if(TGT_BSP) OR ${TGT_BSP} MATCHES "arm/beagleboneblack" ) set(FSFW_CONFIG_PATH "linux/fsfwconfig") - set(ADD_LINUX_FILES TRUE) - set(ADD_CSP_LIB TRUE) - set(FSFW_HAL_ADD_LINUX ON) + if(NOT Q7S_SIMPLE_MODE) + set(ADD_LINUX_FILES TRUE) + set(ADD_CSP_LIB TRUE) + set(FSFW_HAL_ADD_LINUX ON) + endif() endif() if(${TGT_BSP} MATCHES "arm/raspberrypi") @@ -137,27 +139,33 @@ if(ADD_LINUX_FILES) add_subdirectory(${LINUX_PATH}) endif() -add_subdirectory(${LWGPS_LIB_PATH}) add_subdirectory(${BSP_PATH}) -add_subdirectory(${FSFW_PATH}) -add_subdirectory(${MISSION_PATH}) -add_subdirectory(${TEST_PATH}) -add_subdirectory(${FSFW_HAL_LIB_PATH}) add_subdirectory(${COMMON_PATH}) +if(NOT Q7S_SIMPLE_MODE) + add_subdirectory(${LWGPS_LIB_PATH}) + add_subdirectory(${FSFW_PATH}) + add_subdirectory(${MISSION_PATH}) + add_subdirectory(${TEST_PATH}) + add_subdirectory(${FSFW_HAL_LIB_PATH}) +endif() + + ################################################################################ # Post-Sources preparation ################################################################################ set_property(CACHE OS_FSFW PROPERTY STRINGS host linux) -# Add libraries for all sources. -target_link_libraries(${TARGET_NAME} PRIVATE - ${LIB_FSFW_NAME} - ${LIB_OS_NAME} - ${LIB_LWGPS_NAME} - ${LIB_FSFW_HAL_NAME} -) +if(NOT Q7S_SIMPLE_MODE) + # Add libraries for all sources. + target_link_libraries(${TARGET_NAME} PRIVATE + ${LIB_FSFW_NAME} + ${LIB_OS_NAME} + ${LIB_LWGPS_NAME} + ${LIB_FSFW_HAL_NAME} + ) +endif() if(ADD_ETL_LIB) target_link_libraries(${TARGET_NAME} PRIVATE @@ -247,8 +255,3 @@ add_custom_command( include (${CMAKE_SCRIPT_PATH}/BuildType.cmake) set_build_type() - - - - - diff --git a/bsp_q7s/CMakeLists.txt b/bsp_q7s/CMakeLists.txt index ca260250..bc027af0 100644 --- a/bsp_q7s/CMakeLists.txt +++ b/bsp_q7s/CMakeLists.txt @@ -2,8 +2,12 @@ target_sources(${TARGET_NAME} PUBLIC main.cpp ) -add_subdirectory(boardconfig) -add_subdirectory(comIF) -add_subdirectory(boardtest) -add_subdirectory(gpio) -add_subdirectory(core) +if(Q7S_SIMPLE_MODE) + add_subdirectory(simple) +else() + add_subdirectory(boardconfig) + add_subdirectory(comIF) + add_subdirectory(boardtest) + add_subdirectory(gpio) + add_subdirectory(core) +endif() diff --git a/bsp_q7s/simple/CMakeLists.txt b/bsp_q7s/simple/CMakeLists.txt new file mode 100644 index 00000000..399a1dd3 --- /dev/null +++ b/bsp_q7s/simple/CMakeLists.txt @@ -0,0 +1,3 @@ +target_sources(${TARGET_NAME} PRIVATE + simple.cpp +) diff --git a/cmake/scripts/Q7S/simple_make_debug_cfg.sh b/cmake/scripts/Q7S/simple_make_debug_cfg.sh index 2ca0ab79..8b687504 100755 --- a/cmake/scripts/Q7S/simple_make_debug_cfg.sh +++ b/cmake/scripts/Q7S/simple_make_debug_cfg.sh @@ -31,5 +31,5 @@ fi echo "Running command (without the leading +):" set -x # Print command ${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ - -l"${build_dir}" -d "${definitions} + -l"${build_dir}" -d "${definitions}" # set +x diff --git a/cmake/scripts/Q7S/simple_ninja_debug_cfg.sh b/cmake/scripts/Q7S/simple_ninja_debug_cfg.sh index 0ec8a155..fa4d64f3 100755 --- a/cmake/scripts/Q7S/simple_ninja_debug_cfg.sh +++ b/cmake/scripts/Q7S/simple_ninja_debug_cfg.sh @@ -29,6 +29,6 @@ fi echo "Running command (without the leading +):" set -x # Print command ${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ - -l"${build_dir}" -d "${definitions} + -l"${build_dir}" -d "${definitions}" # set +x From 55a49dd45c3d7e48c0733256fb022bd6a6b2a1ec Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Jun 2021 15:36:27 +0200 Subject: [PATCH 3/5] updated more build scripts --- cmake/scripts/Linux/create_cmake_debug_cfg.sh | 8 +++++++- .../scripts/Linux/create_cmake_release_cfg.sh | 8 +++++++- .../ninja_debug_cfg.sh} | 18 +++++++++++------- cmake/scripts/RPi/make_debug_cfg.sh | 10 ++++++++-- cmake/scripts/RPi/ninja_debug_cfg.sh | 14 ++++++++++++-- 5 files changed, 45 insertions(+), 13 deletions(-) rename cmake/scripts/{RPi/make_reldeb_cfg.sh => Q7S/ninja_debug_cfg.sh} (53%) diff --git a/cmake/scripts/Linux/create_cmake_debug_cfg.sh b/cmake/scripts/Linux/create_cmake_debug_cfg.sh index 1207884e..8c626bf4 100755 --- a/cmake/scripts/Linux/create_cmake_debug_cfg.sh +++ b/cmake/scripts/Linux/create_cmake_debug_cfg.sh @@ -17,9 +17,15 @@ fi build_generator="Unix Makefiles" os_fsfw="linux" builddir="build-Debug-Host" +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 -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" +${python} 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_release_cfg.sh b/cmake/scripts/Linux/create_cmake_release_cfg.sh index 4412e671..95d87e70 100755 --- a/cmake/scripts/Linux/create_cmake_release_cfg.sh +++ b/cmake/scripts/Linux/create_cmake_release_cfg.sh @@ -17,9 +17,15 @@ fi build_generator="Unix Makefiles" os_fsfw="linux" builddir="build-Release-Host" +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 -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" +${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -l "${builddir}" # Use this if commands are added which should not be printed # set +x diff --git a/cmake/scripts/RPi/make_reldeb_cfg.sh b/cmake/scripts/Q7S/ninja_debug_cfg.sh similarity index 53% rename from cmake/scripts/RPi/make_reldeb_cfg.sh rename to cmake/scripts/Q7S/ninja_debug_cfg.sh index de7651a7..2d3b333f 100755 --- a/cmake/scripts/RPi/make_reldeb_cfg.sh +++ b/cmake/scripts/Q7S/ninja_debug_cfg.sh @@ -15,15 +15,19 @@ if [ "${counter}" -ge 5 ];then fi os_fsfw="linux" -tgt_bsp="arm/raspberrypi" -build_generator="" -build_dir="RelWithDeb-RPi" +tgt_bsp="arm/q7s" +build_dir="build-Debug-Q7S" +build_generator="Ninja" 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 -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "reldeb" -t "${tgt_bsp}" \ - -l"${build_dir}" +echo "Running command (without the leading +):" +set -x # Print command +${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ + -l"${build_dir}" +# set +x + diff --git a/cmake/scripts/RPi/make_debug_cfg.sh b/cmake/scripts/RPi/make_debug_cfg.sh index 57561846..dbb178de 100755 --- a/cmake/scripts/RPi/make_debug_cfg.sh +++ b/cmake/scripts/RPi/make_debug_cfg.sh @@ -20,10 +20,16 @@ build_generator="" build_dir="build-Debug-RPi" 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 -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ - -l"${build_dir}" +echo "Running command (without the leading +):" +set -x # Print command +${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ + -l"${build_dir}" +# set +x + diff --git a/cmake/scripts/RPi/ninja_debug_cfg.sh b/cmake/scripts/RPi/ninja_debug_cfg.sh index c05ae446..3fa0e5f4 100755 --- a/cmake/scripts/RPi/ninja_debug_cfg.sh +++ b/cmake/scripts/RPi/ninja_debug_cfg.sh @@ -18,6 +18,16 @@ os_fsfw="linux" tgt_bsp="arm/raspberrypi" build_generator="Ninja" build_dir="build-Debug-RPi" +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} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ + -l"${build_dir}" +# set +x -python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ - -l"${build_dir}" From ddfa0b474b74bdf39c2d489739308758015735e9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Jun 2021 15:40:49 +0200 Subject: [PATCH 4/5] deleted unneeded file --- bsp_q7s/bsp_q7s.mk | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 bsp_q7s/bsp_q7s.mk diff --git a/bsp_q7s/bsp_q7s.mk b/bsp_q7s/bsp_q7s.mk deleted file mode 100644 index 93bfdc78..00000000 --- a/bsp_q7s/bsp_q7s.mk +++ /dev/null @@ -1,6 +0,0 @@ -CXXSRC += $(wildcard $(CURRENTPATH)/*.cpp) -CXXSRC += $(wildcard $(CURRENTPATH)/comIF/cookies/*.cpp) -CXXSRC += $(wildcard $(CURRENTPATH)/comIF/*.cpp) -CSRC += $(wildcard $(CURRENTPATH)/*.c) - -CSRC += $(wildcard $(CURRENTPATH)/boardconfig/*.c) \ No newline at end of file From 8e290b5831822b2734a0af00cb8ebb0864211837 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Jun 2021 15:45:57 +0200 Subject: [PATCH 5/5] updated project file --- .../Q7S/{ => simple}/simple_make_debug_cfg.sh | 2 +- .../{ => simple}/simple_ninja_debug_cfg.sh | 2 +- misc/eclipse/.cproject | 186 ++++++++++++++++-- 3 files changed, 176 insertions(+), 14 deletions(-) rename cmake/scripts/Q7S/{ => simple}/simple_make_debug_cfg.sh (96%) rename cmake/scripts/Q7S/{ => simple}/simple_ninja_debug_cfg.sh (95%) diff --git a/cmake/scripts/Q7S/simple_make_debug_cfg.sh b/cmake/scripts/Q7S/simple/simple_make_debug_cfg.sh similarity index 96% rename from cmake/scripts/Q7S/simple_make_debug_cfg.sh rename to cmake/scripts/Q7S/simple/simple_make_debug_cfg.sh index 8b687504..b692184a 100755 --- a/cmake/scripts/Q7S/simple_make_debug_cfg.sh +++ b/cmake/scripts/Q7S/simple/simple_make_debug_cfg.sh @@ -16,7 +16,7 @@ fi os_fsfw="linux" tgt_bsp="arm/q7s" -build_dir="build-Debug-Q7S" +build_dir="build-Simple-Q7S" build_generator="" definitions="Q7S_SIMPLE_MODE=On" if [ "${OS}" = "Windows_NT" ]; then diff --git a/cmake/scripts/Q7S/simple_ninja_debug_cfg.sh b/cmake/scripts/Q7S/simple/simple_ninja_debug_cfg.sh similarity index 95% rename from cmake/scripts/Q7S/simple_ninja_debug_cfg.sh rename to cmake/scripts/Q7S/simple/simple_ninja_debug_cfg.sh index fa4d64f3..a3a55521 100755 --- a/cmake/scripts/Q7S/simple_ninja_debug_cfg.sh +++ b/cmake/scripts/Q7S/simple/simple_ninja_debug_cfg.sh @@ -16,7 +16,7 @@ fi os_fsfw="linux" tgt_bsp="arm/q7s" -build_dir="build-Debug-Q7S" +build_dir="build-Simple-Q7S" build_generator="Ninja" definitions="Q7S_SIMPLE_MODE=On" if [ "${OS}" = "Windows_NT" ]; then diff --git a/misc/eclipse/.cproject b/misc/eclipse/.cproject index 22a4a09c..a562e7b2 100644 --- a/misc/eclipse/.cproject +++ b/misc/eclipse/.cproject @@ -234,7 +234,7 @@ - + @@ -250,7 +250,7 @@ - + - + @@ -405,7 +405,7 @@ - + - + @@ -562,7 +562,7 @@ - + - + @@ -720,7 +720,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -869,6 +1028,9 @@ + + + @@ -876,9 +1038,9 @@ - - + +