From 221012f79005d17136d484ef5193f4c09d89f307 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Oct 2021 19:34:34 +0200 Subject: [PATCH] hosted build compiling again --- bsp_hosted/fsfwconfig/OBSWConfig.h.in | 6 ++++++ bsp_hosted/fsfwconfig/fsfwconfig.mk | 7 ------- bsp_q7s/core/ObjectFactory.cpp | 8 ++++---- common/config/commonConfig.h.in | 14 +++++++++----- fsfw | 2 +- linux/fsfwconfig/OBSWConfig.h.in | 12 ++++++------ linux/obc/Ptme.cpp | 5 ++--- linux/obc/Ptme.h | 2 +- mission/tmtc/CCSDSHandler.cpp | 4 ++-- mission/tmtc/CCSDSHandler.h | 2 +- 10 files changed, 32 insertions(+), 30 deletions(-) delete mode 100644 bsp_hosted/fsfwconfig/fsfwconfig.mk diff --git a/bsp_hosted/fsfwconfig/OBSWConfig.h.in b/bsp_hosted/fsfwconfig/OBSWConfig.h.in index 5996e3a2..a2353947 100644 --- a/bsp_hosted/fsfwconfig/OBSWConfig.h.in +++ b/bsp_hosted/fsfwconfig/OBSWConfig.h.in @@ -14,6 +14,12 @@ debugging. */ #define OBSW_VEBOSE_LEVEL 1 +#define OBSW_USE_CCSDS_IP_CORE 0 +// Set to 1 if all telemetry should be sent to the PTME IP Core +#define OBSW_TM_TO_PTME 0 +// Set to 1 if telecommands are received via the PDEC IP Core +#define OBSW_TC_FROM_PDEC 0 + #ifdef __cplusplus #include "objects/systemObjectList.h" diff --git a/bsp_hosted/fsfwconfig/fsfwconfig.mk b/bsp_hosted/fsfwconfig/fsfwconfig.mk deleted file mode 100644 index 53cb0fc7..00000000 --- a/bsp_hosted/fsfwconfig/fsfwconfig.mk +++ /dev/null @@ -1,7 +0,0 @@ -CXXSRC += $(wildcard $(CURRENTPATH)/cdatapool/*.cpp) -CXXSRC += $(wildcard $(CURRENTPATH)/ipc/*.cpp) -CXXSRC += $(wildcard $(CURRENTPATH)/objects/*.cpp) -CXXSRC += $(wildcard $(CURRENTPATH)/pollingsequence/*.cpp) -CXXSRC += $(wildcard $(CURRENTPATH)/events/*.cpp) - -INCLUDES += $(CURRENTPATH) \ No newline at end of file diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 47b26a2a..16e3da95 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -935,13 +935,13 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF *gpioComIF) { CCSDSHandler* ccsdsHandler = new CCSDSHandler(objects::CCSDS_HANDLER, objects::PTME); VirtualChannel* vc = nullptr; - vc = new VirtualChannel(ccsds::VC0, config::VC0_QUEUE_SIZE); + vc = new VirtualChannel(ccsds::VC0, common::VC0_QUEUE_SIZE); ccsdsHandler->addVirtualChannel(ccsds::VC0, vc); - vc = new VirtualChannel(ccsds::VC1, config::VC1_QUEUE_SIZE); + vc = new VirtualChannel(ccsds::VC1, common::VC1_QUEUE_SIZE); ccsdsHandler->addVirtualChannel(ccsds::VC1, vc); - vc = new VirtualChannel(ccsds::VC2, config::VC2_QUEUE_SIZE); + vc = new VirtualChannel(ccsds::VC2, common::VC2_QUEUE_SIZE); ccsdsHandler->addVirtualChannel(ccsds::VC2, vc); - vc = new VirtualChannel(ccsds::VC3, config::VC3_QUEUE_SIZE); + vc = new VirtualChannel(ccsds::VC3, common::VC3_QUEUE_SIZE); ccsdsHandler->addVirtualChannel(ccsds::VC3, vc); GpioCookie* gpioRS485Chip = new GpioCookie; diff --git a/common/config/commonConfig.h.in b/common/config/commonConfig.h.in index c8607fae..6dad37d5 100644 --- a/common/config/commonConfig.h.in +++ b/common/config/commonConfig.h.in @@ -7,19 +7,23 @@ // Disable this for mission code. It allows exchanging TMTC packets via the Ethernet port #define OBSW_ADD_TCPIP_BRIDGE 1 + // Use TCP instead of UDP for the TMTC bridge. This allows using the TMTC client locally // because UDP packets are not allowed in the VPN // This will cause the OBSW to initialize the TMTC bridge responsible for exchanging data with the // CCSDS IP Cores. -#define OBSW_USE_CCSDS_IP_CORE 1 -// Set to 1 if all telemetry should be sent to the PTME IP Core -#define OBSW_TM_TO_PTME 1 -// Set to 1 if telecommands are received via the PDEC IP Core -#define OBSW_TC_FROM_PDEC 0 #define OBSW_USE_TCP_BRIDGE 1 namespace common { extern const uint16_t TC_PACKET_ID; + +static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50; +static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4; +static constexpr uint8_t VC0_QUEUE_SIZE = 50; +static constexpr uint8_t VC1_QUEUE_SIZE = 50; +static constexpr uint8_t VC2_QUEUE_SIZE = 50; +static constexpr uint8_t VC3_QUEUE_SIZE = 50; + } #endif /* COMMON_CONFIG_COMMONCONFIG_H_ */ diff --git a/fsfw b/fsfw index b985bf51..ad68802f 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit b985bf5167be74c0d43bd70c501eb5f9640bd99e +Subproject commit ad68802fe4af9af554bd8221c607ba1f4d87185b diff --git a/linux/fsfwconfig/OBSWConfig.h.in b/linux/fsfwconfig/OBSWConfig.h.in index 924026af..6ccd6b6d 100644 --- a/linux/fsfwconfig/OBSWConfig.h.in +++ b/linux/fsfwconfig/OBSWConfig.h.in @@ -33,6 +33,12 @@ debugging. */ //! All of this should be enabled for mission code! #if defined XIPHOS_Q7S +#define OBSW_USE_CCSDS_IP_CORE 1 +// Set to 1 if all telemetry should be sent to the PTME IP Core +#define OBSW_TM_TO_PTME 1 +// Set to 1 if telecommands are received via the PDEC IP Core +#define OBSW_TC_FROM_PDEC 0 + #define OBSW_ENABLE_TIMERS 1 #define OBSW_ADD_STAR_TRACKER 0 #define OBSW_ADD_PLOC_SUPERVISOR 0 @@ -124,12 +130,6 @@ namespace config { /* Add mission configuration flags here */ static constexpr uint32_t OBSW_FILESYSTEM_HANDLER_QUEUE_SIZE = 50; static constexpr uint32_t PLOC_UPDATER_QUEUE_SIZE = 50; -static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50; -static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4; -static constexpr uint8_t VC0_QUEUE_SIZE = 50; -static constexpr uint8_t VC1_QUEUE_SIZE = 50; -static constexpr uint8_t VC2_QUEUE_SIZE = 50; -static constexpr uint8_t VC3_QUEUE_SIZE = 50; static constexpr uint8_t LIVE_TM = 0; diff --git a/linux/obc/Ptme.cpp b/linux/obc/Ptme.cpp index 80f9945c..63af5d33 100644 --- a/linux/obc/Ptme.cpp +++ b/linux/obc/Ptme.cpp @@ -5,8 +5,7 @@ #include "fsfw/serviceinterface/ServiceInterface.h" #include "PtmeConfig.h" -Ptme::Ptme(object_id_t objectId) : - SystemObject(objectId) { +Ptme::Ptme(object_id_t objectId): SystemObject(objectId) { } Ptme::~Ptme() { @@ -54,7 +53,7 @@ ReturnValue_t Ptme::writeToVc(uint8_t vcId, const uint8_t * data, size_t size) { void Ptme::addVcInterface(VcId_t vcId, VcInterfaceIF* vc) { - if (vcId > config::NUMBER_OF_VIRTUAL_CHANNELS) { + if (vcId > common::NUMBER_OF_VIRTUAL_CHANNELS) { sif::warning << "Ptme::addVcInterface: Invalid virtual channel ID" << std::endl; return; } diff --git a/linux/obc/Ptme.h b/linux/obc/Ptme.h index be687e17..5364974f 100644 --- a/linux/obc/Ptme.h +++ b/linux/obc/Ptme.h @@ -78,7 +78,7 @@ private: static const int PTME_DATA_REG_OFFSET = 256; /** The file descriptor of the UIO driver */ - int fd; + int fd = 0; uint32_t* ptmeBaseAddress = nullptr; diff --git a/mission/tmtc/CCSDSHandler.cpp b/mission/tmtc/CCSDSHandler.cpp index 95d557ee..9b2912c1 100644 --- a/mission/tmtc/CCSDSHandler.cpp +++ b/mission/tmtc/CCSDSHandler.cpp @@ -78,7 +78,7 @@ MessageQueueId_t CCSDSHandler::getCommandQueue() const { } void CCSDSHandler::addVirtualChannel(VcId_t vcId, VirtualChannel* virtualChannel) { - if (vcId > config::NUMBER_OF_VIRTUAL_CHANNELS) { + if (vcId > common::NUMBER_OF_VIRTUAL_CHANNELS) { sif::warning << "CCSDSHandler::addVirtualChannel: Invalid virtual channel ID" << std::endl; return; } @@ -97,7 +97,7 @@ void CCSDSHandler::addVirtualChannel(VcId_t vcId, VirtualChannel* virtualChannel } MessageQueueId_t CCSDSHandler::getReportReceptionQueue(uint8_t virtualChannel) { - if (virtualChannel < config::NUMBER_OF_VIRTUAL_CHANNELS) { + if (virtualChannel < common::NUMBER_OF_VIRTUAL_CHANNELS) { VirtualChannelMapIter iter = virtualChannelMap.find(virtualChannel); if (iter != virtualChannelMap.end()) { return iter->second->getReportReceptionQueue(); diff --git a/mission/tmtc/CCSDSHandler.h b/mission/tmtc/CCSDSHandler.h index 05693a38..b53cb8cd 100644 --- a/mission/tmtc/CCSDSHandler.h +++ b/mission/tmtc/CCSDSHandler.h @@ -53,7 +53,7 @@ public: private: - static const uint32_t QUEUE_SIZE = config::CCSDS_HANDLER_QUEUE_SIZE; + static const uint32_t QUEUE_SIZE = common::CCSDS_HANDLER_QUEUE_SIZE; using VirtualChannelMap = std::unordered_map; using VirtualChannelMapIter = VirtualChannelMap::iterator;