From 87c05705ec4f10ec020e160d432de77365cb7149 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 28 Jun 2023 15:43:44 +0200 Subject: [PATCH 1/2] core ctrl bugfix --- bsp_q7s/core/CoreController.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 4387e788..cea6c700 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -170,9 +170,6 @@ ReturnValue_t CoreController::initialize() { sdStateMachine(); - triggerEvent(core::REBOOT_SW, CURRENT_CHIP, CURRENT_COPY); - announceCurrentImageInfo(); - announceVersionInfo(); EventManagerIF *eventManager = ObjectManager::instance()->get(objects::EVENT_MANAGER); if (eventManager == nullptr or eventQueue == nullptr) { @@ -189,17 +186,22 @@ ReturnValue_t CoreController::initialize() { if (result != returnvalue::OK) { sif::warning << "Subscribing for GPS GPS_FIX_CHANGE event failed" << std::endl; } - + triggerEvent(core::REBOOT_SW, CURRENT_CHIP, CURRENT_COPY); + announceCurrentImageInfo(); + // This has to come before the version announce because it might be required for retrieving + // the firmware version. if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) { UioMapper sysRomMapper(q7s::UIO_SYS_ROM); result = sysRomMapper.getMappedAdress(&mappedSysRomAddr, UioMapper::Permissions::READ_ONLY); if (result != returnvalue::OK) { // TODO: This might be a reason to switch to another image.. sif::error << "Getting mapped SYS ROM UIO address failed" << std::endl; - return ObjectManager::CHILD_INIT_FAILED; + result = ObjectManager::CHILD_INIT_FAILED; } } - return returnvalue::OK; + announceVersionInfo(); + + return result; } ReturnValue_t CoreController::initializeAfterTaskCreation() { From 0a12dbf2bed3fd0557b556ed527398b4324f2692 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 29 Jun 2023 08:53:08 +0200 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fda0e54..5d82a812 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,14 @@ will consitute of a breaking change warranting a new major release: - Important bugfixes for PTME. See `q7s-package` CHANGELOG. -# [v5.1.0] to be released +# [v5.2.0] to be released + +## Fixed + +- The firmware information event was not triggered even when possible because of an ordering + bug in the initializer function. + +# [v5.1.0] 2023-06-28 - `eive-tmtc` version v5.1.0