diff --git a/Justfile b/Justfile new file mode 100644 index 00000000..f9d9504b --- /dev/null +++ b/Justfile @@ -0,0 +1,9 @@ +python_script := './cmake/scripts/cmake-build-cfg.py' + +default: q7s-debug-make + +q7s-debug-make: + {{python_script}} -o linux -g make -b debug -t "arm/q7s" -l build-Debug-Q7S + +q7s-debug-ninja: + {{python_script}} -o linux -g ninja -b debug -t "arm/q7s" -l build-Debug-Q7S diff --git a/cmake/scripts/Host/make-debug-cfg.sh b/cmake/scripts/Host/make-debug-cfg.sh index 3bda2da2..de0487ea 100755 --- a/cmake/scripts/Host/make-debug-cfg.sh +++ b/cmake/scripts/Host/make-debug-cfg.sh @@ -15,7 +15,7 @@ if [ "${counter}" -ge 5 ];then exit 1 fi -build_generator="Unix Makefiles" +build_generator="make" os_fsfw="host" builddir="build-Debug-Host" if [ "${OS}" = "Windows_NT" ]; then diff --git a/cmake/scripts/Host/make-release-cfg.sh b/cmake/scripts/Host/make-release-cfg.sh index eb0a9f57..5114f490 100755 --- a/cmake/scripts/Host/make-release-cfg.sh +++ b/cmake/scripts/Host/make-release-cfg.sh @@ -15,7 +15,7 @@ if [ "${counter}" -ge 5 ];then exit 1 fi -build_generator="Unix Makefiles" +build_generator="make" os_fsfw="host" builddir="build-Release-Host" if [ "${OS}" = "Windows_NT" ]; then diff --git a/cmake/scripts/Host/ninja-debug-cfg.sh b/cmake/scripts/Host/ninja-debug-cfg.sh index d1627174..80a5687f 100755 --- a/cmake/scripts/Host/ninja-debug-cfg.sh +++ b/cmake/scripts/Host/ninja-debug-cfg.sh @@ -15,7 +15,7 @@ if [ "${counter}" -ge 5 ];then exit 1 fi -build_generator="Ninja" +build_generator="ninja" os_fsfw="host" builddir="build-Debug-Host" if [ "${OS}" = "Windows_NT" ]; then diff --git a/cmake/scripts/Linux/make-debug-cfg.sh b/cmake/scripts/Linux/make-debug-cfg.sh index e2130416..2207a2e8 100755 --- a/cmake/scripts/Linux/make-debug-cfg.sh +++ b/cmake/scripts/Linux/make-debug-cfg.sh @@ -15,7 +15,7 @@ if [ "${counter}" -ge 5 ];then exit 1 fi -build_generator="Unix Makefiles" +build_generator="make" os_fsfw="linux" builddir="build-Debug-Host" if [ "${OS}" = "Windows_NT" ]; then diff --git a/cmake/scripts/Linux/ninja-debug-cfg.sh b/cmake/scripts/Linux/ninja-debug-cfg.sh index 905612e0..23ebc25d 100755 --- a/cmake/scripts/Linux/ninja-debug-cfg.sh +++ b/cmake/scripts/Linux/ninja-debug-cfg.sh @@ -15,7 +15,7 @@ if [ "${counter}" -ge 5 ];then exit 1 fi -build_generator="Ninja" +build_generator="ninja" os_fsfw="linux" builddir="build-Debug-Host" if [ "${OS}" = "Windows_NT" ]; then diff --git a/cmake/scripts/Q7S/make-debug-cfg.sh b/cmake/scripts/Q7S/make-debug-cfg.sh index c0807320..f3cfd81c 100755 --- a/cmake/scripts/Q7S/make-debug-cfg.sh +++ b/cmake/scripts/Q7S/make-debug-cfg.sh @@ -18,13 +18,11 @@ fi os_fsfw="linux" tgt_bsp="arm/q7s" build_dir="build-Debug-Q7S" -build_generator="" +build_generator="make" 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 diff --git a/cmake/scripts/Q7S/make-release-cfg.sh b/cmake/scripts/Q7S/make-release-cfg.sh index c421f336..d71dcc83 100755 --- a/cmake/scripts/Q7S/make-release-cfg.sh +++ b/cmake/scripts/Q7S/make-release-cfg.sh @@ -18,13 +18,11 @@ fi os_fsfw="linux" tgt_bsp="arm/q7s" build_dir="build-Debug-Q7S" -build_generator="" +build_generator="make" 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 diff --git a/cmake/scripts/Q7S/ninja-debug-cfg.sh b/cmake/scripts/Q7S/ninja-debug-cfg.sh index 9a6b35c8..bd9ebb4e 100755 --- a/cmake/scripts/Q7S/ninja-debug-cfg.sh +++ b/cmake/scripts/Q7S/ninja-debug-cfg.sh @@ -18,7 +18,7 @@ fi os_fsfw="linux" tgt_bsp="arm/q7s" build_dir="build-Debug-Q7S" -build_generator="Ninja" +build_generator="ninja" if [ "${OS}" = "Windows_NT" ]; then python="py" # Could be other OS but this works for now. diff --git a/cmake/scripts/Q7S/ninja-release-cfg.sh b/cmake/scripts/Q7S/ninja-release-cfg.sh index a9c82d54..c9972c89 100755 --- a/cmake/scripts/Q7S/ninja-release-cfg.sh +++ b/cmake/scripts/Q7S/ninja-release-cfg.sh @@ -18,7 +18,7 @@ fi os_fsfw="linux" tgt_bsp="arm/q7s" build_dir="build-Release-Q7S" -build_generator="Ninja" +build_generator="ninja" if [ "${OS}" = "Windows_NT" ]; then python="py" # Could be other OS but this works for now. diff --git a/cmake/scripts/RPi/make-debug-cfg.sh b/cmake/scripts/RPi/make-debug-cfg.sh index 3b95ceee..f4d006c3 100755 --- a/cmake/scripts/RPi/make-debug-cfg.sh +++ b/cmake/scripts/RPi/make-debug-cfg.sh @@ -18,14 +18,12 @@ fi os_fsfw="linux" tgt_bsp="arm/raspberrypi" -build_generator="" +build_generator="make" 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 diff --git a/cmake/scripts/RPi/ninja-debug-cfg.sh b/cmake/scripts/RPi/ninja-debug-cfg.sh index 4cfb9854..13096fd6 100755 --- a/cmake/scripts/RPi/ninja-debug-cfg.sh +++ b/cmake/scripts/RPi/ninja-debug-cfg.sh @@ -17,7 +17,7 @@ fi os_fsfw="linux" tgt_bsp="arm/raspberrypi" -build_generator="Ninja" +build_generator="ninja" build_dir="build-Debug-RPi" if [ "${OS}" = "Windows_NT" ]; then python="py" diff --git a/cmake/scripts/cmake-build-cfg.py b/cmake/scripts/cmake-build-cfg.py index e3259fd4..5d1b1048 100755 --- a/cmake/scripts/cmake-build-cfg.py +++ b/cmake/scripts/cmake-build-cfg.py @@ -29,7 +29,9 @@ def main(): "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( + "-g", "--generator", type=str, help="CMake Generator", choices=['make', 'ninja'] + ) parser.add_argument( "-d", "--defines", help="Additional custom defines passed to CMake (supply without -D prefix!)", @@ -56,7 +58,15 @@ def main(): if args.generator is None: generator_cmake_arg = "" else: - generator_cmake_arg = f"-G \"{args.generator}\"" + if args.generator == 'make': + if os.name == 'nt': + generator_cmake_arg = '-G "MinGW Makefiles"' + else: + generator_cmake_arg = '-G "Unix Makefiles"' + elif args.generator == 'ninja': + generator_cmake_arg = '-G Ninja' + else: + generator_cmake_arg = args.generator if args.buildtype == "debug": cmake_build_type = "Debug" diff --git a/common/config/commonConfig.cpp b/common/config/commonConfig.cpp index 1c9ece8b..97690e09 100644 --- a/common/config/commonConfig.cpp +++ b/common/config/commonConfig.cpp @@ -2,4 +2,4 @@ #include "tmtc/apid.h" #include "fsfw/tmtcpacket/SpacePacket.h" -const uint16_t common::TC_PACKET_ID = spacepacket::getTcSpacePacketIdFromApid(apid::EIVE_OBSW); +constexpr uint16_t common::PUS_PACKET_ID = spacepacket::getTcSpacePacketIdFromApid(apid::EIVE_OBSW); diff --git a/fsfw b/fsfw index eba2f87b..e29606a2 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit eba2f87b36429fc814f9d4768c68fd2827f4c410 +Subproject commit e29606a2d07ff2fcad77e99493ec3765816e646b diff --git a/mission/core/GenericFactory.cpp b/mission/core/GenericFactory.cpp index a0939f1c..58485b71 100644 --- a/mission/core/GenericFactory.cpp +++ b/mission/core/GenericFactory.cpp @@ -110,7 +110,7 @@ void ObjectFactory::produceGenericObjects() { tmtcBridge->setMaxNumberOfPacketsStored(50); auto tcpServer = new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE); // TCP is stream based. Use packet ID as start marker when parsing for space packets - tcpServer->setSpacePacketParsingOptions({common::TC_PACKET_ID}); + tcpServer->setSpacePacketParsingOptions({common::PUS_PACKET_ID}); sif::info << "Created TCP server for TMTC commanding with listener port " << tcpServer->getTcpPort() << std::endl; #endif /* OBSW_USE_TMTC_TCP_BRIDGE == 0 */ diff --git a/tmtc b/tmtc index b2cc2354..edcaf2e9 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit b2cc2354d410b0bc0d80c481bfd37afc580e63cf +Subproject commit edcaf2e9c323cbda2ef331e93cc04985f44c6855