Merge remote-tracking branch 'upstream/mueller/master' into mueller/master

This commit is contained in:
Robin Müller 2021-08-03 16:32:39 +02:00
commit ce0f30f685
155 changed files with 293 additions and 659 deletions

View File

@ -10,6 +10,7 @@ endif()
option(FSFW_WARNING_SHADOW_LOCAL_GCC "Enable -Wshadow=local warning in GCC" ON)
# Options to exclude parts of the FSFW from compilation.
option(FSFW_ADD_INTERNAL_TESTS "Add internal unit tests" ON)
option(FSFW_ADD_HAL "Add Hardware Abstraction Layer" ON)
# Optional sources
option(FSFW_ADD_PUS "Compile with PUS sources" ON)
@ -21,7 +22,7 @@ option(FSFW_ADD_COORDINATES "Compile with coordinate components" OFF)
option(FSFW_ADD_TMSTORAGE "Compile with tm storage components" OFF)
# Contrib sources
option(FSFW_ADD_SPG4_PROPAGATOR "Add SPG4 propagator code" OFF)
option(FSFW_ADD_SGP4_PROPAGATOR "Add SGP4 propagator code" OFF)
set(LIB_FSFW_NAME fsfw)
add_library(${LIB_FSFW_NAME})
@ -94,7 +95,9 @@ message(STATUS "Compiling FSFW for the ${OS_FSFW_NAME} operating system.")
add_subdirectory(src)
add_subdirectory(tests)
add_subdirectory(hal)
if(FSFW_ADD_HAL)
add_subdirectory(hal)
endif()
add_subdirectory(contrib)
# The project CMakeLists file has to set the FSFW_CONFIG_PATH and add it.

View File

@ -1,11 +1,9 @@
if(FSFW_ADD_SPG4_PROPAGATOR)
target_sources(${LIB_FSFW_NAME} PRIVATE
sgp4/sgp4unit.cpp
)
target_include_directories(${LIB_FSFW_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/sgp4
)
target_include_directories(${LIB_FSFW_NAME} INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/sgp4
)
endif()
target_include_directories(${LIB_FSFW_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${LIB_FSFW_NAME} INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
)
add_subdirectory(fsfw_contrib)

View File

@ -0,0 +1,11 @@
if(FSFW_ADD_SGP4_PROPAGATOR)
target_sources(${LIB_FSFW_NAME} PRIVATE
sgp4/sgp4unit.cpp
)
target_include_directories(${LIB_FSFW_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/sgp4
)
target_include_directories(${LIB_FSFW_NAME} INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/sgp4
)
endif()

View File

@ -6,4 +6,4 @@ target_include_directories(${LIB_FSFW_NAME} INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
)
add_subdirectory(fsfw)
add_subdirectory(fsfw_hal)

View File

@ -1 +0,0 @@
add_subdirectory(hal)

View File

@ -1,4 +1,4 @@
#include "fsfw/hal/common/gpio/GpioCookie.h"
#include "fsfw_hal/common/gpio/GpioCookie.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
GpioCookie::GpioCookie() {

View File

@ -1,4 +1,4 @@
#include "fsfw/hal/devicehandlers/GyroL3GD20Handler.h"
#include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h"
#include "fsfw/datapool/PoolReadGuard.h"

View File

@ -1,14 +1,14 @@
#ifndef MISSION_DEVICES_GYROL3GD20HANDLER_H_
#define MISSION_DEVICES_GYROL3GD20HANDLER_H_
#include "OBSWConfig.h"
#include "fsfw/FSFW.h"
#include "devicedefinitions/GyroL3GD20Definitions.h"
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
#ifndef FSFW_HAL_L3GD20_GYRO_DEBUG
#define FSFW_HAL_L3GD20_GYRO_DEBUG 1
#define FSFW_HAL_L3GD20_GYRO_DEBUG 0
#endif /* FSFW_HAL_L3GD20_GYRO_DEBUG */
/**

View File

@ -1,4 +1,4 @@
#include "fsfw/hal/linux/UnixFileGuard.h"
#include "fsfw_hal/linux/UnixFileGuard.h"
UnixFileGuard::UnixFileGuard(std::string device, int* fileDescriptor, int flags,
std::string diagnosticPrefix):

View File

@ -1,6 +1,6 @@
#include "fsfw/hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw/hal/common/gpio/gpioDefinitions.h"
#include "fsfw/hal/common/gpio/GpioCookie.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw_hal/common/gpio/gpioDefinitions.h"
#include "fsfw_hal/common/gpio/GpioCookie.h"
#include <fsfw/serviceinterface/ServiceInterface.h>

View File

@ -1,6 +1,6 @@
#include "fsfw/hal/linux/i2c/I2cComIF.h"
#include "fsfw/hal/linux/utility.h"
#include "fsfw/hal/linux/UnixFileGuard.h"
#include "fsfw_hal/linux/i2c/I2cComIF.h"
#include "fsfw_hal/linux/utility.h"
#include "fsfw_hal/linux/UnixFileGuard.h"
#include "fsfw/serviceinterface/ServiceInterface.h"

View File

@ -1,4 +1,4 @@
#include "fsfw/hal/linux/i2c/I2cCookie.h"
#include "fsfw_hal/linux/i2c/I2cCookie.h"
I2cCookie::I2cCookie(address_t i2cAddress_, size_t maxReplyLen_,
std::string deviceFile_) :

View File

@ -1,7 +1,7 @@
#include "fsfw/FSFW.h"
#include "fsfw/hal/linux/rpi/GpioRPi.h"
#include "fsfw/hal/common/gpio/GpioCookie.h"
#include "fsfw_hal/linux/rpi/GpioRPi.h"
#include "fsfw_hal/common/gpio/GpioCookie.h"
#include <fsfw/serviceinterface/ServiceInterface.h>

View File

@ -1,8 +1,8 @@
#include "fsfw/FSFW.h"
#include "fsfw/hal/linux/spi/SpiComIF.h"
#include "fsfw/hal/linux/spi/SpiCookie.h"
#include "fsfw/hal/linux/utility.h"
#include "fsfw/hal/linux/UnixFileGuard.h"
#include "fsfw_hal/linux/spi/SpiComIF.h"
#include "fsfw_hal/linux/spi/SpiCookie.h"
#include "fsfw_hal/linux/utility.h"
#include "fsfw_hal/linux/UnixFileGuard.h"
#include <fsfw/ipc/MutexFactory.h>
#include <fsfw/globalfunctions/arrayprinter.h>

View File

@ -3,7 +3,7 @@
#include "spiDefinitions.h"
#include "returnvalues/classIds.h"
#include "fsfw/hal/common/gpio/GpioIF.h"
#include "fsfw_hal/common/gpio/GpioIF.h"
#include "fsfw/devicehandlers/DeviceCommunicationIF.h"
#include "fsfw/objectmanager/SystemObject.h"

View File

@ -1,4 +1,4 @@
#include "fsfw/hal/linux/spi/SpiCookie.h"
#include "fsfw_hal/linux/spi/SpiCookie.h"
SpiCookie::SpiCookie(address_t spiAddress, gpioId_t chipSelect, std::string spiDev,
const size_t maxSize, spi::SpiModes spiMode, uint32_t spiSpeed):

View File

@ -1,4 +1,4 @@
#include "fsfw/hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "OBSWConfig.h"
#include "fsfw/serviceinterface/ServiceInterface.h"

View File

@ -1,4 +1,4 @@
#include "fsfw/hal/linux/uart/UartCookie.h"
#include "fsfw_hal/linux/uart/UartCookie.h"
#include <fsfw/serviceinterface/ServiceInterface.h>

View File

@ -1,6 +1,6 @@
#include "fsfw/FSFW.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/hal/linux/utility.h"
#include "fsfw_hal/linux/utility.h"
#include <cerrno>
#include <cstring>

View File

@ -1,10 +1,10 @@
#include "fsfw/hal/stm32h7/devicetest/GyroL3GD20H.h"
#include "fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h"
#include "fsfw/hal/stm32h7/spi/mspInit.h"
#include "fsfw/hal/stm32h7/spi/spiDefinitions.h"
#include "fsfw/hal/stm32h7/spi/spiCore.h"
#include "fsfw/hal/stm32h7/spi/spiInterrupts.h"
#include "fsfw/hal/stm32h7/spi/stm32h743ziSpi.h"
#include "fsfw_hal/stm32h7/spi/mspInit.h"
#include "fsfw_hal/stm32h7/spi/spiDefinitions.h"
#include "fsfw_hal/stm32h7/spi/spiCore.h"
#include "fsfw_hal/stm32h7/spi/spiInterrupts.h"
#include "fsfw_hal/stm32h7/spi/stm32h743ziSpi.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/serviceinterface/ServiceInterface.h"

View File

@ -1,4 +1,4 @@
#include <fsfw/hal/stm32h7/dma.h>
#include <fsfw_hal/stm32h7/dma.h>
#include <cstdint>
#include <cstddef>

View File

@ -1,4 +1,4 @@
#include "fsfw/hal/stm32h7/gpio/gpio.h"
#include "fsfw_hal/stm32h7/gpio/gpio.h"
#include "stm32h7xx_hal_rcc.h"

View File

@ -1,11 +1,11 @@
#include "fsfw/hal/stm32h7/spi/SpiComIF.h"
#include "fsfw/hal/stm32h7/spi/SpiCookie.h"
#include "fsfw_hal/stm32h7/spi/SpiComIF.h"
#include "fsfw_hal/stm32h7/spi/SpiCookie.h"
#include "fsfw/tasks/SemaphoreFactory.h"
#include "fsfw/hal/stm32h7/spi/spiCore.h"
#include "fsfw/hal/stm32h7/spi/spiInterrupts.h"
#include "fsfw/hal/stm32h7/spi/mspInit.h"
#include "fsfw/hal/stm32h7/gpio/gpio.h"
#include "fsfw_hal/stm32h7/spi/spiCore.h"
#include "fsfw_hal/stm32h7/spi/spiInterrupts.h"
#include "fsfw_hal/stm32h7/spi/mspInit.h"
#include "fsfw_hal/stm32h7/gpio/gpio.h"
// FreeRTOS required special Semaphore handling from an ISR. Therefore, we use the concrete
// instance here, because RTEMS and FreeRTOS are the only relevant OSALs currently

View File

@ -5,7 +5,7 @@
#include "fsfw/devicehandlers/DeviceCommunicationIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/hal/stm32h7/spi/spiDefinitions.h"
#include "fsfw_hal/stm32h7/spi/spiDefinitions.h"
#include "stm32h7xx_hal_spi.h"
#include "stm32h743xx.h"

View File

@ -1,4 +1,4 @@
#include "fsfw/hal/stm32h7/spi/SpiCookie.h"
#include "fsfw_hal/stm32h7/spi/SpiCookie.h"
SpiCookie::SpiCookie(address_t deviceAddress, spi::SpiBus spiIdx, spi::TransferModes transferMode,

View File

@ -1,7 +1,7 @@
#include "fsfw/hal/stm32h7/dma.h"
#include "fsfw/hal/stm32h7/spi/mspInit.h"
#include "fsfw/hal/stm32h7/spi/spiCore.h"
#include "fsfw/hal/stm32h7/spi/spiInterrupts.h"
#include "fsfw_hal/stm32h7/dma.h"
#include "fsfw_hal/stm32h7/spi/mspInit.h"
#include "fsfw_hal/stm32h7/spi/spiCore.h"
#include "fsfw_hal/stm32h7/spi/spiInterrupts.h"
#include "stm32h743xx.h"
#include "stm32h7xx_hal_spi.h"

View File

@ -1,5 +1,5 @@
#include "fsfw/hal/stm32h7/spi/spiCore.h"
#include "fsfw/hal/stm32h7/spi/spiDefinitions.h"
#include "fsfw_hal/stm32h7/spi/spiCore.h"
#include "fsfw_hal/stm32h7/spi/spiDefinitions.h"
#include <cstdio>

View File

@ -1,8 +1,8 @@
#ifndef FSFW_HAL_STM32H7_SPI_SPICORE_H_
#define FSFW_HAL_STM32H7_SPI_SPICORE_H_
#include "fsfw/hal/stm32h7/dma.h"
#include "fsfw/hal/stm32h7/spi/spiDefinitions.h"
#include "fsfw_hal/stm32h7/dma.h"
#include "fsfw_hal/stm32h7/spi/spiDefinitions.h"
#include "stm32h7xx_hal.h"
#include "stm32h7xx_hal_dma.h"

View File

@ -1,4 +1,4 @@
#include "fsfw/hal/stm32h7/spi/spiDefinitions.h"
#include "fsfw_hal/stm32h7/spi/spiDefinitions.h"
void spi::assignSpiMode(SpiModes spiMode, SPI_HandleTypeDef& spiHandle) {
switch(spiMode) {

View File

@ -1,5 +1,5 @@
#include "fsfw/hal/stm32h7/spi/spiInterrupts.h"
#include "fsfw/hal/stm32h7/spi/spiCore.h"
#include "fsfw_hal/stm32h7/spi/spiInterrupts.h"
#include "fsfw_hal/stm32h7/spi/spiCore.h"
#include "stm32h7xx_hal.h"
#include "stm32h7xx_hal_dma.h"

View File

@ -1,6 +1,6 @@
#include "fsfw/hal/stm32h7/spi/stm32h743ziSpi.h"
#include "fsfw/hal/stm32h7/spi/spiCore.h"
#include "fsfw/hal/stm32h7/spi/spiInterrupts.h"
#include "fsfw_hal/stm32h7/spi/stm32h743ziSpi.h"
#include "fsfw_hal/stm32h7/spi/spiCore.h"
#include "fsfw_hal/stm32h7/spi/spiInterrupts.h"
#include "stm32h7xx_hal.h"
#include "stm32h7xx_hal_rcc.h"

View File

@ -4,7 +4,7 @@
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <fsfw/events/EventManager.h>
#include <fsfw/health/HealthTable.h>
#include <fsfw/tmtcpacket/pus/TmPacketStored.h>
#include <fsfw/tmtcpacket/pus/tm/TmPacketStored.h>
#include <fsfw/tmtcservices/CommandingServiceBase.h>
#include <fsfw/tmtcservices/PusServiceBase.h>
#include <fsfw/internalError/InternalErrorReporter.h>

View File

@ -9,5 +9,10 @@
#cmakedefine FSFW_ADD_COORDINATES
#cmakedefine FSFW_ADD_PUS
#cmakedefine FSFW_ADD_MONITORING
#cmakedefine FSFW_ADD_SGP4_PROPAGATOR
#ifndef FSFW_HAL_L3GD20_GYRO_DEBUG
#define FSFW_HAL_L3GD20_GYRO_DEBUG 0
#endif /* FSFW_HAL_L3GD20_GYRO_DEBUG */
#endif /* FSFW_FSFW_H_ */

View File

@ -7,7 +7,7 @@
#ifndef PLATFORM_WIN
#include <sys/time.h>
#endif
#include "fsfw/contrib/sgp4/sgp4unit.h"
#include "fsfw-contrib/sgp4/sgp4unit.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
class Sgp4Propagator {

View File

@ -8,4 +8,9 @@
not enabled with FSFW_ADD_COORDINATES
#endif
#ifndef FSFW_ADD_SGP4_PROPAGATOR
#warning Coordinates files were included but SGP4 contributed code compilation was \
not enabled with FSFW_ADD_SGP4_PROPAGATOR
#endif
#endif /* FSFW_SRC_FSFW_COORDINATES_COORDINATESCONF_H_ */

View File

@ -11,7 +11,6 @@
#include "FreeRTOS.h"
#include "queue.h"
/**
* @brief This class manages sending and receiving of
* message queue messages.

View File

@ -14,7 +14,7 @@ void utility::printUnixErrorGeneric(const char* const className,
#if FSFW_VERBOSE_LEVEL >= 1
if(outputType == sif::OutputTypes::OUT_ERROR) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << className << "::" << function << ":" << failString << " error: "
sif::error << className << "::" << function << ": " << failString << " error: "
<< strerror(errno) << std::endl;
#else
sif::printError("%s::%s: %s error: %s\n", className, function, failString, strerror(errno));
@ -22,7 +22,7 @@ void utility::printUnixErrorGeneric(const char* const className,
}
else {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << className << "::" << function << ":" << failString << " error: "
sif::warning << className << "::" << function << ": " << failString << " error: "
<< strerror(errno) << std::endl;
#else
sif::printWarning("%s::%s: %s error: %s\n", className, function, failString, strerror(errno));

View File

@ -1,7 +1,7 @@
#ifndef FSFW_SERVICEINTERFACE_SERVICEINTERFACE_H_
#define FSFW_SERVICEINTERFACE_SERVICEINTERFACE_H_
#include <FSFWConfig.h>
#include "fsfw/FSFW.h"
#include "serviceInterfaceDefintions.h"
#if FSFW_CPP_OSTREAM_ENABLED == 1

View File

@ -171,9 +171,11 @@ bool ServiceInterfaceBuffer::crAdditionEnabled() const {
return addCrToPreamble;
}
#if FSFW_COLORED_OUTPUT == 1
void ServiceInterfaceBuffer::setAsciiColorPrefix(std::string colorPrefix) {
this->colorPrefix = colorPrefix;
}
#endif
#ifdef UT699
#include "../osal/rtems/Interrupt.h"

View File

@ -19,9 +19,11 @@ bool ServiceInterfaceStream::crAdditionEnabled() const {
return streambuf.crAdditionEnabled();
}
#if FSFW_COLORED_OUTPUT == 1
void ServiceInterfaceStream::setAsciiColorPrefix(std::string asciiColorCode) {
streambuf.setAsciiColorPrefix(asciiColorCode);
}
#endif
#endif

View File

@ -46,7 +46,9 @@ public:
*/
bool crAdditionEnabled() const;
#if FSFW_COLORED_OUTPUT == 1
void setAsciiColorPrefix(std::string asciiColorCode);
#endif
protected:
ServiceInterfaceBuffer streambuf;

View File

@ -6,4 +6,4 @@ target_include_directories(${LIB_FSFW_NAME} INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
)
add_subdirectory(fsfw)
add_subdirectory(fsfw_tests)

View File

@ -1 +0,0 @@
add_subdirectory(tests)

View File

@ -1,11 +1,11 @@
#include "fsfw/tests/internal/InternalUnitTester.h"
#include "fsfw/tests/internal/UnittDefinitions.h"
#include "fsfw_tests/internal/InternalUnitTester.h"
#include "fsfw_tests/internal/UnittDefinitions.h"
#include "fsfw/tests/internal/osal/IntTestMq.h"
#include "fsfw/tests/internal/osal/IntTestSemaphore.h"
#include "fsfw/tests/internal/osal/IntTestMutex.h"
#include "fsfw/tests/internal/serialize/IntTestSerialization.h"
#include "fsfw/tests/internal/globalfunctions/TestArrayPrinter.h"
#include "fsfw_tests/internal/osal/IntTestMq.h"
#include "fsfw_tests/internal/osal/IntTestSemaphore.h"
#include "fsfw_tests/internal/osal/IntTestMutex.h"
#include "fsfw_tests/internal/serialize/IntTestSerialization.h"
#include "fsfw_tests/internal/globalfunctions/TestArrayPrinter.h"
#include <cstdlib>

View File

@ -1,4 +1,4 @@
#include "fsfw/tests/internal/UnittDefinitions.h"
#include "fsfw_tests/internal/UnittDefinitions.h"
ReturnValue_t unitt::put_error(std::string errorId) {
#if FSFW_CPP_OSTREAM_ENABLED == 1

View File

@ -1,4 +1,4 @@
#include "fsfw/tests/internal/globalfunctions/TestArrayPrinter.h"
#include "fsfw_tests/internal/globalfunctions/TestArrayPrinter.h"
void arrayprinter::testArrayPrinter() {
{

View File

@ -1,5 +1,5 @@
#include "fsfw/tests/internal/osal/IntTestMq.h"
#include "fsfw/tests/internal/UnittDefinitions.h"
#include "fsfw_tests/internal/osal/IntTestMq.h"
#include "fsfw_tests/internal/UnittDefinitions.h"
#include <fsfw/ipc/MessageQueueIF.h>
#include <fsfw/ipc/QueueFactory.h>

View File

@ -1,5 +1,5 @@
#include "fsfw/tests/internal/osal/IntTestMutex.h"
#include "fsfw/tests/internal/UnittDefinitions.h"
#include "fsfw_tests/internal/osal/IntTestMutex.h"
#include "fsfw_tests/internal/UnittDefinitions.h"
#include <fsfw/ipc/MutexFactory.h>

Some files were not shown because too many files have changed in this diff Show More