Init commit
This commit is contained in:
14
bsp_stm32_rtems/fsfwconfig/CMakeLists.txt
Normal file
14
bsp_stm32_rtems/fsfwconfig/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
ipc/missionMessageTypes.cpp
|
||||
pollingsequence/pollingSequenceFactory.cpp
|
||||
)
|
||||
|
||||
# Add include paths for the executable
|
||||
target_include_directories(${TARGET_NAME}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
if(NOT DEFINED FSFW_CONFIG_DIRECTORY)
|
||||
set(FSFW_CONFIG_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
72
bsp_stm32_rtems/fsfwconfig/FSFWConfig.h
Normal file
72
bsp_stm32_rtems/fsfwconfig/FSFWConfig.h
Normal file
@ -0,0 +1,72 @@
|
||||
#ifndef CONFIG_FSFWCONFIG_H_
|
||||
#define CONFIG_FSFWCONFIG_H_
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
//! Used to determine whether C++ ostreams are used which can increase
|
||||
//! the binary size significantly. If this is disabled,
|
||||
//! the C stdio functions can be used alternatively
|
||||
#define FSFW_CPP_OSTREAM_ENABLED 0
|
||||
|
||||
//! More FSFW related printouts depending on level. Useful for development.
|
||||
#define FSFW_VERBOSE_LEVEL 1
|
||||
|
||||
//! Can be used to completely disable printouts, even the C stdio ones.
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 0 && FSFW_VERBOSE_LEVEL == 0
|
||||
#define FSFW_DISABLE_PRINTOUT 0
|
||||
#endif
|
||||
|
||||
#define FSFW_USE_PUS_C_TELEMETRY 1
|
||||
|
||||
//! Can be used to disable the ANSI color sequences for C stdio.
|
||||
#define FSFW_COLORED_OUTPUT 1
|
||||
|
||||
//! If FSFW_OBJ_EVENT_TRANSLATION is set to one,
|
||||
//! additional output which requires the translation files translateObjects
|
||||
//! and translateEvents (and their compiled source files)
|
||||
#define FSFW_OBJ_EVENT_TRANSLATION 0
|
||||
|
||||
#if FSFW_OBJ_EVENT_TRANSLATION == 1
|
||||
//! Specify whether info events are printed too.
|
||||
#define FSFW_DEBUG_INFO 1
|
||||
#include "objects/translateObjects.h"
|
||||
#include "events/translateEvents.h"
|
||||
#else
|
||||
#endif
|
||||
|
||||
//! When using the newlib nano library, C99 support for stdio facilities
|
||||
//! will not be provided. This define should be set to 1 if this is the case.
|
||||
#define FSFW_NO_C99_IO 1
|
||||
|
||||
//! Specify whether a special mode store is used for Subsystem components.
|
||||
#define FSFW_USE_MODESTORE 0
|
||||
|
||||
//! Defines if the real time scheduler for linux should be used.
|
||||
//! If set to 0, this will also disable priority settings for linux
|
||||
//! as most systems will not allow to set nice values without privileges
|
||||
//! For embedded linux system set this to 1.
|
||||
//! If set to 1 the binary needs "cap_sys_nice=eip" privileges to run
|
||||
#define FSFW_USE_REALTIME_FOR_LINUX 0
|
||||
|
||||
namespace fsfwconfig {
|
||||
|
||||
//! Default timestamp size. The default timestamp will be an seven byte CDC short timestamp.
|
||||
static constexpr uint8_t FSFW_MISSION_TIMESTAMP_SIZE = 7;
|
||||
|
||||
//! Configure the allocated pool sizes for the event manager.
|
||||
static constexpr size_t FSFW_EVENTMGMR_MATCHTREE_NODES = 240;
|
||||
static constexpr size_t FSFW_EVENTMGMT_EVENTIDMATCHERS = 120;
|
||||
static constexpr size_t FSFW_EVENTMGMR_RANGEMATCHERS = 120;
|
||||
|
||||
//! Defines the FIFO depth of each commanding service base which
|
||||
//! also determines how many commands a CSB service can handle in one cycle
|
||||
//! simultaneously. This will increase the required RAM for
|
||||
//! each CSB service !
|
||||
static constexpr uint8_t FSFW_CSB_FIFO_DEPTH = 6;
|
||||
|
||||
static constexpr size_t FSFW_PRINT_BUFFER_SIZE = 124;
|
||||
|
||||
}
|
||||
|
||||
#endif /* CONFIG_FSFWCONFIG_H_ */
|
39
bsp_stm32_rtems/fsfwconfig/OBSWConfig.h
Normal file
39
bsp_stm32_rtems/fsfwconfig/OBSWConfig.h
Normal file
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @brief This file can be used to add preprocessor define for conditional
|
||||
* code inclusion exclusion or various other project constants and
|
||||
* properties in one place.
|
||||
*/
|
||||
#ifndef FSFWCONFIG_OBSWCONFIG_H_
|
||||
#define FSFWCONFIG_OBSWCONFIG_H_
|
||||
|
||||
#define DEBUG_UART_MS_TIMEOUT 10
|
||||
|
||||
#define OBSW_ADD_LWIP_NETWORKING 1
|
||||
//! Only applies if TMTC commanding is enabled.
|
||||
//! Specify whether LEDs are used to display Ethernet connection status.
|
||||
#define OBSW_ETHERNET_USE_LED1_LED2 0
|
||||
|
||||
#define OBSW_ATTEMPT_DHCP_CONN 1
|
||||
|
||||
#if OBSW_ATTEMPT_DHCP_CONN == 0
|
||||
#define MAX_DHCP_TRIES 0
|
||||
#else
|
||||
#define MAX_DHCP_TRIES 3
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "events/subsystemIdRanges.h"
|
||||
#include "objects/systemObjectList.h"
|
||||
#include <commonConfig.h>
|
||||
|
||||
namespace config {
|
||||
#endif
|
||||
|
||||
/* Add mission configuration flags here */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FSFWCONFIG_OBSWCONFIG_H_ */
|
18
bsp_stm32_rtems/fsfwconfig/events/subsystemIdRanges.h
Normal file
18
bsp_stm32_rtems/fsfwconfig/events/subsystemIdRanges.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_
|
||||
#define CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_
|
||||
|
||||
#include <cstdint>
|
||||
#include <fsfw/events/fwSubsystemIdRanges.h>
|
||||
|
||||
/**
|
||||
* @brief Custom subsystem IDs can be added here
|
||||
* @details
|
||||
* Subsystem IDs are used to create unique events.
|
||||
*/
|
||||
namespace SUBSYSTEM_ID {
|
||||
enum: uint8_t {
|
||||
SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE,
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_ */
|
15
bsp_stm32_rtems/fsfwconfig/fsfwconfig.mk
Normal file
15
bsp_stm32_rtems/fsfwconfig/fsfwconfig.mk
Normal file
@ -0,0 +1,15 @@
|
||||
CXXSRC += $(wildcard $(CURRENTPATH)/ipc/*.cpp)
|
||||
CXXSRC += $(wildcard $(CURRENTPATH)/objects/*.cpp)
|
||||
CXXSRC += $(wildcard $(CURRENTPATH)/pollingsequence/*.cpp)
|
||||
CXXSRC += $(wildcard $(CURRENTPATH)/events/*.cpp)
|
||||
CXXSRC += $(wildcard $(CURRENTPATH)/tmtc/*.cpp)
|
||||
CXXSRC += $(wildcard $(CURRENTPATH)/devices/*.cpp)
|
||||
|
||||
INCLUDES += $(CURRENTPATH)
|
||||
INCLUDES += $(CURRENTPATH)/objects
|
||||
INCLUDES += $(CURRENTPATH)/returnvalues
|
||||
INCLUDES += $(CURRENTPATH)/tmtc
|
||||
INCLUDES += $(CURRENTPATH)/events
|
||||
INCLUDES += $(CURRENTPATH)/devices
|
||||
INCLUDES += $(CURRENTPATH)/pollingsequence
|
||||
INCLUDES += $(CURRENTPATH)/ipc
|
11
bsp_stm32_rtems/fsfwconfig/ipc/missionMessageTypes.cpp
Normal file
11
bsp_stm32_rtems/fsfwconfig/ipc/missionMessageTypes.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "missionMessageTypes.h"
|
||||
#include <fsfw/ipc/CommandMessage.h>
|
||||
#include <fsfw/ipc/CommandMessageCleaner.h>
|
||||
|
||||
void messagetypes::clearMissionMessage(CommandMessage* message) {
|
||||
switch((message->getMessageType())) {
|
||||
default:
|
||||
message->setCommand(CommandMessage::CMD_NONE);
|
||||
break;
|
||||
}
|
||||
}
|
19
bsp_stm32_rtems/fsfwconfig/ipc/missionMessageTypes.h
Normal file
19
bsp_stm32_rtems/fsfwconfig/ipc/missionMessageTypes.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef FSFWCONFIG_IPC_MISSIONMESSAGETYPES_H_
|
||||
#define FSFWCONFIG_IPC_MISSIONMESSAGETYPES_H_
|
||||
|
||||
#include <fsfw/ipc/FwMessageTypes.h>
|
||||
|
||||
class CommandMessage;
|
||||
|
||||
namespace messagetypes {
|
||||
/* First type must have number MESSAGE_TYPE::FW_MESSAGES_COUNT! */
|
||||
/* Remember to add new message types to the clearMissionMessage function below! */
|
||||
enum MISSION_MESSAGE_TYPE {
|
||||
COSTUM_MESSAGE = FW_MESSAGES_COUNT,
|
||||
};
|
||||
|
||||
void clearMissionMessage(CommandMessage* message);
|
||||
|
||||
}
|
||||
|
||||
#endif /* FSFWCONFIG_IPC_MISSIONMESSAGETYPES_H_ */
|
16
bsp_stm32_rtems/fsfwconfig/objects/systemObjectList.h
Normal file
16
bsp_stm32_rtems/fsfwconfig/objects/systemObjectList.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef FSFWCONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
|
||||
#define FSFWCONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
|
||||
|
||||
#include <commonSystemObjects.h>
|
||||
|
||||
namespace objects {
|
||||
enum mission_objects {
|
||||
/* 0x62 ('b') Board and mission specific objects */
|
||||
UDP_BRIDGE = 0x62000300,
|
||||
UDP_POLLING_TASK = 0x62000400,
|
||||
/* Generic name for FSFW static ID setter */
|
||||
DOWNLINK_DESTINATION = UDP_BRIDGE
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* FSFWCONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ */
|
@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Add polling sequence initialization which are not common to every BSP here.
|
||||
*/
|
||||
#include "pollingSequenceFactory.h"
|
||||
|
@ -0,0 +1,13 @@
|
||||
#ifndef POLLINGSEQUENCE_POLLINGSEQUENCFACTORY_H_
|
||||
#define POLLINGSEQUENCE_POLLINGSEQUENCFACTORY_H_
|
||||
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
|
||||
class FixedTimeslotTaskIF;
|
||||
|
||||
namespace pst {
|
||||
ReturnValue_t pollingSequenceExamples(FixedTimeslotTaskIF *thisSequence);
|
||||
ReturnValue_t pollingSequenceDevices(FixedTimeslotTaskIF* thisSequence);
|
||||
}
|
||||
|
||||
#endif /* POLLINGSEQUENCE_POLLINGSEQUENCFACTORY_H_ */
|
12
bsp_stm32_rtems/fsfwconfig/returnvalues/classIds.h
Normal file
12
bsp_stm32_rtems/fsfwconfig/returnvalues/classIds.h
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef FSFWCONFIG_RETURNVALUES_CLASSIDS_H_
|
||||
#define FSFWCONFIG_RETURNVALUES_CLASSIDS_H_
|
||||
|
||||
#include <commonConfig.h>
|
||||
|
||||
namespace CLASS_ID {
|
||||
enum classIds: uint8_t {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif /* FSFWCONFIG_RETURNVALUES_CLASSIDS_H_ */
|
11
bsp_stm32_rtems/fsfwconfig/tmtc/apid.h
Normal file
11
bsp_stm32_rtems/fsfwconfig/tmtc/apid.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef FSFWCONFIG_TMTC_APID_H_
|
||||
#define FSFWCONFIG_TMTC_APID_H_
|
||||
|
||||
#include <cstdint>
|
||||
#include <commonConfig.h>
|
||||
|
||||
namespace apid {
|
||||
static const uint16_t APID = COMMON_APID;
|
||||
};
|
||||
|
||||
#endif /* FSFWCONFIG_TMTC_APID_H_ */
|
7
bsp_stm32_rtems/fsfwconfig/tmtc/pusIds.h
Normal file
7
bsp_stm32_rtems/fsfwconfig/tmtc/pusIds.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef FSFWCONFIG_TMTC_PUSIDS_H_
|
||||
#define FSFWCONFIG_TMTC_PUSIDS_H_
|
||||
|
||||
#include <commonConfig.h>
|
||||
|
||||
|
||||
#endif /* FSFWCONFIG_TMTC_PUSIDS_H_ */
|
Reference in New Issue
Block a user