Merge pull request 'Added FSFW HAL, some GPIO modules moved, FSFW update' (#27) from mueller/added-fsfw-hal into develop
Reviewed-on: eive/eive_obsw#27 Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
This commit is contained in:
commit
76c31a4d13
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -13,3 +13,6 @@
|
|||||||
[submodule "thirdparty/lwgps"]
|
[submodule "thirdparty/lwgps"]
|
||||||
path = thirdparty/lwgps
|
path = thirdparty/lwgps
|
||||||
url = https://github.com/rmspacefish/lwgps.git
|
url = https://github.com/rmspacefish/lwgps.git
|
||||||
|
[submodule "fsfw_hal"]
|
||||||
|
path = fsfw_hal
|
||||||
|
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw_hal.git
|
||||||
|
@ -40,6 +40,7 @@ set(TARGET_NAME ${CMAKE_PROJECT_NAME})
|
|||||||
set(LIB_FSFW_NAME fsfw)
|
set(LIB_FSFW_NAME fsfw)
|
||||||
set(LIB_ETL_NAME etl)
|
set(LIB_ETL_NAME etl)
|
||||||
set(LIB_CSP_NAME libcsp)
|
set(LIB_CSP_NAME libcsp)
|
||||||
|
set(LIB_FSFW_HAL_NAME fsfw_hal)
|
||||||
set(LIB_LWGPS_NAME lwgps)
|
set(LIB_LWGPS_NAME lwgps)
|
||||||
set(THIRD_PARTY_FOLDER thirdparty)
|
set(THIRD_PARTY_FOLDER thirdparty)
|
||||||
|
|
||||||
@ -50,6 +51,7 @@ set(TEST_PATH test/testtasks)
|
|||||||
set(LINUX_PATH linux)
|
set(LINUX_PATH linux)
|
||||||
set(COMMON_PATH common)
|
set(COMMON_PATH common)
|
||||||
|
|
||||||
|
set(FSFW_HAL_LIB_PATH fsfw_hal)
|
||||||
set(CSP_LIB_PATH ${THIRD_PARTY_FOLDER}/libcsp)
|
set(CSP_LIB_PATH ${THIRD_PARTY_FOLDER}/libcsp)
|
||||||
set(ETL_LIB_PATH ${THIRD_PARTY_FOLDER}/etl)
|
set(ETL_LIB_PATH ${THIRD_PARTY_FOLDER}/etl)
|
||||||
set(LWGPS_LIB_PATH ${THIRD_PARTY_FOLDER}/lwgps)
|
set(LWGPS_LIB_PATH ${THIRD_PARTY_FOLDER}/lwgps)
|
||||||
@ -68,10 +70,12 @@ if(TGT_BSP)
|
|||||||
set(FSFW_CONFIG_PATH "fsfwconfig")
|
set(FSFW_CONFIG_PATH "fsfwconfig")
|
||||||
set(ADD_LINUX_FILES TRUE)
|
set(ADD_LINUX_FILES TRUE)
|
||||||
set(ADD_CSP_LIB TRUE)
|
set(ADD_CSP_LIB TRUE)
|
||||||
|
set(FSFW_HAL_ADD_LINUX ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${TGT_BSP} MATCHES "arm/raspberrypi")
|
if(${TGT_BSP} MATCHES "arm/raspberrypi")
|
||||||
add_definitions(-DRASPBERRY_PI)
|
add_definitions(-DRASPBERRY_PI)
|
||||||
|
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${TGT_BSP} MATCHES "arm/q7s")
|
if(${TGT_BSP} MATCHES "arm/q7s")
|
||||||
@ -113,6 +117,7 @@ add_subdirectory(${BSP_PATH})
|
|||||||
add_subdirectory(${FSFW_PATH})
|
add_subdirectory(${FSFW_PATH})
|
||||||
add_subdirectory(${MISSION_PATH})
|
add_subdirectory(${MISSION_PATH})
|
||||||
add_subdirectory(${TEST_PATH})
|
add_subdirectory(${TEST_PATH})
|
||||||
|
add_subdirectory(${FSFW_HAL_LIB_PATH})
|
||||||
add_subdirectory(${COMMON_PATH})
|
add_subdirectory(${COMMON_PATH})
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -126,6 +131,7 @@ target_link_libraries(${TARGET_NAME} PRIVATE
|
|||||||
${LIB_FSFW_NAME}
|
${LIB_FSFW_NAME}
|
||||||
${LIB_OS_NAME}
|
${LIB_OS_NAME}
|
||||||
${LIB_LWGPS_NAME}
|
${LIB_LWGPS_NAME}
|
||||||
|
${LIB_FSFW_HAL_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(ADD_ETL_LIB)
|
if(ADD_ETL_LIB)
|
||||||
|
@ -24,15 +24,17 @@
|
|||||||
#include <linux/csp/CspComIF.h>
|
#include <linux/csp/CspComIF.h>
|
||||||
#include <linux/i2c/I2cCookie.h>
|
#include <linux/i2c/I2cCookie.h>
|
||||||
#include <linux/i2c/I2cComIF.h>
|
#include <linux/i2c/I2cComIF.h>
|
||||||
#include <linux/gpio/LinuxLibgpioIF.h>
|
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
|
||||||
#include <linux/gpio/GpioCookie.h>
|
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||||
|
|
||||||
#include <fsfw/datapoollocal/LocalDataPoolManager.h>
|
#include <fsfw/datapoollocal/LocalDataPoolManager.h>
|
||||||
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
||||||
#include <fsfw/tmtcservices/PusServiceBase.h>
|
#include <fsfw/tmtcservices/PusServiceBase.h>
|
||||||
#include <fsfw/osal/linux/TmTcUnixUdpBridge.h>
|
|
||||||
#include <fsfw/tmtcpacket/pus/TmPacketStored.h>
|
#include <fsfw/tmtcpacket/pus/TmPacketStored.h>
|
||||||
#include <fsfw/osal/linux/TcUnixUdpPollingTask.h>
|
|
||||||
|
/* UDP server includes */
|
||||||
|
#include <fsfw/osal/common/UdpTmTcBridge.h>
|
||||||
|
#include <fsfw/osal/common/UdpTcPollingTask.h>
|
||||||
|
|
||||||
#if TEST_LIBGPIOD == 1
|
#if TEST_LIBGPIOD == 1
|
||||||
#include <linux/boardtest/LibgpiodTest.h>
|
#include <linux/boardtest/LibgpiodTest.h>
|
||||||
@ -170,10 +172,10 @@ void ObjectFactory::produce(){
|
|||||||
gpioIds::DEPLSA1, gpioIds::DEPLSA2, 1000);
|
gpioIds::DEPLSA1, gpioIds::DEPLSA2, 1000);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
new TmTcUnixUdpBridge(objects::UDP_BRIDGE,
|
new UdpTmTcBridge(objects::UDP_BRIDGE,
|
||||||
objects::CCSDS_PACKET_DISTRIBUTOR,
|
objects::CCSDS_PACKET_DISTRIBUTOR,
|
||||||
objects::TM_STORE, objects::TC_STORE);
|
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
|
#if TE0720 == 1 && TEST_LIBGPIOD == 1
|
||||||
/* Configure MIO0 as input */
|
/* Configure MIO0 as input */
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include <fsfwconfig/devices/powerSwitcherList.h>
|
#include <fsfwconfig/devices/powerSwitcherList.h>
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
#include <devices/gpioIds.h>
|
#include <devices/gpioIds.h>
|
||||||
#include <linux/gpio/GpioCookie.h>
|
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||||
|
|
||||||
HeaterHandler::HeaterHandler(object_id_t setObjectId_, object_id_t gpioDriverId_,
|
HeaterHandler::HeaterHandler(object_id_t setObjectId_, object_id_t gpioDriverId_,
|
||||||
CookieIF * gpioCookie_, object_id_t mainLineSwitcherObjectId_, uint8_t mainLineSwitch_) :
|
CookieIF * gpioCookie_, object_id_t mainLineSwitcherObjectId_, uint8_t mainLineSwitch_) :
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||||
#include <fsfw/devicehandlers/CookieIF.h>
|
#include <fsfw/devicehandlers/CookieIF.h>
|
||||||
#include <fsfw/timemanager/Countdown.h>
|
#include <fsfw/timemanager/Countdown.h>
|
||||||
#include <linux/gpio/GpioIF.h>
|
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <devices/powerSwitcherList.h>
|
#include <devices/powerSwitcherList.h>
|
||||||
#include <devices/gpioIds.h>
|
#include <devices/gpioIds.h>
|
||||||
|
|
||||||
#include <linux/gpio/GpioCookie.h>
|
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#ifndef MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_
|
#ifndef MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_
|
||||||
#define MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_
|
#define MISSION_DEVICES_SOLARARRAYDEPLOYMENT_H_
|
||||||
|
|
||||||
#include <linux/gpio/GpioIF.h>
|
|
||||||
|
|
||||||
#include <fsfw/objectmanager/SystemObject.h>
|
#include <fsfw/objectmanager/SystemObject.h>
|
||||||
#include <fsfw/tasks/ExecutableObjectIF.h>
|
#include <fsfw/tasks/ExecutableObjectIF.h>
|
||||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||||
@ -11,7 +9,7 @@
|
|||||||
#include <fsfw/devicehandlers/CookieIF.h>
|
#include <fsfw/devicehandlers/CookieIF.h>
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||||
#include <fsfw/timemanager/Countdown.h>
|
#include <fsfw/timemanager/Countdown.h>
|
||||||
|
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "ObjectFactory.h"
|
#include "ObjectFactory.h"
|
||||||
#include <bsp_rpi/gpio/GPIORPi.h>
|
#include <fsfw_hal/linux/rpi/GpioRPi.h>
|
||||||
|
|
||||||
#include <fsfwconfig/objects/systemObjectList.h>
|
#include <fsfwconfig/objects/systemObjectList.h>
|
||||||
#include <fsfwconfig/devices/addresses.h>
|
#include <fsfwconfig/devices/addresses.h>
|
||||||
@ -11,11 +11,10 @@
|
|||||||
|
|
||||||
#include <linux/boardtest/LibgpiodTest.h>
|
#include <linux/boardtest/LibgpiodTest.h>
|
||||||
#include <linux/boardtest/SpiTestClass.h>
|
#include <linux/boardtest/SpiTestClass.h>
|
||||||
#include <linux/gpio/GpioCookie.h>
|
|
||||||
#include <linux/gpio/LinuxLibgpioIF.h>
|
|
||||||
#include <linux/spi/SpiCookie.h>
|
#include <linux/spi/SpiCookie.h>
|
||||||
#include <linux/spi/SpiComIF.h>
|
#include <linux/spi/SpiComIF.h>
|
||||||
|
|
||||||
|
#include <mission/devices/GyroL3GD20Handler.h>
|
||||||
#include <mission/core/GenericFactory.h>
|
#include <mission/core/GenericFactory.h>
|
||||||
#include <mission/utility/TmFunnel.h>
|
#include <mission/utility/TmFunnel.h>
|
||||||
#include <mission/devices/MGMHandlerLIS3MDL.h>
|
#include <mission/devices/MGMHandlerLIS3MDL.h>
|
||||||
@ -24,11 +23,15 @@
|
|||||||
#include <fsfw/datapoollocal/LocalDataPoolManager.h>
|
#include <fsfw/datapoollocal/LocalDataPoolManager.h>
|
||||||
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
||||||
#include <fsfw/tmtcservices/PusServiceBase.h>
|
#include <fsfw/tmtcservices/PusServiceBase.h>
|
||||||
#include <fsfw/osal/linux/TmTcUnixUdpBridge.h>
|
|
||||||
#include <fsfw/tmtcpacket/pus/TmPacketStored.h>
|
#include <fsfw/tmtcpacket/pus/TmPacketStored.h>
|
||||||
#include <fsfw/osal/linux/TcUnixUdpPollingTask.h>
|
|
||||||
#include <fsfw/tasks/TaskFactory.h>
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
#include <mission/devices/GyroL3GD20Handler.h>
|
|
||||||
|
/* UDP server includes */
|
||||||
|
#include <fsfw/osal/common/UdpTmTcBridge.h>
|
||||||
|
#include <fsfw/osal/common/UdpTcPollingTask.h>
|
||||||
|
|
||||||
|
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
|
||||||
|
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||||
|
|
||||||
|
|
||||||
void Factory::setStaticFrameworkObjectIds() {
|
void Factory::setStaticFrameworkObjectIds() {
|
||||||
@ -54,10 +57,10 @@ void ObjectFactory::produce(){
|
|||||||
Factory::setStaticFrameworkObjectIds();
|
Factory::setStaticFrameworkObjectIds();
|
||||||
ObjectFactory::produceGenericObjects();
|
ObjectFactory::produceGenericObjects();
|
||||||
|
|
||||||
new TmTcUnixUdpBridge(objects::UDP_BRIDGE,
|
new UdpTmTcBridge(objects::UDP_BRIDGE,
|
||||||
objects::CCSDS_PACKET_DISTRIBUTOR,
|
objects::CCSDS_PACKET_DISTRIBUTOR,
|
||||||
objects::TM_STORE, objects::TC_STORE);
|
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);
|
GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${TARGET_NAME} PUBLIC
|
||||||
GPIORPi.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,6 +26,9 @@ def main():
|
|||||||
"Information)", default="debug")
|
"Information)", default="debug")
|
||||||
parser.add_argument("-l", "--builddir", type=str, help="Specify build directory.")
|
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")
|
||||||
|
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("-t", "--target-bsp", type=str, help="Target BSP, combination of architecture and machine")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 83d0db824289b28dbad81cce0c80276c4fc839c8
|
Subproject commit f2da31239c43422f7254b8f4a26e663cffd8e3f3
|
1
fsfw_hal
Submodule
1
fsfw_hal
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 20b4b5d5d3c5f1af807634e75f859ded2dc74012
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef FSFWCONFIG_DEVICES_GPIOIDS_H_
|
#ifndef FSFWCONFIG_DEVICES_GPIOIDS_H_
|
||||||
#define FSFWCONFIG_DEVICES_GPIOIDS_H_
|
#define FSFWCONFIG_DEVICES_GPIOIDS_H_
|
||||||
|
|
||||||
#include <linux/gpio/GpioIF.h>
|
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||||
|
|
||||||
namespace gpioIds {
|
namespace gpioIds {
|
||||||
enum gpioId_t {
|
enum gpioId_t {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
add_subdirectory(gpio)
|
# add_subdirectory(gpio)
|
||||||
add_subdirectory(i2c)
|
add_subdirectory(i2c)
|
||||||
add_subdirectory(csp)
|
add_subdirectory(csp)
|
||||||
add_subdirectory(spi)
|
add_subdirectory(spi)
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
#define TEST_TESTTASKS_LIBGPIODTEST_H_
|
#define TEST_TESTTASKS_LIBGPIODTEST_H_
|
||||||
|
|
||||||
#include "TestTask.h"
|
#include "TestTask.h"
|
||||||
#include <linux/gpio/GpioIF.h>
|
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||||
#include <linux/gpio/GpioCookie.h>
|
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||||
#include <fsfw/objectmanager/SystemObject.h>
|
#include <fsfw/objectmanager/SystemObject.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
#include <fsfw/tasks/TaskFactory.h>
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
#include <fsfw/timemanager/Stopwatch.h>
|
#include <fsfw/timemanager/Stopwatch.h>
|
||||||
|
|
||||||
#include <linux/gpio/gpioDefinitions.h>
|
|
||||||
#include <linux/gpio/GpioCookie.h>
|
|
||||||
#include <linux/utility/Utility.h>
|
#include <linux/utility/Utility.h>
|
||||||
|
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
|
||||||
|
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||||
|
|
||||||
#include <linux/spi/spidev.h>
|
#include <linux/spi/spidev.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef LINUX_BOARDTEST_SPITESTCLASS_H_
|
#ifndef LINUX_BOARDTEST_SPITESTCLASS_H_
|
||||||
#define LINUX_BOARDTEST_SPITESTCLASS_H_
|
#define LINUX_BOARDTEST_SPITESTCLASS_H_
|
||||||
|
|
||||||
#include <linux/gpio/GpioIF.h>
|
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||||
#include <linux/spi/SpiCookie.h>
|
#include <linux/spi/SpiCookie.h>
|
||||||
#include <test/testtasks/TestTask.h>
|
#include <test/testtasks/TestTask.h>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||||||
#include <fsfw/objectmanager/SystemObject.h>
|
#include <fsfw/objectmanager/SystemObject.h>
|
||||||
#include <linux/gpio/GpioIF.h>
|
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||||
#include <linux/spi/spiDefinitions.h>
|
#include <linux/spi/spiDefinitions.h>
|
||||||
#include <returnvalues/classIds.h>
|
#include <returnvalues/classIds.h>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "spiDefinitions.h"
|
#include "spiDefinitions.h"
|
||||||
#include <fsfw/devicehandlers/CookieIF.h>
|
#include <fsfw/devicehandlers/CookieIF.h>
|
||||||
#include <linux/gpio/gpioDefinitions.h>
|
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
|
||||||
#include <linux/spi/spidev.h>
|
#include <linux/spi/spidev.h>
|
||||||
|
|
||||||
class SpiCookie: public CookieIF {
|
class SpiCookie: public CookieIF {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<buildSpec>
|
<buildSpec>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
<triggers>clean,full,incremental,</triggers>
|
<triggers>full,incremental,</triggers>
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 5f1803b66393210ded8c5d88fbc28cd8130cef91
|
Subproject commit 74c61842c87e6a25751904116fdc82dd61a14333
|
Loading…
Reference in New Issue
Block a user