FreeRTOS OSAL update and minor tweaks #442

Merged
gaisser merged 7 commits from mueller/freertos-updates-minor-tweaks into development 2021-07-13 14:18:03 +02:00
19 changed files with 57 additions and 47 deletions

View File

@ -43,12 +43,12 @@ endif()
set(FSFW_OSAL_DEFINITION FSFW_HOST)
if(${OS_FSFW} STREQUAL host)
if(OS_FSFW MATCHES host)
set(OS_FSFW_NAME "Host")
elseif(${OS_FSFW} STREQUAL linux)
elseif(OS_FSFW MATCHES linux)
set(OS_FSFW_NAME "Linux")
set(FSFW_OSAL_DEFINITION FSFW_LINUX)
elseif(${OS_FSFW} STREQUAL freertos)
elseif(OS_FSFW MATCHES freertos)
set(OS_FSFW_NAME "FreeRTOS")
set(FSFW_OSAL_DEFINITION FSFW_FREERTOS)
target_link_libraries(${LIB_FSFW_NAME} PRIVATE

View File

@ -21,11 +21,16 @@ public:
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SYSTEM_1;
//! [EXPORT] : [COMMENT] A RF available signal was detected. P1: raw RFA state, P2: 0
static const Event RF_AVAILABLE = MAKE_EVENT(0, severity::INFO);
static const Event RF_LOST = MAKE_EVENT(1, severity::INFO); //!< A previously found RF available signal was lost. P1: raw RFA state, P2: 0
static const Event BIT_LOCK = MAKE_EVENT(2, severity::INFO); //!< A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0
static const Event BIT_LOCK_LOST = MAKE_EVENT(3, severity::INFO); //!< A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0
//! [EXPORT] : [COMMENT] A previously found RF available signal was lost.
//! P1: raw RFA state, P2: 0
static const Event RF_LOST = MAKE_EVENT(1, severity::INFO);
//! [EXPORT] : [COMMENT] A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0
static const Event BIT_LOCK = MAKE_EVENT(2, severity::INFO);
//! [EXPORT] : [COMMENT] A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0
static const Event BIT_LOCK_LOST = MAKE_EVENT(3, severity::INFO);
// static const Event RF_CHAIN_LOST = MAKE_EVENT(4, severity::INFO); //!< The CCSDS Board detected that either bit lock or RF available or both are lost. No parameters.
static const Event FRAME_PROCESSING_FAILED = MAKE_EVENT(5, severity::LOW); //!< The CCSDS Board could not interpret a TC
//! [EXPORT] : [COMMENT] The CCSDS Board could not interpret a TC
static const Event FRAME_PROCESSING_FAILED = MAKE_EVENT(5, severity::LOW);
/**
* The Constructor sets the passed parameters and nothing else.
* @param set_frame_buffer The buffer in which incoming frame candidates are stored.

View File

@ -104,7 +104,8 @@ public:
static const Event DEVICE_MISSED_REPLY = MAKE_EVENT(5, severity::LOW);
static const Event DEVICE_UNKNOWN_REPLY = MAKE_EVENT(6, severity::LOW);
static const Event DEVICE_UNREQUESTED_REPLY = MAKE_EVENT(7, severity::LOW);
static const Event INVALID_DEVICE_COMMAND = MAKE_EVENT(8, severity::LOW); //!< Indicates a SW bug in child class.
//! [EXPORT] : [COMMENT] Indicates a SW bug in child class.
static const Event INVALID_DEVICE_COMMAND = MAKE_EVENT(8, severity::LOW);
static const Event MONITORING_LIMIT_EXCEEDED = MAKE_EVENT(9, severity::LOW);
static const Event MONITORING_AMBIGUOUS = MAKE_EVENT(10, severity::HIGH);

View File

@ -4,8 +4,8 @@
#include "../../returnvalues/HasReturnvaluesIF.h"
#include "../../tasks/SemaphoreIF.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "FreeRTOS.h"
#include "task.h"
#if (tskKERNEL_VERSION_MAJOR == 8 && tskKERNEL_VERSION_MINOR > 2) || \
tskKERNEL_VERSION_MAJOR > 8

View File

@ -4,8 +4,8 @@
#include "../../returnvalues/HasReturnvaluesIF.h"
#include "../../tasks/SemaphoreIF.h"
#include <freertos/FreeRTOS.h>
#include <freertos/semphr.h>
#include "FreeRTOS.h"
#include "semphr.h"
/**
* @brief OS Tool to achieve synchronization of between tasks or between

View File

@ -22,10 +22,11 @@ target_sources(${LIB_FSFW_NAME}
# FreeRTOS as a static library and set LIB_OS_NAME to the target name of the
# library.
if(NOT LIB_OS_NAME)
message(FATAL_ERROR
"FreeRTOS needs to be linked as a target and "
"LIB_OS_NAME needs to be set to the target"
message(STATUS
"LIB_OS_NAME is empty. Make sure to include the FreeRTOS header path properly."
)
else()
target_link_libraries(${LIB_FSFW_NAME} PRIVATE
${LIB_OS_NAME}
)
endif()
target_link_libraries(${LIB_FSWFW_NAME} ${LIB_OS_NAME})

View File

@ -3,8 +3,8 @@
#include "../../timemanager/Clock.h"
#include "../../globalfunctions/timevalOperations.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "FreeRTOS.h"
#include "task.h"
#include <stdlib.h>
#include <time.h>

View File

@ -4,8 +4,8 @@
#include "CountingSemaphUsingTask.h"
#include "../../tasks/SemaphoreIF.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "FreeRTOS.h"
#include "task.h"
#if (tskKERNEL_VERSION_MAJOR == 8 && tskKERNEL_VERSION_MINOR > 2) || \
tskKERNEL_VERSION_MAJOR > 8

View File

@ -3,7 +3,8 @@
#include "../../serviceinterface/ServiceInterfaceStream.h"
#include <freertos/semphr.h>
#include "FreeRTOS.h"
#include "semphr.h"
// Make sure #define configUSE_COUNTING_SEMAPHORES 1 is set in
// free FreeRTOSConfig.h file.

View File

@ -6,8 +6,8 @@
#include "../../tasks/FixedTimeslotTaskIF.h"
#include "../../tasks/Typedef.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "FreeRTOS.h"
#include "task.h"
class FixedTimeslotTask: public FixedTimeslotTaskIF, public FreeRTOSTaskIF {
public:

View File

@ -1,8 +1,8 @@
#ifndef FSFW_OSAL_FREERTOS_FREERTOSTASKIF_H_
#define FSFW_OSAL_FREERTOS_FREERTOSTASKIF_H_
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "FreeRTOS.h"
#include "task.h"
class FreeRTOSTaskIF {
public:

View File

@ -6,10 +6,11 @@
#include "../../internalError/InternalErrorReporterIF.h"
#include "../../ipc/MessageQueueIF.h"
#include "../../ipc/MessageQueueMessageIF.h"
#include "../../ipc/MessageQueueMessage.h"
#include "FreeRTOS.h"
#include "queue.h"
#include <freertos/FreeRTOS.h>
#include <freertos/queue.h>
#include <fsfw/ipc/MessageQueueMessage.h>
/**
* @brief This class manages sending and receiving of

View File

@ -3,8 +3,8 @@
#include "../../ipc/MutexIF.h"
#include <freertos/FreeRTOS.h>
#include <freertos/semphr.h>
#include "FreeRTOS.h"
#include "semphr.h"
/**
* @brief OS component to implement MUTual EXclusion

View File

@ -6,8 +6,8 @@
#include "../../tasks/PeriodicTaskIF.h"
#include "../../tasks/Typedef.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "FreeRTOS.h"
#include "task.h"
#include <vector>

View File

@ -5,8 +5,8 @@
#include "../../ipc/messageQueueDefinitions.h"
#include "../../ipc/MessageQueueIF.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "FreeRTOS.h"
#include "queue.h"
#include <map>

View File

@ -1,9 +1,10 @@
#include "../../osal/FreeRTOS/BinarySemaphore.h"
#include "../../osal/FreeRTOS/BinSemaphUsingTask.h"
#include "../../osal/FreeRTOS/CountingSemaphore.h"
#include "../../osal/FreeRTOS/CountingSemaphUsingTask.h"
#include "BinarySemaphore.h"
#include "BinSemaphUsingTask.h"
#include "CountingSemaphore.h"
#include "CountingSemaphUsingTask.h"
#include "../../tasks/SemaphoreFactory.h"
#include "../../serviceinterface/ServiceInterfaceStream.h"
#include "../../serviceinterface/ServiceInterface.h"
SemaphoreFactory* SemaphoreFactory::factoryInstance = nullptr;

View File

@ -1,10 +1,10 @@
#ifndef FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_
#define FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_
#ifndef FSFW_OSAL_FREERTOS_TASKMANAGEMENT_H_
#define FSFW_OSAL_FREERTOS_TASKMANAGEMENT_H_
#include "../../returnvalues/HasReturnvaluesIF.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "FreeRTOS.h"
#include "task.h"
#include <cstdint>

View File

@ -1,6 +1,6 @@
#include "Timekeeper.h"
#include <FreeRTOSConfig.h>
#include "FreeRTOSConfig.h"
Timekeeper * Timekeeper::myinstance = nullptr;

View File

@ -3,8 +3,8 @@
#include "../../timemanager/Clock.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "FreeRTOS.h"
#include "task.h"
/**