diff --git a/config/commonConfig.h.in b/config/commonConfig.h.in index c79a07d..24dc62a 100644 --- a/config/commonConfig.h.in +++ b/config/commonConfig.h.in @@ -11,6 +11,9 @@ #define OBSW_PRINT_MISSED_DEADLINES 0 +//! Perform internal unit testd at application startup +#define OBSW_PERFORM_INTERNAL_UNITTEST 1 + //! Add core components for the FSFW and for TMTC communication #define OBSW_ADD_CORE_COMPONENTS 1 diff --git a/mission/core/GenericFactory.cpp b/mission/core/GenericFactory.cpp index f7cb1dc..91980b3 100644 --- a/mission/core/GenericFactory.cpp +++ b/mission/core/GenericFactory.cpp @@ -5,6 +5,7 @@ #include "tmtc/pusIds.h" #include "objects/systemObjectList.h" +#include "fsfw/tests/internal/InternalUnitTester.h" #include "test/FsfwExampleTask.h" #include "test/FsfwReaderTask.h" @@ -116,6 +117,13 @@ void ObjectFactory::produceGenericObjects() { new TestController(objects::TEST_CONTROLLER); #endif /* OBSW_ADD_CONTROLLER_DEMO == 1 */ + +#if OBSW_PERFORM_INTERNAL_UNITTEST == 1 + InternalUnitTester::TestConfig testCfg; + testCfg.testArrayPrinter = false; + InternalUnitTester unittester; + unittester.performTests(testCfg); +#endif /* OBSW_PERFORM_INTERNAL_UNITTEST == 1 */ } void Factory::setStaticFrameworkObjectIds() { diff --git a/stm32h7/networking/ethernetif.c b/stm32h7/networking/ethernetif.c index d603289..25c0fb4 100644 --- a/stm32h7/networking/ethernetif.c +++ b/stm32h7/networking/ethernetif.c @@ -54,7 +54,7 @@ #include #include -#ifdef FSFW_RTEMS +#ifdef FSFW_OSAL_RTEMS #include #endif @@ -103,14 +103,14 @@ __attribute__((section(".RxArraySection"))) uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH #elif defined ( __GNUC__ ) /* GNU Compiler */ -#ifdef FSFW_RTEMS +#ifdef FSFW_OSAL_RTEMS /* Put into special RTEMS section and align correctly */ ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".bsp_nocache"), __aligned__(DMA_DESCRIPTOR_ALIGNMENT))); /* Ethernet Rx DMA Descriptors */ /* Put into special RTEMS section and align correctly */ ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".bsp_nocache"), __aligned__(DMA_DESCRIPTOR_ALIGNMENT))); /* Ethernet Tx DMA Descriptors */ /* Ethernet Receive Buffers. Just place somewhere is BSS instead of explicitely placing it */ uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_RX_BUFFER_SIZE]; -#elif defined(FSFW_FREERTOS) +#elif defined FSFW_OSAL_FREERTOS /* Placement and alignment specified in linker script here */ ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection"))); /* Ethernet Rx DMA Descriptors */ ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".TxDecripSection"))); /* Ethernet Tx DMA Descriptors */