From 8331b76ea8c708f8b6c4e26b720754a12f9faa70 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 23 Mar 2021 13:44:45 +0100 Subject: [PATCH 1/9] updated tmtc submodule --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index 5f1803b6..74c61842 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 5f1803b66393210ded8c5d88fbc28cd8130cef91 +Subproject commit 74c61842c87e6a25751904116fdc82dd61a14333 From 8d30c83d42d8f01bfa59cfa94a84610ca5e568d2 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Tue, 23 Mar 2021 16:06:23 +0100 Subject: [PATCH 2/9] added fsfw hal --- .gitmodules | 3 +++ fsfw_hal | 1 + 2 files changed, 4 insertions(+) create mode 160000 fsfw_hal diff --git a/.gitmodules b/.gitmodules index 7af82082..4a973500 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "thirdparty/lwgps"] path = thirdparty/lwgps url = https://github.com/rmspacefish/lwgps.git +[submodule "fsfw_hal"] + path = fsfw_hal + url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw_hal.git diff --git a/fsfw_hal b/fsfw_hal new file mode 160000 index 00000000..45eb9cbe --- /dev/null +++ b/fsfw_hal @@ -0,0 +1 @@ +Subproject commit 45eb9cbe2bc7e7e11aca7a6262098251f358ec8d From f6fb7f4c4bb698443e2aa4e4370d9c2eb3888d9f Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Tue, 23 Mar 2021 16:15:31 +0100 Subject: [PATCH 3/9] integrating fsfw_hal --- CMakeLists.txt | 6 ++++++ bsp_rpi/gpio/CMakeLists.txt | 1 - fsfw_hal | 2 +- linux/CMakeLists.txt | 2 +- linux/{ => archive}/gpio/CMakeLists.txt | 0 linux/{ => archive}/gpio/GpioCookie.cpp | 0 linux/{ => archive}/gpio/GpioCookie.h | 0 linux/{ => archive}/gpio/GpioIF.h | 0 linux/{ => archive}/gpio/LinuxLibgpioIF.cpp | 0 linux/{ => archive}/gpio/LinuxLibgpioIF.h | 0 linux/{ => archive}/gpio/gpioDefinitions.h | 0 {bsp_rpi/gpio => misc/archive}/GPIORPi.cpp | 0 {bsp_rpi/gpio => misc/archive}/GPIORPi.h | 0 13 files changed, 8 insertions(+), 3 deletions(-) rename linux/{ => archive}/gpio/CMakeLists.txt (100%) rename linux/{ => archive}/gpio/GpioCookie.cpp (100%) rename linux/{ => archive}/gpio/GpioCookie.h (100%) rename linux/{ => archive}/gpio/GpioIF.h (100%) rename linux/{ => archive}/gpio/LinuxLibgpioIF.cpp (100%) rename linux/{ => archive}/gpio/LinuxLibgpioIF.h (100%) rename linux/{ => archive}/gpio/gpioDefinitions.h (100%) rename {bsp_rpi/gpio => misc/archive}/GPIORPi.cpp (100%) rename {bsp_rpi/gpio => misc/archive}/GPIORPi.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 53689123..61b99287 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,7 @@ set(TARGET_NAME ${CMAKE_PROJECT_NAME}) set(LIB_FSFW_NAME fsfw) set(LIB_ETL_NAME etl) set(LIB_CSP_NAME libcsp) +set(LIB_FSFW_HAL_NAME fsfw_hal) set(LIB_LWGPS_NAME lwgps) set(THIRD_PARTY_FOLDER thirdparty) @@ -50,6 +51,7 @@ set(TEST_PATH test/testtasks) set(LINUX_PATH linux) set(COMMON_PATH common) +set(FSFW_HAL_LIB_PATH fsfw_hal) set(CSP_LIB_PATH ${THIRD_PARTY_FOLDER}/libcsp) set(ETL_LIB_PATH ${THIRD_PARTY_FOLDER}/etl) set(LWGPS_LIB_PATH ${THIRD_PARTY_FOLDER}/lwgps) @@ -68,10 +70,12 @@ if(TGT_BSP) set(FSFW_CONFIG_PATH "fsfwconfig") set(ADD_LINUX_FILES TRUE) set(ADD_CSP_LIB TRUE) + set(FSFW_HAL_ADD_LINUX ON) endif() if(${TGT_BSP} MATCHES "arm/raspberrypi") add_definitions(-DRASPBERRY_PI) + set(FSFW_HAL_ADD_RASPBERRY_PI ON) endif() if(${TGT_BSP} MATCHES "arm/q7s") @@ -113,6 +117,7 @@ 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}) ################################################################################ @@ -126,6 +131,7 @@ target_link_libraries(${TARGET_NAME} PRIVATE ${LIB_FSFW_NAME} ${LIB_OS_NAME} ${LIB_LWGPS_NAME} + ${LIB_FSFW_HAL_NAME} ) if(ADD_ETL_LIB) diff --git a/bsp_rpi/gpio/CMakeLists.txt b/bsp_rpi/gpio/CMakeLists.txt index 85bd6aa6..b816684d 100644 --- a/bsp_rpi/gpio/CMakeLists.txt +++ b/bsp_rpi/gpio/CMakeLists.txt @@ -1,5 +1,4 @@ target_sources(${TARGET_NAME} PUBLIC - GPIORPi.cpp ) diff --git a/fsfw_hal b/fsfw_hal index 45eb9cbe..547c788c 160000 --- a/fsfw_hal +++ b/fsfw_hal @@ -1 +1 @@ -Subproject commit 45eb9cbe2bc7e7e11aca7a6262098251f358ec8d +Subproject commit 547c788c818069abb9eaea12a0c997376641f9aa diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 77bea0ef..13748f41 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -1,4 +1,4 @@ -add_subdirectory(gpio) +# add_subdirectory(gpio) add_subdirectory(i2c) add_subdirectory(csp) add_subdirectory(spi) diff --git a/linux/gpio/CMakeLists.txt b/linux/archive/gpio/CMakeLists.txt similarity index 100% rename from linux/gpio/CMakeLists.txt rename to linux/archive/gpio/CMakeLists.txt diff --git a/linux/gpio/GpioCookie.cpp b/linux/archive/gpio/GpioCookie.cpp similarity index 100% rename from linux/gpio/GpioCookie.cpp rename to linux/archive/gpio/GpioCookie.cpp diff --git a/linux/gpio/GpioCookie.h b/linux/archive/gpio/GpioCookie.h similarity index 100% rename from linux/gpio/GpioCookie.h rename to linux/archive/gpio/GpioCookie.h diff --git a/linux/gpio/GpioIF.h b/linux/archive/gpio/GpioIF.h similarity index 100% rename from linux/gpio/GpioIF.h rename to linux/archive/gpio/GpioIF.h diff --git a/linux/gpio/LinuxLibgpioIF.cpp b/linux/archive/gpio/LinuxLibgpioIF.cpp similarity index 100% rename from linux/gpio/LinuxLibgpioIF.cpp rename to linux/archive/gpio/LinuxLibgpioIF.cpp diff --git a/linux/gpio/LinuxLibgpioIF.h b/linux/archive/gpio/LinuxLibgpioIF.h similarity index 100% rename from linux/gpio/LinuxLibgpioIF.h rename to linux/archive/gpio/LinuxLibgpioIF.h diff --git a/linux/gpio/gpioDefinitions.h b/linux/archive/gpio/gpioDefinitions.h similarity index 100% rename from linux/gpio/gpioDefinitions.h rename to linux/archive/gpio/gpioDefinitions.h diff --git a/bsp_rpi/gpio/GPIORPi.cpp b/misc/archive/GPIORPi.cpp similarity index 100% rename from bsp_rpi/gpio/GPIORPi.cpp rename to misc/archive/GPIORPi.cpp diff --git a/bsp_rpi/gpio/GPIORPi.h b/misc/archive/GPIORPi.h similarity index 100% rename from bsp_rpi/gpio/GPIORPi.h rename to misc/archive/GPIORPi.h From 4bf1206fbd3b8d387b6aeb9e3937fa429638db88 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Tue, 23 Mar 2021 16:45:07 +0100 Subject: [PATCH 4/9] using new fsfw_hal now --- bsp_rpi/ObjectFactory.cpp | 9 +- fsfw_hal | 2 +- fsfwconfig/devices/gpioIds.h | 2 +- linux/boardtest/LibgpiodTest.h | 4 +- linux/boardtest/SpiTestClass.cpp | 4 +- linux/boardtest/SpiTestClass.h | 2 +- linux/spi/SpiComIF.h | 2 +- linux/spi/SpiCookie.h | 2 +- misc/eclipse/.cproject | 434 ++++++++++--------------------- 9 files changed, 148 insertions(+), 313 deletions(-) diff --git a/bsp_rpi/ObjectFactory.cpp b/bsp_rpi/ObjectFactory.cpp index 13cadfb3..a5c81961 100644 --- a/bsp_rpi/ObjectFactory.cpp +++ b/bsp_rpi/ObjectFactory.cpp @@ -1,5 +1,5 @@ #include "ObjectFactory.h" -#include +#include #include #include @@ -11,11 +11,10 @@ #include #include -#include -#include #include #include +#include #include #include #include @@ -28,7 +27,9 @@ #include #include #include -#include + +#include +#include void Factory::setStaticFrameworkObjectIds() { diff --git a/fsfw_hal b/fsfw_hal index 547c788c..f094e992 160000 --- a/fsfw_hal +++ b/fsfw_hal @@ -1 +1 @@ -Subproject commit 547c788c818069abb9eaea12a0c997376641f9aa +Subproject commit f094e9921db807344ed5488f662295034eb89731 diff --git a/fsfwconfig/devices/gpioIds.h b/fsfwconfig/devices/gpioIds.h index 8963bd20..10c0a553 100644 --- a/fsfwconfig/devices/gpioIds.h +++ b/fsfwconfig/devices/gpioIds.h @@ -1,7 +1,7 @@ #ifndef FSFWCONFIG_DEVICES_GPIOIDS_H_ #define FSFWCONFIG_DEVICES_GPIOIDS_H_ -#include +#include namespace gpioIds { enum gpioId_t { diff --git a/linux/boardtest/LibgpiodTest.h b/linux/boardtest/LibgpiodTest.h index e9c6c030..a18c618e 100644 --- a/linux/boardtest/LibgpiodTest.h +++ b/linux/boardtest/LibgpiodTest.h @@ -2,8 +2,8 @@ #define TEST_TESTTASKS_LIBGPIODTEST_H_ #include "TestTask.h" -#include -#include +#include +#include #include /** diff --git a/linux/boardtest/SpiTestClass.cpp b/linux/boardtest/SpiTestClass.cpp index 3090c115..374cb644 100644 --- a/linux/boardtest/SpiTestClass.cpp +++ b/linux/boardtest/SpiTestClass.cpp @@ -7,9 +7,9 @@ #include #include -#include -#include #include +#include +#include #include #include diff --git a/linux/boardtest/SpiTestClass.h b/linux/boardtest/SpiTestClass.h index c567bc45..2e3d8b8c 100644 --- a/linux/boardtest/SpiTestClass.h +++ b/linux/boardtest/SpiTestClass.h @@ -1,7 +1,7 @@ #ifndef LINUX_BOARDTEST_SPITESTCLASS_H_ #define LINUX_BOARDTEST_SPITESTCLASS_H_ -#include +#include #include #include diff --git a/linux/spi/SpiComIF.h b/linux/spi/SpiComIF.h index 0e27a595..c5076ba6 100644 --- a/linux/spi/SpiComIF.h +++ b/linux/spi/SpiComIF.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include diff --git a/linux/spi/SpiCookie.h b/linux/spi/SpiCookie.h index 59d0e206..aff4d770 100644 --- a/linux/spi/SpiCookie.h +++ b/linux/spi/SpiCookie.h @@ -3,7 +3,7 @@ #include "spiDefinitions.h" #include -#include +#include #include class SpiCookie: public CookieIF { diff --git a/misc/eclipse/.cproject b/misc/eclipse/.cproject index 6caf4a08..e06537d3 100644 --- a/misc/eclipse/.cproject +++ b/misc/eclipse/.cproject @@ -15,11 +15,11 @@ - + - + @@ -70,7 +70,7 @@ - + @@ -219,9 +219,6 @@ - - - @@ -233,7 +230,7 @@ - + - + @@ -370,9 +363,6 @@ - - - @@ -461,7 +451,7 @@ - + - - + + - + @@ -535,277 +521,134 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -813,14 +656,11 @@ - + - - - @@ -831,50 +671,44 @@ - + - - - - make - -f Makefile-Hosted -j16 - hardclean - true - true - true - - - - + - + - + - + - + - + - + - + + + + + + + From ced80ce4d0bad3be4adeb6cd183063d4bbc61ec5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 23 Mar 2021 16:47:35 +0100 Subject: [PATCH 5/9] updated project files again --- misc/eclipse/.cproject | 434 ++++++++++++++++++++++++++++------------- misc/eclipse/.project | 2 +- 2 files changed, 301 insertions(+), 135 deletions(-) diff --git a/misc/eclipse/.cproject b/misc/eclipse/.cproject index e06537d3..6caf4a08 100644 --- a/misc/eclipse/.cproject +++ b/misc/eclipse/.cproject @@ -15,11 +15,11 @@ - + - + @@ -70,7 +70,7 @@ - + @@ -219,6 +219,9 @@ + + + @@ -230,7 +233,7 @@ - + - + @@ -363,6 +370,9 @@ + + + @@ -451,7 +461,7 @@ - - + + - + @@ -521,134 +535,277 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -656,11 +813,14 @@ - + + + + @@ -671,44 +831,50 @@ + - + + + + make + -f Makefile-Hosted -j16 + hardclean + true + true + true + + + - + - + - + - + - + - + - + - - - - - - - + diff --git a/misc/eclipse/.project b/misc/eclipse/.project index 906c567f..059a5c19 100644 --- a/misc/eclipse/.project +++ b/misc/eclipse/.project @@ -7,7 +7,7 @@ org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, + full,incremental, From 1ad03cef9ed5e7c39a7556db705c446eda41a7f3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 23 Mar 2021 16:52:19 +0100 Subject: [PATCH 6/9] fixed q7s --- bsp_q7s/ObjectFactory.cpp | 4 ++-- bsp_q7s/devices/HeaterHandler.cpp | 2 +- bsp_q7s/devices/HeaterHandler.h | 2 +- bsp_q7s/devices/SolarArrayDeploymentHandler.cpp | 2 +- bsp_q7s/devices/SolarArrayDeploymentHandler.h | 4 +--- fsfw_hal | 2 +- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/bsp_q7s/ObjectFactory.cpp b/bsp_q7s/ObjectFactory.cpp index f81fc173..70e2db20 100644 --- a/bsp_q7s/ObjectFactory.cpp +++ b/bsp_q7s/ObjectFactory.cpp @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/bsp_q7s/devices/HeaterHandler.cpp b/bsp_q7s/devices/HeaterHandler.cpp index 9a44c57b..21a4a3f4 100644 --- a/bsp_q7s/devices/HeaterHandler.cpp +++ b/bsp_q7s/devices/HeaterHandler.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include HeaterHandler::HeaterHandler(object_id_t setObjectId_, object_id_t gpioDriverId_, CookieIF * gpioCookie_, object_id_t mainLineSwitcherObjectId_, uint8_t mainLineSwitch_) : diff --git a/bsp_q7s/devices/HeaterHandler.h b/bsp_q7s/devices/HeaterHandler.h index 01319ce9..8969ebd9 100644 --- a/bsp_q7s/devices/HeaterHandler.h +++ b/bsp_q7s/devices/HeaterHandler.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include /** diff --git a/bsp_q7s/devices/SolarArrayDeploymentHandler.cpp b/bsp_q7s/devices/SolarArrayDeploymentHandler.cpp index d307ef15..25be3927 100644 --- a/bsp_q7s/devices/SolarArrayDeploymentHandler.cpp +++ b/bsp_q7s/devices/SolarArrayDeploymentHandler.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include diff --git a/bsp_q7s/devices/SolarArrayDeploymentHandler.h b/bsp_q7s/devices/SolarArrayDeploymentHandler.h index b7e94f23..5e573128 100644 --- a/bsp_q7s/devices/SolarArrayDeploymentHandler.h +++ b/bsp_q7s/devices/SolarArrayDeploymentHandler.h @@ -1,8 +1,6 @@ #ifndef MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_ #define MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_ -#include - #include #include #include @@ -11,7 +9,7 @@ #include #include #include - +#include #include /** diff --git a/fsfw_hal b/fsfw_hal index f094e992..20b4b5d5 160000 --- a/fsfw_hal +++ b/fsfw_hal @@ -1 +1 @@ -Subproject commit f094e9921db807344ed5488f662295034eb89731 +Subproject commit 20b4b5d5d3c5f1af807634e75f859ded2dc74012 From ebfda75e34b386bda94dd27acb446dbb9337b128 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 29 Mar 2021 14:31:55 +0200 Subject: [PATCH 7/9] added way to supply definesto cmake --- cmake/scripts/cmake_build_config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/scripts/cmake_build_config.py b/cmake/scripts/cmake_build_config.py index 0e4b6f25..32b560f6 100644 --- a/cmake/scripts/cmake_build_config.py +++ b/cmake/scripts/cmake_build_config.py @@ -26,6 +26,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("-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() From 25b5734186f2b00ad863fe385fde69e884a5fdd5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 29 Mar 2021 14:37:08 +0200 Subject: [PATCH 8/9] fsfw updated --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 83d0db82..f2da3123 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 83d0db824289b28dbad81cce0c80276c4fc839c8 +Subproject commit f2da31239c43422f7254b8f4a26e663cffd8e3f3 From 103c12052c27475aa91991d58dba36c0d53e55e4 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 29 Mar 2021 14:42:33 +0200 Subject: [PATCH 9/9] corrections ofr updated common udp code --- bsp_q7s/ObjectFactory.cpp | 10 ++++++---- bsp_rpi/ObjectFactory.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/bsp_q7s/ObjectFactory.cpp b/bsp_q7s/ObjectFactory.cpp index 70e2db20..3e52402a 100644 --- a/bsp_q7s/ObjectFactory.cpp +++ b/bsp_q7s/ObjectFactory.cpp @@ -30,9 +30,11 @@ #include #include #include -#include #include -#include + +/* UDP server includes */ +#include +#include #if TEST_LIBGPIOD == 1 #include @@ -170,10 +172,10 @@ void ObjectFactory::produce(){ gpioIds::DEPLSA1, gpioIds::DEPLSA2, 1000); #endif - new TmTcUnixUdpBridge(objects::UDP_BRIDGE, + new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR, objects::TM_STORE, objects::TC_STORE); - new TcUnixUdpPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE); + new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE); #if TE0720 == 1 && TEST_LIBGPIOD == 1 /* Configure MIO0 as input */ diff --git a/bsp_rpi/ObjectFactory.cpp b/bsp_rpi/ObjectFactory.cpp index a5c81961..0c75cf81 100644 --- a/bsp_rpi/ObjectFactory.cpp +++ b/bsp_rpi/ObjectFactory.cpp @@ -23,11 +23,13 @@ #include #include #include -#include #include -#include #include +/* UDP server includes */ +#include +#include + #include #include @@ -55,10 +57,10 @@ void ObjectFactory::produce(){ Factory::setStaticFrameworkObjectIds(); ObjectFactory::produceGenericObjects(); - new TmTcUnixUdpBridge(objects::UDP_BRIDGE, + new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR, objects::TM_STORE, objects::TC_STORE); - new TcUnixUdpPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE); + new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE); GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);