diff --git a/CMakeLists.txt b/CMakeLists.txt index 9afa81ff..d057de50 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ cmake_minimum_required(VERSION 3.13) set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") if(TGT_BSP MATCHES "arm/q7s") - option(BUILD_WATCHDOG "Compile the OBSW watchdog insted" OFF) + option(EIVE_BUILD_WATCHDOG "Compile the OBSW watchdog insted" OFF) option(BUILD_Q7S_SIMPLE_MODE OFF "Simple mode with a minimal main function") endif() @@ -35,7 +35,7 @@ include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake) pre_project_config() set(PROJECT_NAME_TO_SET eive-obsw-$ENV{USERNAME}) -if(BUILD_WATCHDOG) +if(EIVE_BUILD_WATCHDOG) set(PROJECT_NAME_TO_SET eive-watchdog) endif() @@ -118,7 +118,7 @@ else() endif() # Configuration files -if(NOT BUILD_WATCHDOG) +if(NOT EIVE_BUILD_WATCHDOG) 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}/OBSWConfig.h.in OBSWConfig.h) @@ -155,7 +155,7 @@ endif() -if(NOT BUILD_WATCHDOG) +if(NOT EIVE_BUILD_WATCHDOG) if(ADD_LINUX_FILES) add_subdirectory(${LINUX_PATH}) endif() @@ -166,7 +166,7 @@ if(NOT BUILD_WATCHDOG) endif() endif() -if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT BUILD_WATCHDOG)) +if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT EIVE_BUILD_WATCHDOG)) add_subdirectory(${LWGPS_LIB_PATH}) add_subdirectory(${FSFW_PATH}) add_subdirectory(${MISSION_PATH}) @@ -174,7 +174,7 @@ if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT BUILD_WATCHDOG)) add_subdirectory(${ARCSEC_LIB_PATH}) endif() -if(BUILD_WATCHDOG) +if(EIVE_BUILD_WATCHDOG) add_subdirectory(${WATCHDOG_PATH}) endif() @@ -184,7 +184,7 @@ endif() set_property(CACHE FSFW_OSAL PROPERTY STRINGS host linux) -if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT BUILD_WATCHDOG)) +if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT EIVE_BUILD_WATCHDOG)) # Add libraries for all sources. target_link_libraries(${TARGET_NAME} PRIVATE ${LIB_FSFW_NAME} @@ -194,7 +194,7 @@ if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT BUILD_WATCHDOG)) ) endif() -if(NOT BUILD_WATCHDOG) +if(NOT EIVE_BUILD_WATCHDOG) if(ADD_CSP_LIB) target_link_libraries(${TARGET_NAME} PRIVATE ${LIB_CSP_NAME} @@ -275,7 +275,7 @@ if(NOT CMAKE_SIZE) endif() endif() -if(BUILD_WATCHDOG) +if(EIVE_BUILD_WATCHDOG) set(TARGET_STRING "OBSW Watchdog") else() if(TGT_BSP) diff --git a/README.md b/README.md index fc4163e1..a5947a93 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ cmake --build . -j ```sh mkdir build-Debug-Q7S && cd build-Debug-Q7S -cmake -DTGT_BSP=arm/q7s -DFSFW_OSAL=linux -DBUILD_WATCHDOG=ON -DCMAKE_BUILD_TYPE=Debug .. +cmake -DTGT_BSP=arm/q7s -DFSFW_OSAL=linux -DEIVE_BUILD_WATCHDOG=ON -DCMAKE_BUILD_TYPE=Debug .. cmake --build . -j ``` diff --git a/cmake/scripts/BeagleBoneBlack/create_cmake_debug_cfg.sh b/cmake/scripts/BeagleBoneBlack/create_cmake_debug_cfg.sh deleted file mode 100644 index cfa71d02..00000000 --- a/cmake/scripts/BeagleBoneBlack/create_cmake_debug_cfg.sh +++ /dev/null @@ -1,30 +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/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/create_cmake_debug_cfg.sh b/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_debug_cfg.sh deleted file mode 100644 index b413d07f..00000000 --- a/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_debug_cfg.sh +++ /dev/null @@ -1,30 +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/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 deleted file mode 100644 index 81e3322d..00000000 --- a/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_release_cfg.sh +++ /dev/null @@ -1,30 +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/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 deleted file mode 100644 index 81e3322d..00000000 --- a/cmake/scripts/BeagleBoneBlack/crosscompile/create_cmake_relwithdeb_cfg.sh +++ /dev/null @@ -1,30 +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/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/make-debug-cfg.sh b/cmake/scripts/BeagleBoneBlack/crosscompile/make-debug-cfg.sh new file mode 100755 index 00000000..ba8d94cc --- /dev/null +++ b/cmake/scripts/BeagleBoneBlack/crosscompile/make-debug-cfg.sh @@ -0,0 +1,35 @@ +#!/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/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 + +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 "${builddir}" -d "${defines}" +# Use this if commands are added which should not be printed +# set +x diff --git a/cmake/scripts/BeagleBoneBlack/crosscompile/make-release-cfg.sh b/cmake/scripts/BeagleBoneBlack/crosscompile/make-release-cfg.sh new file mode 100755 index 00000000..59d548c5 --- /dev/null +++ b/cmake/scripts/BeagleBoneBlack/crosscompile/make-release-cfg.sh @@ -0,0 +1,35 @@ +#!/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/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 + +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 "${builddir}" -d "${defines}" +# Use this if commands are added which should not be printed +# set +x diff --git a/cmake/scripts/BeagleBoneBlack/make-debug-cfg.sh b/cmake/scripts/BeagleBoneBlack/make-debug-cfg.sh new file mode 100755 index 00000000..ede76acf --- /dev/null +++ b/cmake/scripts/BeagleBoneBlack/make-debug-cfg.sh @@ -0,0 +1,35 @@ +#!/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/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 + +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 "${builddir}" -d "${defines}" +# Use this if commands are added which should not be printed +# set +x diff --git a/cmake/scripts/Host/create_cmake_release_cfg.sh b/cmake/scripts/Host/create_cmake_release_cfg.sh deleted file mode 100644 index 19ae5b32..00000000 --- a/cmake/scripts/Host/create_cmake_release_cfg.sh +++ /dev/null @@ -1,27 +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="" -os_fsfw="host" -build_dir="Release-Host" -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 "release" -l"${build_dir}" diff --git a/cmake/scripts/Host/create_cmake_relwithdeb_cfg.sh b/cmake/scripts/Host/create_cmake_relwithdeb_cfg.sh deleted file mode 100644 index f9321e69..00000000 --- a/cmake/scripts/Host/create_cmake_relwithdeb_cfg.sh +++ /dev/null @@ -1,26 +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="" -os_fsfw="host" -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 "reldeb" diff --git a/cmake/scripts/Host/create_cmake_size_cfg.sh b/cmake/scripts/Host/create_cmake_size_cfg.sh deleted file mode 100644 index 6a3cbe60..00000000 --- a/cmake/scripts/Host/create_cmake_size_cfg.sh +++ /dev/null @@ -1,26 +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="" -os_fsfw="host" -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 "size" \ No newline at end of file diff --git a/cmake/scripts/Host/make-debug-cfg.sh b/cmake/scripts/Host/make-debug-cfg.sh new file mode 100755 index 00000000..3bda2da2 --- /dev/null +++ b/cmake/scripts/Host/make-debug-cfg.sh @@ -0,0 +1,32 @@ +#!/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 + +build_generator="Unix Makefiles" +os_fsfw="host" +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 +${python} ${cfg_script_name} -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/Host/make-release-cfg.sh b/cmake/scripts/Host/make-release-cfg.sh new file mode 100755 index 00000000..eb0a9f57 --- /dev/null +++ b/cmake/scripts/Host/make-release-cfg.sh @@ -0,0 +1,32 @@ +#!/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 + +build_generator="Unix Makefiles" +os_fsfw="host" +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 +${python} ${cfg_script_name} -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/Host/make_debug_cfg.sh b/cmake/scripts/Host/make_debug_cfg.sh deleted file mode 100755 index 24be2099..00000000 --- a/cmake/scripts/Host/make_debug_cfg.sh +++ /dev/null @@ -1,27 +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="" -build_dir="build-Debug-Host" -os_fsfw="host" -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" -l"${build_dir}" diff --git a/cmake/scripts/Host/ninja-debug-cfg.sh b/cmake/scripts/Host/ninja-debug-cfg.sh new file mode 100755 index 00000000..d1627174 --- /dev/null +++ b/cmake/scripts/Host/ninja-debug-cfg.sh @@ -0,0 +1,32 @@ +#!/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 + +build_generator="Ninja" +os_fsfw="host" +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 +${python} ${cfg_script_name} -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/make_debug_cfg.sh b/cmake/scripts/Linux/make-debug-cfg.sh similarity index 58% rename from cmake/scripts/Linux/make_debug_cfg.sh rename to cmake/scripts/Linux/make-debug-cfg.sh index dc21896d..e2130416 100755 --- a/cmake/scripts/Linux/make_debug_cfg.sh +++ b/cmake/scripts/Linux/make-debug-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi build_generator="Unix Makefiles" @@ -26,7 +27,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" -l "${builddir}" +${python} ${cfg_script_name} -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/make_release_cfg.sh b/cmake/scripts/Linux/make-release-cfg.sh similarity index 58% rename from cmake/scripts/Linux/make_release_cfg.sh rename to cmake/scripts/Linux/make-release-cfg.sh index 95d87e70..0426967b 100755 --- a/cmake/scripts/Linux/make_release_cfg.sh +++ b/cmake/scripts/Linux/make-release-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi build_generator="Unix Makefiles" @@ -26,6 +27,6 @@ fi echo "Running command (without the leading +):" set -x # Print command -${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -l "${builddir}" +${python} ${cfg_script_name} -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/Linux/ninja_debug_cfg.sh b/cmake/scripts/Linux/ninja-debug-cfg.sh similarity index 57% rename from cmake/scripts/Linux/ninja_debug_cfg.sh rename to cmake/scripts/Linux/ninja-debug-cfg.sh index 9627ccf6..905612e0 100755 --- a/cmake/scripts/Linux/ninja_debug_cfg.sh +++ b/cmake/scripts/Linux/ninja-debug-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi build_generator="Ninja" @@ -26,7 +27,7 @@ fi echo "Running command (without the leading +):" set -x # Print command -${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}" +${python} ${cfg_script_name} -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/Q7S/make_debug_cfg.sh b/cmake/scripts/Q7S/make-debug-cfg.sh similarity index 59% rename from cmake/scripts/Q7S/make_debug_cfg.sh rename to cmake/scripts/Q7S/make-debug-cfg.sh index 4613d36a..c0807320 100755 --- a/cmake/scripts/Q7S/make_debug_cfg.sh +++ b/cmake/scripts/Q7S/make-debug-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi os_fsfw="linux" @@ -29,7 +30,7 @@ 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}" \ +${python} ${cfg_script_name} -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 similarity index 59% rename from cmake/scripts/Q7S/make_release_cfg.sh rename to cmake/scripts/Q7S/make-release-cfg.sh index 9d7992f3..c421f336 100755 --- a/cmake/scripts/Q7S/make_release_cfg.sh +++ b/cmake/scripts/Q7S/make-release-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi os_fsfw="linux" @@ -29,6 +30,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}" \ +${python} ${cfg_script_name} -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 similarity index 56% rename from cmake/scripts/Q7S/ninja_debug_cfg.sh rename to cmake/scripts/Q7S/ninja-debug-cfg.sh index abb68de2..9a6b35c8 100755 --- a/cmake/scripts/Q7S/ninja_debug_cfg.sh +++ b/cmake/scripts/Q7S/ninja-debug-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi os_fsfw="linux" @@ -27,7 +28,7 @@ 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}" \ +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ -l "${build_dir}" # set +x diff --git a/cmake/scripts/Q7S/ninja_release_cfg.sh b/cmake/scripts/Q7S/ninja-release-cfg.sh similarity index 56% rename from cmake/scripts/Q7S/ninja_release_cfg.sh rename to cmake/scripts/Q7S/ninja-release-cfg.sh index f5431d9a..a9c82d54 100755 --- a/cmake/scripts/Q7S/ninja_release_cfg.sh +++ b/cmake/scripts/Q7S/ninja-release-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi os_fsfw="linux" @@ -27,7 +28,7 @@ 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}" \ +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \ -l"${build_dir}" # set +x diff --git a/cmake/scripts/Q7S/simple/simple_make_debug_cfg.sh b/cmake/scripts/Q7S/simple/make-simple-debug-cfg.sh similarity index 62% rename from cmake/scripts/Q7S/simple/simple_make_debug_cfg.sh rename to cmake/scripts/Q7S/simple/make-simple-debug-cfg.sh index 50b87101..93f4a087 100755 --- a/cmake/scripts/Q7S/simple/simple_make_debug_cfg.sh +++ b/cmake/scripts/Q7S/simple/make-simple-debug-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi os_fsfw="linux" @@ -30,6 +31,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}" \ +${python} ${cfg_script_name} -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/simple_ninja_debug_cfg.sh b/cmake/scripts/Q7S/simple/ninja-simple-debug-cfg.sh similarity index 59% rename from cmake/scripts/Q7S/simple/simple_ninja_debug_cfg.sh rename to cmake/scripts/Q7S/simple/ninja-simple-debug-cfg.sh index c97b1e54..c1805eff 100755 --- a/cmake/scripts/Q7S/simple/simple_ninja_debug_cfg.sh +++ b/cmake/scripts/Q7S/simple/ninja-simple-debug-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi os_fsfw="linux" @@ -28,7 +29,7 @@ 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}" \ +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ -l "${build_dir}" -d "${definitions}" # set +x diff --git a/cmake/scripts/Q7S/watchdog/make_debug_cfg.sh b/cmake/scripts/Q7S/watchdog/make-debug-cfg.sh similarity index 58% rename from cmake/scripts/Q7S/watchdog/make_debug_cfg.sh rename to cmake/scripts/Q7S/watchdog/make-debug-cfg.sh index d5b58df9..0f829fea 100755 --- a/cmake/scripts/Q7S/watchdog/make_debug_cfg.sh +++ b/cmake/scripts/Q7S/watchdog/make-debug-cfg.sh @@ -1,24 +1,25 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + 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="BUILD_WATCHDOG=ON" +definitions="EIVE_BUILD_WATCHDOG=ON" if [ "${OS}" = "Windows_NT" ]; then build_generator="MinGW Makefiles" python="py" @@ -30,7 +31,7 @@ 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}" \ +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ -d "${definitions}" -l"${build_dir}" # set +x diff --git a/cmake/scripts/Q7S/watchdog/make_release_cfg.sh b/cmake/scripts/Q7S/watchdog/make-release-cfg.sh similarity index 95% rename from cmake/scripts/Q7S/watchdog/make_release_cfg.sh rename to cmake/scripts/Q7S/watchdog/make-release-cfg.sh index 726e82ed..c8df73d5 100755 --- a/cmake/scripts/Q7S/watchdog/make_release_cfg.sh +++ b/cmake/scripts/Q7S/watchdog/make-release-cfg.sh @@ -18,7 +18,7 @@ os_fsfw="linux" tgt_bsp="arm/q7s" build_dir="build-Release-Watchdog" build_generator="" -definitions="BUILD_WATCHDOG=ON" +definitions="EIVE_BUILD_WATCHDOG=ON" if [ "${OS}" = "Windows_NT" ]; then build_generator="MinGW Makefiles" python="py" diff --git a/cmake/scripts/Q7S/watchdog/ninja_debug_cfg.sh b/cmake/scripts/Q7S/watchdog/ninja-debug-cfg.sh similarity index 55% rename from cmake/scripts/Q7S/watchdog/ninja_debug_cfg.sh rename to cmake/scripts/Q7S/watchdog/ninja-debug-cfg.sh index 99a414e7..ed23bb6a 100755 --- a/cmake/scripts/Q7S/watchdog/ninja_debug_cfg.sh +++ b/cmake/scripts/Q7S/watchdog/ninja-debug-cfg.sh @@ -1,24 +1,25 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + 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="-DBUILD_WATCHDOG=ON" +definitions="EIVE_BUILD_WATCHDOG=ON" if [ "${OS}" = "Windows_NT" ]; then python="py" # Could be other OS but this works for now. @@ -28,7 +29,7 @@ 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}" \ +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ -d "${definitions}" -l "${build_dir}" # set +x diff --git a/cmake/scripts/Q7S/watchdog/ninja_release_cfg.sh b/cmake/scripts/Q7S/watchdog/ninja-release-cfg.sh similarity index 54% rename from cmake/scripts/Q7S/watchdog/ninja_release_cfg.sh rename to cmake/scripts/Q7S/watchdog/ninja-release-cfg.sh index 3e6beac3..d8f5e18e 100755 --- a/cmake/scripts/Q7S/watchdog/ninja_release_cfg.sh +++ b/cmake/scripts/Q7S/watchdog/ninja-release-cfg.sh @@ -1,24 +1,25 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + 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="BUILD_WATCHDOG=ON" +definitions="EIVE_BUILD_WATCHDOG=ON" if [ "${OS}" = "Windows_NT" ]; then python="py" # Could be other OS but this works for now. @@ -28,7 +29,7 @@ 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}" \ +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \ -d "${definitions}" -l"${build_dir}" # set +x diff --git a/cmake/scripts/RPi/make_debug_cfg.sh b/cmake/scripts/RPi/make-debug-cfg.sh similarity index 60% rename from cmake/scripts/RPi/make_debug_cfg.sh rename to cmake/scripts/RPi/make-debug-cfg.sh index dbb178de..3b95ceee 100755 --- a/cmake/scripts/RPi/make_debug_cfg.sh +++ b/cmake/scripts/RPi/make-debug-cfg.sh @@ -1,19 +1,21 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi + os_fsfw="linux" tgt_bsp="arm/raspberrypi" build_generator="" @@ -29,7 +31,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}" \ +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ -l"${build_dir}" # set +x - diff --git a/cmake/scripts/RPi/make-release-cfg.sh b/cmake/scripts/RPi/make-release-cfg.sh new file mode 100755 index 00000000..56b48735 --- /dev/null +++ b/cmake/scripts/RPi/make-release-cfg.sh @@ -0,0 +1,33 @@ +#!/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/raspberrypi" +build_generator="" +build_dir="build-Release-RPi" +if [ "${OS}" = "Windows_NT" ]; then + build_generator="MinGW Makefiles" +# Could be other OS but this works for now. +else + build_generator="Unix Makefiles" +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}" \ + -l"${build_dir}" +# set +x diff --git a/cmake/scripts/RPi/make_release_cfg.sh b/cmake/scripts/RPi/make_release_cfg.sh deleted file mode 100755 index 10e4b777..00000000 --- a/cmake/scripts/RPi/make_release_cfg.sh +++ /dev/null @@ -1,29 +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/raspberrypi" -build_generator="" -build_dir="build-Release-RPi" -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 "release" -t "${tgt_bsp}" \ - -l"${build_dir}" diff --git a/cmake/scripts/RPi/ninja_debug_cfg.sh b/cmake/scripts/RPi/ninja-debug-cfg.sh similarity index 56% rename from cmake/scripts/RPi/ninja_debug_cfg.sh rename to cmake/scripts/RPi/ninja-debug-cfg.sh index 3fa0e5f4..4cfb9854 100755 --- a/cmake/scripts/RPi/ninja_debug_cfg.sh +++ b/cmake/scripts/RPi/ninja-debug-cfg.sh @@ -1,17 +1,18 @@ #!/bin/sh counter=0 +cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. - if [ -f "cmake_build_config.py" ];then - break - fi - counter=$((counter=counter + 1)) + cd .. + if [ -f ${cfg_script_name} ];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 + echo "${cfg_script_name} not found in upper directories!" + exit 1 fi os_fsfw="linux" @@ -27,7 +28,7 @@ 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}" \ +${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \ -l"${build_dir}" # set +x diff --git a/cmake/scripts/cmake_build_config.py b/cmake/scripts/cmake-build-cfg.py similarity index 100% rename from cmake/scripts/cmake_build_config.py rename to cmake/scripts/cmake-build-cfg.py