Compare commits
36 Commits
Author | SHA1 | Date | |
---|---|---|---|
b273729b10 | |||
67024ec933 | |||
3a20748ff6 | |||
516898b7b2 | |||
bd4e05c944 | |||
72ffa365d4 | |||
52f5b088bf | |||
73498ac9af | |||
1f18904810 | |||
239410e2dc | |||
dc89350ac7 | |||
5a642b7d2f
|
|||
6b9aa8eb7b | |||
3ee2e72652
|
|||
91106feb82 | |||
7a68188140 | |||
d88ffb1734
|
|||
c2b415bdd6
|
|||
facfad3367
|
|||
d95ecc3678
|
|||
966faf51b5
|
|||
5c9d7a43ab
|
|||
4465170747
|
|||
5420e322f7
|
|||
6040cd2d1e
|
|||
4e7b774d32
|
|||
7f36455857
|
|||
07df6eb95f | |||
88e8268c26 | |||
20bc31449a | |||
2901ebc15c
|
|||
e992f933ec | |||
a95ab49690 | |||
b261779ebf | |||
db5e7a535e | |||
4a8e111a18 |
42
CHANGELOG.md
42
CHANGELOG.md
@ -16,6 +16,37 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
# [v6.0.0] to be released
|
||||||
|
|
||||||
|
- Important bugfixes for PTME. See `q7s-package` CHANGELOG.
|
||||||
|
|
||||||
|
# [v5.1.0] to be released
|
||||||
|
|
||||||
|
# [v5.0.0] 2023-06-26
|
||||||
|
|
||||||
|
v3.3.1 and all following version will now be moved to v5.0.0 with the additional changes listed
|
||||||
|
here. This was done because the firmware update (v4.0.0) is not working right now and it is not
|
||||||
|
known when and how it will be fixed. Because of that, all updates to make the SW work with the new
|
||||||
|
firmware, which are limited to a few files will be moved to a dev branch so regular development
|
||||||
|
compatible to the old firmware can continue.
|
||||||
|
|
||||||
|
TLDR: This version is compatible to the old firmware and some changes which only work with the new
|
||||||
|
firmware have been reverted.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Added `sync` syscall in graceful shutdown handler
|
||||||
|
- Graceful shutdown is now performed by the reboot watchdog
|
||||||
|
- There is now a separate file for the total reboot counter. The reboot watchdog has its own local
|
||||||
|
counters to determine whether a reboot is necessary.
|
||||||
|
|
||||||
|
# [v4.0.1] 2023-06-24
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- `PusLiveDemux` packet demultiplexing bugfix where the demultiplexing did not work when there was
|
||||||
|
only one destination available.
|
||||||
|
|
||||||
# [v4.0.0] 2023-06-22
|
# [v4.0.0] 2023-06-22
|
||||||
|
|
||||||
- `eive-tmtc` version v5.0.0
|
- `eive-tmtc` version v5.0.0
|
||||||
@ -45,6 +76,17 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
restore the PL I2C.
|
restore the PL I2C.
|
||||||
- Core controller now announces firmware version as well when requesting a version info event
|
- Core controller now announces firmware version as well when requesting a version info event
|
||||||
|
|
||||||
|
# [v3.3.1] 2023-06-22
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- `PusLiveDemux` packet demultiplexing bugfix where the demultiplexing did not work when there was
|
||||||
|
only one destination available.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Fixed H parameter in SUS converter from 1 mm to 2.5 mm.
|
||||||
|
|
||||||
# [v3.3.0] 2023-06-21
|
# [v3.3.0] 2023-06-21
|
||||||
|
|
||||||
Like v3.2.0 but without the custom FM changes related to VC0.
|
Like v3.2.0 but without the custom FM changes related to VC0.
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
set(OBSW_VERSION_MAJOR 4)
|
set(OBSW_VERSION_MAJOR 5)
|
||||||
set(OBSW_VERSION_MINOR 0)
|
set(OBSW_VERSION_MINOR 0)
|
||||||
set(OBSW_VERSION_REVISION 0)
|
set(OBSW_VERSION_REVISION 0)
|
||||||
|
|
||||||
|
@ -85,9 +85,13 @@ static constexpr char EN_RW_4[] = "enable_rw_4";
|
|||||||
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
|
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
|
||||||
static constexpr char ENABLE_RADFET[] = "enable_radfet";
|
static constexpr char ENABLE_RADFET[] = "enable_radfet";
|
||||||
|
|
||||||
|
static constexpr char PAPB_BUSY_SIGNAL_VC0[] = "papb_busy_signal_vc0";
|
||||||
static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0";
|
static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0";
|
||||||
|
static constexpr char PAPB_BUSY_SIGNAL_VC1[] = "papb_busy_signal_vc1";
|
||||||
static constexpr char PAPB_EMPTY_SIGNAL_VC1[] = "papb_empty_signal_vc1";
|
static constexpr char PAPB_EMPTY_SIGNAL_VC1[] = "papb_empty_signal_vc1";
|
||||||
|
static constexpr char PAPB_BUSY_SIGNAL_VC2[] = "papb_busy_signal_vc2";
|
||||||
static constexpr char PAPB_EMPTY_SIGNAL_VC2[] = "papb_empty_signal_vc2";
|
static constexpr char PAPB_EMPTY_SIGNAL_VC2[] = "papb_empty_signal_vc2";
|
||||||
|
static constexpr char PAPB_BUSY_SIGNAL_VC3[] = "papb_busy_signal_vc3";
|
||||||
static constexpr char PAPB_EMPTY_SIGNAL_VC3[] = "papb_empty_signal_vc3";
|
static constexpr char PAPB_EMPTY_SIGNAL_VC3[] = "papb_empty_signal_vc3";
|
||||||
|
|
||||||
static constexpr char PTME_RESETN[] = "ptme_resetn";
|
static constexpr char PTME_RESETN[] = "ptme_resetn";
|
||||||
|
@ -190,12 +190,14 @@ ReturnValue_t CoreController::initialize() {
|
|||||||
sif::warning << "Subscribing for GPS GPS_FIX_CHANGE event failed" << std::endl;
|
sif::warning << "Subscribing for GPS GPS_FIX_CHANGE event failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
UioMapper sysRomMapper(q7s::UIO_SYS_ROM);
|
if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) {
|
||||||
result = sysRomMapper.getMappedAdress(&mappedSysRomAddr, UioMapper::Permissions::READ_ONLY);
|
UioMapper sysRomMapper(q7s::UIO_SYS_ROM);
|
||||||
if (result != returnvalue::OK) {
|
result = sysRomMapper.getMappedAdress(&mappedSysRomAddr, UioMapper::Permissions::READ_ONLY);
|
||||||
// TODO: This might be a reason to switch to another image..
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Getting mapped SYS ROM UIO address failed" << std::endl;
|
// TODO: This might be a reason to switch to another image..
|
||||||
return ObjectManager::CHILD_INIT_FAILED;
|
sif::error << "Getting mapped SYS ROM UIO address failed" << std::endl;
|
||||||
|
return ObjectManager::CHILD_INIT_FAILED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
@ -321,23 +323,23 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
if (size < 1) {
|
if (size < 1) {
|
||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
}
|
}
|
||||||
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_WATCHDOG_FILE;
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||||
if (data[0] == 0) {
|
if (data[0] == 0) {
|
||||||
rebootFile.enabled = false;
|
rebootWatchdogFile.enabled = false;
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
} else if (data[0] == 1) {
|
} else if (data[0] == 1) {
|
||||||
rebootFile.enabled = true;
|
rebootWatchdogFile.enabled = true;
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
} else {
|
} else {
|
||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
}
|
}
|
||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
case (READ_REBOOT_MECHANISM_INFO): {
|
case (READ_REBOOT_MECHANISM_INFO): {
|
||||||
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_WATCHDOG_FILE;
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||||
RebootMechanismPacket packet(rebootFile);
|
RebootWatchdogPacket packet(rebootWatchdogFile);
|
||||||
ReturnValue_t result = actionHelper.reportData(commandedBy, actionId, &packet);
|
ReturnValue_t result = actionHelper.reportData(commandedBy, actionId, &packet);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
@ -346,12 +348,13 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
}
|
}
|
||||||
case (RESET_REBOOT_COUNTERS): {
|
case (RESET_REBOOT_COUNTERS): {
|
||||||
if (size == 0) {
|
if (size == 0) {
|
||||||
resetRebootCount(xsc::ALL_CHIP, xsc::ALL_COPY);
|
resetRebootWatchdogCounters(xsc::ALL_CHIP, xsc::ALL_COPY);
|
||||||
} else if (size == 2) {
|
} else if (size == 2) {
|
||||||
if (data[0] > 1 or data[1] > 1) {
|
if (data[0] > 1 or data[1] > 1) {
|
||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
}
|
}
|
||||||
resetRebootCount(static_cast<xsc::Chip>(data[0]), static_cast<xsc::Copy>(data[1]));
|
resetRebootWatchdogCounters(static_cast<xsc::Chip>(data[0]),
|
||||||
|
static_cast<xsc::Copy>(data[1]));
|
||||||
}
|
}
|
||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
@ -446,11 +449,11 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
if (size < 1) {
|
if (size < 1) {
|
||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
}
|
}
|
||||||
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_WATCHDOG_FILE;
|
||||||
// Disable the reboot file mechanism
|
// Disable the reboot file mechanism
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||||
rebootFile.maxCount = data[0];
|
rebootWatchdogFile.maxCount = data[0];
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
case (XSC_REBOOT_OBC): {
|
case (XSC_REBOOT_OBC): {
|
||||||
@ -1208,45 +1211,7 @@ ReturnValue_t CoreController::actionXscReboot(const uint8_t *data, size_t size)
|
|||||||
auto tgtChip = static_cast<xsc::Chip>(data[1]);
|
auto tgtChip = static_cast<xsc::Chip>(data[1]);
|
||||||
auto tgtCopy = static_cast<xsc::Copy>(data[2]);
|
auto tgtCopy = static_cast<xsc::Copy>(data[2]);
|
||||||
|
|
||||||
// This function can not really fail
|
performGracefulShutdown(tgtChip, tgtCopy);
|
||||||
gracefulShutdownTasks(tgtChip, tgtCopy, protOpPerformed);
|
|
||||||
|
|
||||||
switch (tgtChip) {
|
|
||||||
case (xsc::Chip::CHIP_0): {
|
|
||||||
switch (tgtCopy) {
|
|
||||||
case (xsc::Copy::COPY_0): {
|
|
||||||
xsc_boot_copy(XSC_LIBNOR_CHIP_0, XSC_LIBNOR_COPY_NOMINAL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (xsc::Copy::COPY_1): {
|
|
||||||
xsc_boot_copy(XSC_LIBNOR_CHIP_0, XSC_LIBNOR_COPY_GOLD);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (xsc::Chip::CHIP_1): {
|
|
||||||
switch (tgtCopy) {
|
|
||||||
case (xsc::Copy::COPY_0): {
|
|
||||||
xsc_boot_copy(XSC_LIBNOR_CHIP_1, XSC_LIBNOR_COPY_NOMINAL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (xsc::Copy::COPY_1): {
|
|
||||||
xsc_boot_copy(XSC_LIBNOR_CHIP_1, XSC_LIBNOR_COPY_GOLD);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1263,10 +1228,15 @@ ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy co
|
|||||||
sdcMan->markUnusable();
|
sdcMan->markUnusable();
|
||||||
// Wait two seconds to ensure no one uses the SD cards
|
// Wait two seconds to ensure no one uses the SD cards
|
||||||
TaskFactory::delayTask(2000);
|
TaskFactory::delayTask(2000);
|
||||||
|
|
||||||
|
// Ensure that all writes/reads do finish.
|
||||||
|
sync();
|
||||||
|
|
||||||
// Attempt graceful shutdown by unmounting and switching off SD cards
|
// Attempt graceful shutdown by unmounting and switching off SD cards
|
||||||
sdcMan->switchOffSdCard(sd::SdCard::SLOT_0);
|
sdcMan->switchOffSdCard(sd::SdCard::SLOT_0);
|
||||||
sdcMan->switchOffSdCard(sd::SdCard::SLOT_1);
|
sdcMan->switchOffSdCard(sd::SdCard::SLOT_1);
|
||||||
// If any boot copies are unprotected
|
// If any boot copies are unprotected.
|
||||||
|
// Actually this function only ensures that reboots to the own image are protected..
|
||||||
ReturnValue_t result = setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
|
ReturnValue_t result = setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
|
||||||
protOpPerformed, false);
|
protOpPerformed, false);
|
||||||
if (result == returnvalue::OK and protOpPerformed) {
|
if (result == returnvalue::OK and protOpPerformed) {
|
||||||
@ -1555,7 +1525,8 @@ void CoreController::performMountedSdCardOperations() {
|
|||||||
if (not timeFileInitDone) {
|
if (not timeFileInitDone) {
|
||||||
initClockFromTimeFile();
|
initClockFromTimeFile();
|
||||||
}
|
}
|
||||||
performRebootFileHandling(false);
|
performRebootWatchdogHandling(false);
|
||||||
|
performRebootCountersHandling(false);
|
||||||
}
|
}
|
||||||
backupTimeFileHandler();
|
backupTimeFileHandler();
|
||||||
};
|
};
|
||||||
@ -1627,118 +1598,127 @@ ReturnValue_t CoreController::performSdCardCheck() {
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::performRebootFileHandling(bool recreateFile) {
|
void CoreController::performRebootWatchdogHandling(bool recreateFile) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
std::string path = currMntPrefix + REBOOT_FILE;
|
std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE;
|
||||||
|
std::string legacyPath = currMntPrefix + LEGACY_REBOOT_WATCHDOG_FILE;
|
||||||
std::error_code e;
|
std::error_code e;
|
||||||
|
// TODO: Remove at some point in the future.
|
||||||
|
if (std::filesystem::exists(legacyPath, e)) {
|
||||||
|
// Old file might still exist, so copy it to new path
|
||||||
|
std::filesystem::copy(legacyPath, path, std::filesystem::copy_options::overwrite_existing, e);
|
||||||
|
if (e) {
|
||||||
|
sif::error << "File copy has failed: " << e.message() << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (not std::filesystem::exists(path, e) or recreateFile) {
|
if (not std::filesystem::exists(path, e) or recreateFile) {
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
sif::info << "CoreController::performRebootFileHandling: Recreating reboot file" << std::endl;
|
sif::info << "CoreController::performRebootFileHandling: Recreating reboot watchdog file"
|
||||||
|
<< std::endl;
|
||||||
#endif
|
#endif
|
||||||
rebootFile.enabled = false;
|
rebootWatchdogFile.enabled = false;
|
||||||
rebootFile.img00Cnt = 0;
|
rebootWatchdogFile.img00Cnt = 0;
|
||||||
rebootFile.img01Cnt = 0;
|
rebootWatchdogFile.img01Cnt = 0;
|
||||||
rebootFile.img10Cnt = 0;
|
rebootWatchdogFile.img10Cnt = 0;
|
||||||
rebootFile.img11Cnt = 0;
|
rebootWatchdogFile.img11Cnt = 0;
|
||||||
rebootFile.lastChip = xsc::Chip::CHIP_0;
|
rebootWatchdogFile.lastChip = xsc::Chip::CHIP_0;
|
||||||
rebootFile.lastCopy = xsc::Copy::COPY_0;
|
rebootWatchdogFile.lastCopy = xsc::Copy::COPY_0;
|
||||||
rebootFile.img00Lock = false;
|
rebootWatchdogFile.img00Lock = false;
|
||||||
rebootFile.img01Lock = false;
|
rebootWatchdogFile.img01Lock = false;
|
||||||
rebootFile.img10Lock = false;
|
rebootWatchdogFile.img10Lock = false;
|
||||||
rebootFile.img11Lock = false;
|
rebootWatchdogFile.img11Lock = false;
|
||||||
rebootFile.mechanismNextChip = xsc::Chip::NO_CHIP;
|
rebootWatchdogFile.mechanismNextChip = xsc::Chip::NO_CHIP;
|
||||||
rebootFile.mechanismNextCopy = xsc::Copy::NO_COPY;
|
rebootWatchdogFile.mechanismNextCopy = xsc::Copy::NO_COPY;
|
||||||
rebootFile.bootFlag = false;
|
rebootWatchdogFile.bootFlag = false;
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
} else {
|
} else {
|
||||||
if (not parseRebootFile(path, rebootFile)) {
|
if (not parseRebootWatchdogFile(path, rebootWatchdogFile)) {
|
||||||
performRebootFileHandling(true);
|
performRebootWatchdogHandling(true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CURRENT_CHIP == xsc::CHIP_0) {
|
if (CURRENT_CHIP == xsc::CHIP_0) {
|
||||||
if (CURRENT_COPY == xsc::COPY_0) {
|
if (CURRENT_COPY == xsc::COPY_0) {
|
||||||
rebootFile.img00Cnt++;
|
rebootWatchdogFile.img00Cnt++;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img01Cnt++;
|
rebootWatchdogFile.img01Cnt++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CURRENT_COPY == xsc::COPY_0) {
|
if (CURRENT_COPY == xsc::COPY_0) {
|
||||||
rebootFile.img10Cnt++;
|
rebootWatchdogFile.img10Cnt++;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img11Cnt++;
|
rebootWatchdogFile.img11Cnt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rebootFile.bootFlag) {
|
if (rebootWatchdogFile.bootFlag) {
|
||||||
// Trigger event to inform ground that a reboot was triggered
|
// Trigger event to inform ground that a reboot was triggered
|
||||||
uint32_t p1 = rebootFile.lastChip << 16 | rebootFile.lastCopy;
|
uint32_t p1 = rebootWatchdogFile.lastChip << 16 | rebootWatchdogFile.lastCopy;
|
||||||
triggerEvent(core::REBOOT_MECHANISM_TRIGGERED, p1, 0);
|
triggerEvent(core::REBOOT_MECHANISM_TRIGGERED, p1, 0);
|
||||||
// Clear the boot flag
|
// Clear the boot flag
|
||||||
rebootFile.bootFlag = false;
|
rebootWatchdogFile.bootFlag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
announceBootCounts();
|
if (rebootWatchdogFile.mechanismNextChip != xsc::NO_CHIP and
|
||||||
|
rebootWatchdogFile.mechanismNextCopy != xsc::NO_COPY) {
|
||||||
if (rebootFile.mechanismNextChip != xsc::NO_CHIP and
|
if (CURRENT_CHIP != rebootWatchdogFile.mechanismNextChip or
|
||||||
rebootFile.mechanismNextCopy != xsc::NO_COPY) {
|
CURRENT_COPY != rebootWatchdogFile.mechanismNextCopy) {
|
||||||
if (CURRENT_CHIP != rebootFile.mechanismNextChip or
|
std::string infoString = std::to_string(rebootWatchdogFile.mechanismNextChip) + " " +
|
||||||
CURRENT_COPY != rebootFile.mechanismNextCopy) {
|
std::to_string(rebootWatchdogFile.mechanismNextCopy);
|
||||||
std::string infoString = std::to_string(rebootFile.mechanismNextChip) + " " +
|
|
||||||
std::to_string(rebootFile.mechanismNextCopy);
|
|
||||||
sif::warning << "CoreController::performRebootFileHandling: Expected to be on image "
|
sif::warning << "CoreController::performRebootFileHandling: Expected to be on image "
|
||||||
<< infoString << " but currently on other image. Locking " << infoString
|
<< infoString << " but currently on other image. Locking " << infoString
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
// Firmware or other component might be corrupt and we are on another image then the target
|
// Firmware or other component might be corrupt and we are on another image then the target
|
||||||
// image specified by the mechanism. We can't really trust the target image anymore.
|
// image specified by the mechanism. We can't really trust the target image anymore.
|
||||||
// Lock it for now
|
// Lock it for now
|
||||||
if (rebootFile.mechanismNextChip == xsc::CHIP_0) {
|
if (rebootWatchdogFile.mechanismNextChip == xsc::CHIP_0) {
|
||||||
if (rebootFile.mechanismNextCopy == xsc::COPY_0) {
|
if (rebootWatchdogFile.mechanismNextCopy == xsc::COPY_0) {
|
||||||
rebootFile.img00Lock = true;
|
rebootWatchdogFile.img00Lock = true;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img01Lock = true;
|
rebootWatchdogFile.img01Lock = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (rebootFile.mechanismNextCopy == xsc::COPY_0) {
|
if (rebootWatchdogFile.mechanismNextCopy == xsc::COPY_0) {
|
||||||
rebootFile.img10Lock = true;
|
rebootWatchdogFile.img10Lock = true;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img11Lock = true;
|
rebootWatchdogFile.img11Lock = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rebootFile.lastChip = CURRENT_CHIP;
|
rebootWatchdogFile.lastChip = CURRENT_CHIP;
|
||||||
rebootFile.lastCopy = CURRENT_COPY;
|
rebootWatchdogFile.lastCopy = CURRENT_COPY;
|
||||||
// Only reboot if the reboot functionality is enabled.
|
// Only reboot if the reboot functionality is enabled.
|
||||||
// The handler will still increment the boot counts
|
// The handler will still increment the boot counts
|
||||||
if (rebootFile.enabled and (*rebootFile.relevantBootCnt >= rebootFile.maxCount)) {
|
if (rebootWatchdogFile.enabled and
|
||||||
|
(*rebootWatchdogFile.relevantBootCnt >= rebootWatchdogFile.maxCount)) {
|
||||||
// Reboot to other image
|
// Reboot to other image
|
||||||
bool doReboot = false;
|
bool doReboot = false;
|
||||||
xsc::Chip tgtChip = xsc::NO_CHIP;
|
xsc::Chip tgtChip = xsc::NO_CHIP;
|
||||||
xsc::Copy tgtCopy = xsc::NO_COPY;
|
xsc::Copy tgtCopy = xsc::NO_COPY;
|
||||||
determineAndExecuteReboot(rebootFile, doReboot, tgtChip, tgtCopy);
|
rebootWatchdogAlgorithm(rebootWatchdogFile, doReboot, tgtChip, tgtCopy);
|
||||||
if (doReboot) {
|
if (doReboot) {
|
||||||
rebootFile.bootFlag = true;
|
rebootWatchdogFile.bootFlag = true;
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
sif::info << "Boot counter for image " << CURRENT_CHIP << " " << CURRENT_COPY
|
sif::info << "Boot counter for image " << CURRENT_CHIP << " " << CURRENT_COPY
|
||||||
<< " too high. Rebooting to " << tgtChip << " " << tgtCopy << std::endl;
|
<< " too high. Rebooting to " << tgtChip << " " << tgtCopy << std::endl;
|
||||||
#endif
|
#endif
|
||||||
rebootFile.mechanismNextChip = tgtChip;
|
rebootWatchdogFile.mechanismNextChip = tgtChip;
|
||||||
rebootFile.mechanismNextCopy = tgtCopy;
|
rebootWatchdogFile.mechanismNextCopy = tgtCopy;
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
xsc_boot_copy(static_cast<xsc_libnor_chip_t>(tgtChip),
|
performGracefulShutdown(tgtChip, tgtCopy);
|
||||||
static_cast<xsc_libnor_copy_t>(tgtCopy));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rebootFile.mechanismNextChip = xsc::NO_CHIP;
|
rebootWatchdogFile.mechanismNextChip = xsc::NO_CHIP;
|
||||||
rebootFile.mechanismNextCopy = xsc::NO_COPY;
|
rebootWatchdogFile.mechanismNextCopy = xsc::NO_COPY;
|
||||||
}
|
}
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::determineAndExecuteReboot(RebootFile &rf, bool &needsReboot,
|
void CoreController::rebootWatchdogAlgorithm(RebootWatchdogFile &rf, bool &needsReboot,
|
||||||
xsc::Chip &tgtChip, xsc::Copy &tgtCopy) {
|
xsc::Chip &tgtChip, xsc::Copy &tgtCopy) {
|
||||||
tgtChip = xsc::CHIP_0;
|
tgtChip = xsc::CHIP_0;
|
||||||
tgtCopy = xsc::COPY_0;
|
tgtCopy = xsc::COPY_0;
|
||||||
needsReboot = false;
|
needsReboot = false;
|
||||||
@ -1826,7 +1806,7 @@ void CoreController::determineAndExecuteReboot(RebootFile &rf, bool &needsReboot
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CoreController::parseRebootFile(std::string path, RebootFile &rf) {
|
bool CoreController::parseRebootWatchdogFile(std::string path, RebootWatchdogFile &rf) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
std::string selfMatch;
|
std::string selfMatch;
|
||||||
if (CURRENT_CHIP == xsc::CHIP_0) {
|
if (CURRENT_CHIP == xsc::CHIP_0) {
|
||||||
@ -2008,67 +1988,174 @@ bool CoreController::parseRebootFile(std::string path, RebootFile &rf) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
bool CoreController::parseRebootCountersFile(std::string path, RebootCountersFile &rf) {
|
||||||
std::string path = currMntPrefix + REBOOT_FILE;
|
using namespace std;
|
||||||
parseRebootFile(path, rebootFile);
|
ifstream file(path);
|
||||||
|
string word;
|
||||||
|
string line;
|
||||||
|
uint8_t lineIdx = 0;
|
||||||
|
while (std::getline(file, line)) {
|
||||||
|
istringstream iss(line);
|
||||||
|
switch (lineIdx) {
|
||||||
|
case 0: {
|
||||||
|
iss >> word;
|
||||||
|
if (word.find("img00:") == string::npos) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
iss >> rf.img00Cnt;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1: {
|
||||||
|
iss >> word;
|
||||||
|
if (word.find("img01:") == string::npos) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
iss >> rf.img01Cnt;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2: {
|
||||||
|
iss >> word;
|
||||||
|
if (word.find("img10:") == string::npos) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
iss >> rf.img10Cnt;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3: {
|
||||||
|
iss >> word;
|
||||||
|
if (word.find("img11:") == string::npos) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
iss >> rf.img11Cnt;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lineIdx++;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CoreController::resetRebootWatchdogCounters(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||||
|
std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE;
|
||||||
|
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||||
if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) {
|
if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) {
|
||||||
rebootFile.img00Cnt = 0;
|
rebootWatchdogFile.img00Cnt = 0;
|
||||||
rebootFile.img01Cnt = 0;
|
rebootWatchdogFile.img01Cnt = 0;
|
||||||
rebootFile.img10Cnt = 0;
|
rebootWatchdogFile.img10Cnt = 0;
|
||||||
rebootFile.img11Cnt = 0;
|
rebootWatchdogFile.img11Cnt = 0;
|
||||||
} else {
|
} else {
|
||||||
if (tgtChip == xsc::CHIP_0) {
|
if (tgtChip == xsc::CHIP_0) {
|
||||||
if (tgtCopy == xsc::COPY_0) {
|
if (tgtCopy == xsc::COPY_0) {
|
||||||
rebootFile.img00Cnt = 0;
|
rebootWatchdogFile.img00Cnt = 0;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img01Cnt = 0;
|
rebootWatchdogFile.img01Cnt = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (tgtCopy == xsc::COPY_0) {
|
if (tgtCopy == xsc::COPY_0) {
|
||||||
rebootFile.img10Cnt = 0;
|
rebootWatchdogFile.img10Cnt = 0;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img11Cnt = 0;
|
rebootWatchdogFile.img11Cnt = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::rewriteRebootFile(RebootFile file) {
|
void CoreController::performRebootCountersHandling(bool recreateFile) {
|
||||||
std::string path = currMntPrefix + REBOOT_FILE;
|
std::string path = currMntPrefix + REBOOT_COUNTERS_FILE;
|
||||||
|
std::error_code e;
|
||||||
|
if (not std::filesystem::exists(path, e) or recreateFile) {
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
|
sif::info << "CoreController::performRebootFileHandling: Recreating reboot counters file"
|
||||||
|
<< std::endl;
|
||||||
|
#endif
|
||||||
|
rebootCountersFile.img00Cnt = 0;
|
||||||
|
rebootCountersFile.img01Cnt = 0;
|
||||||
|
rebootCountersFile.img10Cnt = 0;
|
||||||
|
rebootCountersFile.img11Cnt = 0;
|
||||||
|
rewriteRebootCountersFile(rebootCountersFile);
|
||||||
|
} else {
|
||||||
|
if (not parseRebootCountersFile(path, rebootCountersFile)) {
|
||||||
|
performRebootCountersHandling(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CURRENT_CHIP == xsc::CHIP_0) {
|
||||||
|
if (CURRENT_COPY == xsc::COPY_0) {
|
||||||
|
rebootCountersFile.img00Cnt++;
|
||||||
|
} else {
|
||||||
|
rebootCountersFile.img01Cnt++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (CURRENT_COPY == xsc::COPY_0) {
|
||||||
|
rebootCountersFile.img10Cnt++;
|
||||||
|
} else {
|
||||||
|
rebootCountersFile.img11Cnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
announceBootCounts();
|
||||||
|
rewriteRebootCountersFile(rebootCountersFile);
|
||||||
|
}
|
||||||
|
void CoreController::rewriteRebootWatchdogFile(RebootWatchdogFile file) {
|
||||||
|
using namespace std::filesystem;
|
||||||
|
std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE;
|
||||||
|
std::string legacyPath = currMntPrefix + LEGACY_REBOOT_WATCHDOG_FILE;
|
||||||
|
{
|
||||||
|
std::ofstream rebootFile(path);
|
||||||
|
if (rebootFile.is_open()) {
|
||||||
|
// Initiate reboot file first. Reboot handling will be on on initialization
|
||||||
|
rebootFile << "on: " << file.enabled << "\nmaxcnt: " << file.maxCount
|
||||||
|
<< "\nimg00: " << file.img00Cnt << "\nimg01: " << file.img01Cnt
|
||||||
|
<< "\nimg10: " << file.img10Cnt << "\nimg11: " << file.img11Cnt
|
||||||
|
<< "\nimg00lock: " << file.img00Lock << "\nimg01lock: " << file.img01Lock
|
||||||
|
<< "\nimg10lock: " << file.img10Lock << "\nimg11lock: " << file.img11Lock
|
||||||
|
<< "\nbootflag: " << file.bootFlag << "\nlast: " << static_cast<int>(file.lastChip)
|
||||||
|
<< " " << static_cast<int>(file.lastCopy)
|
||||||
|
<< "\nnext: " << static_cast<int>(file.mechanismNextChip) << " "
|
||||||
|
<< static_cast<int>(file.mechanismNextCopy) << "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::error_code e;
|
||||||
|
// TODO: Remove at some point in the future when all images have been updated.
|
||||||
|
if (std::filesystem::exists(legacyPath)) {
|
||||||
|
// Keep those two files in sync
|
||||||
|
std::filesystem::copy(path, legacyPath, std::filesystem::copy_options::overwrite_existing, e);
|
||||||
|
if (e) {
|
||||||
|
sif::error << "File copy has failed: " << e.message() << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CoreController::rewriteRebootCountersFile(RebootCountersFile file) {
|
||||||
|
std::string path = currMntPrefix + REBOOT_COUNTERS_FILE;
|
||||||
std::ofstream rebootFile(path);
|
std::ofstream rebootFile(path);
|
||||||
if (rebootFile.is_open()) {
|
if (rebootFile.is_open()) {
|
||||||
// Initiate reboot file first. Reboot handling will be on on initialization
|
rebootFile << "img00: " << file.img00Cnt << "\nimg01: " << file.img01Cnt
|
||||||
rebootFile << "on: " << file.enabled << "\nmaxcnt: " << file.maxCount
|
<< "\nimg10: " << file.img10Cnt << "\nimg11: " << file.img11Cnt << "\n";
|
||||||
<< "\nimg00: " << file.img00Cnt << "\nimg01: " << file.img01Cnt
|
|
||||||
<< "\nimg10: " << file.img10Cnt << "\nimg11: " << file.img11Cnt
|
|
||||||
<< "\nimg00lock: " << file.img00Lock << "\nimg01lock: " << file.img01Lock
|
|
||||||
<< "\nimg10lock: " << file.img10Lock << "\nimg11lock: " << file.img11Lock
|
|
||||||
<< "\nbootflag: " << file.bootFlag << "\nlast: " << static_cast<int>(file.lastChip)
|
|
||||||
<< " " << static_cast<int>(file.lastCopy)
|
|
||||||
<< "\nnext: " << static_cast<int>(file.mechanismNextChip) << " "
|
|
||||||
<< static_cast<int>(file.mechanismNextCopy) << "\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||||
std::string path = currMntPrefix + REBOOT_FILE;
|
std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE;
|
||||||
// Disable the reboot file mechanism
|
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||||
parseRebootFile(path, rebootFile);
|
|
||||||
if (tgtChip == xsc::CHIP_0) {
|
if (tgtChip == xsc::CHIP_0) {
|
||||||
if (tgtCopy == xsc::COPY_0) {
|
if (tgtCopy == xsc::COPY_0) {
|
||||||
rebootFile.img00Lock = lock;
|
rebootWatchdogFile.img00Lock = lock;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img01Lock = lock;
|
rebootWatchdogFile.img01Lock = lock;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (tgtCopy == xsc::COPY_0) {
|
if (tgtCopy == xsc::COPY_0) {
|
||||||
rebootFile.img10Lock = lock;
|
rebootWatchdogFile.img10Lock = lock;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img11Lock = lock;
|
rebootWatchdogFile.img11Lock = lock;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CoreController::backupTimeFileHandler() {
|
ReturnValue_t CoreController::backupTimeFileHandler() {
|
||||||
@ -2355,10 +2442,12 @@ bool CoreController::startSdStateMachine(sd::SdCard targetActiveSd, SdCfgMode mo
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::announceBootCounts() {
|
void CoreController::announceBootCounts() {
|
||||||
uint64_t totalBootCount =
|
uint64_t totalBootCount = rebootCountersFile.img00Cnt + rebootCountersFile.img01Cnt +
|
||||||
rebootFile.img00Cnt + rebootFile.img01Cnt + rebootFile.img10Cnt + rebootFile.img11Cnt;
|
rebootCountersFile.img10Cnt + rebootCountersFile.img11Cnt;
|
||||||
uint32_t individualBootCountsP1 = (rebootFile.img00Cnt << 16) | rebootFile.img01Cnt;
|
uint32_t individualBootCountsP1 =
|
||||||
uint32_t individualBootCountsP2 = (rebootFile.img10Cnt << 16) | rebootFile.img11Cnt;
|
(rebootCountersFile.img00Cnt << 16) | rebootCountersFile.img01Cnt;
|
||||||
|
uint32_t individualBootCountsP2 =
|
||||||
|
(rebootCountersFile.img10Cnt << 16) | rebootCountersFile.img11Cnt;
|
||||||
triggerEvent(core::INDIVIDUAL_BOOT_COUNTS, individualBootCountsP1, individualBootCountsP2);
|
triggerEvent(core::INDIVIDUAL_BOOT_COUNTS, individualBootCountsP1, individualBootCountsP2);
|
||||||
triggerEvent(core::REBOOT_COUNTER, (totalBootCount >> 32) & 0xffffffff,
|
triggerEvent(core::REBOOT_COUNTER, (totalBootCount >> 32) & 0xffffffff,
|
||||||
totalBootCount & 0xffffffff);
|
totalBootCount & 0xffffffff);
|
||||||
@ -2431,10 +2520,13 @@ void CoreController::announceVersionInfo() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
triggerEvent(VERSION_INFO, p1, p2);
|
triggerEvent(VERSION_INFO, p1, p2);
|
||||||
if (mappedSysRomAddr != nullptr) {
|
|
||||||
uint32_t p1Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr));
|
if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) {
|
||||||
uint32_t p2Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr) + 1);
|
if (mappedSysRomAddr != nullptr) {
|
||||||
triggerEvent(FIRMWARE_INFO, p1Firmware, p2Firmware);
|
uint32_t p1Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr));
|
||||||
|
uint32_t p2Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr) + 1);
|
||||||
|
triggerEvent(FIRMWARE_INFO, p1Firmware, p2Firmware);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2443,6 +2535,50 @@ void CoreController::announceCurrentImageInfo() {
|
|||||||
triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY);
|
triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t CoreController::performGracefulShutdown(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||||
|
bool protOpPerformed = false;
|
||||||
|
// This function can not really fail
|
||||||
|
gracefulShutdownTasks(tgtChip, tgtCopy, protOpPerformed);
|
||||||
|
|
||||||
|
switch (tgtChip) {
|
||||||
|
case (xsc::Chip::CHIP_0): {
|
||||||
|
switch (tgtCopy) {
|
||||||
|
case (xsc::Copy::COPY_0): {
|
||||||
|
xsc_boot_copy(XSC_LIBNOR_CHIP_0, XSC_LIBNOR_COPY_NOMINAL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (xsc::Copy::COPY_1): {
|
||||||
|
xsc_boot_copy(XSC_LIBNOR_CHIP_0, XSC_LIBNOR_COPY_GOLD);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (xsc::Chip::CHIP_1): {
|
||||||
|
switch (tgtCopy) {
|
||||||
|
case (xsc::Copy::COPY_0): {
|
||||||
|
xsc_boot_copy(XSC_LIBNOR_CHIP_1, XSC_LIBNOR_COPY_NOMINAL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (xsc::Copy::COPY_1): {
|
||||||
|
xsc_boot_copy(XSC_LIBNOR_CHIP_1, XSC_LIBNOR_COPY_GOLD);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
bool CoreController::isNumber(const std::string &s) {
|
bool CoreController::isNumber(const std::string &s) {
|
||||||
return !s.empty() && std::find_if(s.begin(), s.end(),
|
return !s.empty() && std::find_if(s.begin(), s.end(),
|
||||||
[](unsigned char c) { return !std::isdigit(c); }) == s.end();
|
[](unsigned char c) { return !std::isdigit(c); }) == s.end();
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
class Timer;
|
class Timer;
|
||||||
class SdCardManager;
|
class SdCardManager;
|
||||||
|
|
||||||
struct RebootFile {
|
struct RebootWatchdogFile {
|
||||||
static constexpr uint8_t DEFAULT_MAX_BOOT_CNT = 10;
|
static constexpr uint8_t DEFAULT_MAX_BOOT_CNT = 10;
|
||||||
|
|
||||||
bool enabled = true;
|
bool enabled = true;
|
||||||
@ -45,9 +45,9 @@ struct RebootFile {
|
|||||||
xsc::Copy mechanismNextCopy = xsc::Copy::NO_COPY;
|
xsc::Copy mechanismNextCopy = xsc::Copy::NO_COPY;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RebootMechanismPacket : public SerialLinkedListAdapter<SerializeIF> {
|
class RebootWatchdogPacket : public SerialLinkedListAdapter<SerializeIF> {
|
||||||
public:
|
public:
|
||||||
RebootMechanismPacket(RebootFile& rf) {
|
RebootWatchdogPacket(RebootWatchdogFile& rf) {
|
||||||
enabled = rf.enabled;
|
enabled = rf.enabled;
|
||||||
maxCount = rf.maxCount;
|
maxCount = rf.maxCount;
|
||||||
img00Count = rf.img00Cnt;
|
img00Count = rf.img00Cnt;
|
||||||
@ -100,6 +100,38 @@ class RebootMechanismPacket : public SerialLinkedListAdapter<SerializeIF> {
|
|||||||
SerializeElement<uint8_t> nextCopy = 0;
|
SerializeElement<uint8_t> nextCopy = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct RebootCountersFile {
|
||||||
|
// 16 bit values so all boot counters fit into one event.
|
||||||
|
uint16_t img00Cnt = 0;
|
||||||
|
uint16_t img01Cnt = 0;
|
||||||
|
uint16_t img10Cnt = 0;
|
||||||
|
uint16_t img11Cnt = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class RebootCountersPacket : public SerialLinkedListAdapter<SerializeIF> {
|
||||||
|
RebootCountersPacket(RebootCountersFile& rf) {
|
||||||
|
img00Count = rf.img00Cnt;
|
||||||
|
img01Count = rf.img01Cnt;
|
||||||
|
img10Count = rf.img10Cnt;
|
||||||
|
img11Count = rf.img11Cnt;
|
||||||
|
setLinks();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void setLinks() {
|
||||||
|
setStart(&img00Count);
|
||||||
|
img00Count.setNext(&img01Count);
|
||||||
|
img01Count.setNext(&img10Count);
|
||||||
|
img10Count.setNext(&img11Count);
|
||||||
|
setLast(&img11Count);
|
||||||
|
}
|
||||||
|
|
||||||
|
SerializeElement<uint16_t> img00Count = 0;
|
||||||
|
SerializeElement<uint16_t> img01Count = 0;
|
||||||
|
SerializeElement<uint16_t> img10Count = 0;
|
||||||
|
SerializeElement<uint16_t> img11Count = 0;
|
||||||
|
};
|
||||||
|
|
||||||
class CoreController : public ExtendedControllerBase, public ReceivesParameterMessagesIF {
|
class CoreController : public ExtendedControllerBase, public ReceivesParameterMessagesIF {
|
||||||
public:
|
public:
|
||||||
enum ParamId : uint8_t { PREF_SD = 0, NUM_IDS };
|
enum ParamId : uint8_t { PREF_SD = 0, NUM_IDS };
|
||||||
@ -113,10 +145,15 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||||||
|
|
||||||
const std::string VERSION_FILE =
|
const std::string VERSION_FILE =
|
||||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::VERSION_FILE_NAME);
|
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::VERSION_FILE_NAME);
|
||||||
const std::string REBOOT_FILE =
|
const std::string LEGACY_REBOOT_WATCHDOG_FILE =
|
||||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::REBOOT_FILE_NAME);
|
"/" + std::string(core::CONF_FOLDER) + "/" +
|
||||||
|
std::string(core::LEGACY_REBOOT_WATCHDOG_FILE_NAME);
|
||||||
|
const std::string REBOOT_WATCHDOG_FILE =
|
||||||
|
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::REBOOT_WATCHDOG_FILE_NAME);
|
||||||
const std::string BACKUP_TIME_FILE =
|
const std::string BACKUP_TIME_FILE =
|
||||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::TIME_FILE_NAME);
|
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::TIME_FILE_NAME);
|
||||||
|
const std::string REBOOT_COUNTERS_FILE =
|
||||||
|
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::REBOOT_COUNTER_FILE_NAME);
|
||||||
|
|
||||||
static constexpr char CHIP_0_COPY_0_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi0-nom-rootfs";
|
static constexpr char CHIP_0_COPY_0_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi0-nom-rootfs";
|
||||||
static constexpr char CHIP_0_COPY_1_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi0-gold-rootfs";
|
static constexpr char CHIP_0_COPY_1_MOUNT_DIR[] = "/tmp/mntupdate-xdi-qspi0-gold-rootfs";
|
||||||
@ -248,7 +285,8 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||||||
std::array<uint8_t, 1024> dirListingBuf{};
|
std::array<uint8_t, 1024> dirListingBuf{};
|
||||||
DirListingDumpContext dumpContext{};
|
DirListingDumpContext dumpContext{};
|
||||||
|
|
||||||
RebootFile rebootFile = {};
|
RebootWatchdogFile rebootWatchdogFile = {};
|
||||||
|
RebootCountersFile rebootCountersFile = {};
|
||||||
|
|
||||||
CommandExecutor cmdExecutor;
|
CommandExecutor cmdExecutor;
|
||||||
SimpleRingBuffer cmdReplyBuf;
|
SimpleRingBuffer cmdReplyBuf;
|
||||||
@ -318,12 +356,14 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||||||
void currentStateSetter(sd::SdCard sdCard, sd::SdState newState);
|
void currentStateSetter(sd::SdCard sdCard, sd::SdState newState);
|
||||||
void executeNextExternalSdCommand();
|
void executeNextExternalSdCommand();
|
||||||
void checkExternalSdCommandStatus();
|
void checkExternalSdCommandStatus();
|
||||||
void performRebootFileHandling(bool recreateFile);
|
void performRebootWatchdogHandling(bool recreateFile);
|
||||||
|
void performRebootCountersHandling(bool recreateFile);
|
||||||
|
|
||||||
ReturnValue_t actionListDirectoryIntoFile(ActionId_t actionId, MessageQueueId_t commandedBy,
|
ReturnValue_t actionListDirectoryIntoFile(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
const uint8_t* data, size_t size);
|
const uint8_t* data, size_t size);
|
||||||
ReturnValue_t actionListDirectoryDumpDirectly(ActionId_t actionId, MessageQueueId_t commandedBy,
|
ReturnValue_t actionListDirectoryDumpDirectly(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
const uint8_t* data, size_t size);
|
const uint8_t* data, size_t size);
|
||||||
|
ReturnValue_t performGracefulShutdown(xsc::Chip targetChip, xsc::Copy targetCopy);
|
||||||
|
|
||||||
ReturnValue_t actionListDirectoryCommonCommandCreator(const uint8_t* data, size_t size,
|
ReturnValue_t actionListDirectoryCommonCommandCreator(const uint8_t* data, size_t size,
|
||||||
std::ostringstream& oss);
|
std::ostringstream& oss);
|
||||||
@ -337,12 +377,14 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||||||
int handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
|
int handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
|
||||||
bool& protOperationPerformed, bool selfChip, bool selfCopy,
|
bool& protOperationPerformed, bool selfChip, bool selfCopy,
|
||||||
bool allChips, bool allCopies, uint8_t arrIdx);
|
bool allChips, bool allCopies, uint8_t arrIdx);
|
||||||
void determineAndExecuteReboot(RebootFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
|
void rebootWatchdogAlgorithm(RebootWatchdogFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
|
||||||
xsc::Copy& tgtCopy);
|
xsc::Copy& tgtCopy);
|
||||||
void resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
void resetRebootWatchdogCounters(xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||||
void setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
void setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||||
bool parseRebootFile(std::string path, RebootFile& file);
|
bool parseRebootWatchdogFile(std::string path, RebootWatchdogFile& file);
|
||||||
void rewriteRebootFile(RebootFile file);
|
bool parseRebootCountersFile(std::string path, RebootCountersFile& file);
|
||||||
|
void rewriteRebootWatchdogFile(RebootWatchdogFile file);
|
||||||
|
void rewriteRebootCountersFile(RebootCountersFile file);
|
||||||
void announceBootCounts();
|
void announceBootCounts();
|
||||||
void announceVersionInfo();
|
void announceVersionInfo();
|
||||||
void announceCurrentImageInfo();
|
void announceCurrentImageInfo();
|
||||||
|
@ -731,12 +731,20 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
|||||||
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
|
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
|
||||||
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
|
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
|
||||||
GpiodRegularByLineName* gpio = nullptr;
|
GpiodRegularByLineName* gpio = nullptr;
|
||||||
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC0, "PAPB VC0");
|
||||||
|
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_BUSY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC0, "PAPB VC0");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC0, "PAPB VC0");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_EMPTY, gpio);
|
||||||
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC1, "PAPB VC1");
|
||||||
|
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_BUSY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC1, "PAPB VC1");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC1, "PAPB VC1");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_EMPTY, gpio);
|
||||||
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC2, "PAPB VC2");
|
||||||
|
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_BUSY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC2, "PAPB VC2");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC2, "PAPB VC2");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_EMPTY, gpio);
|
||||||
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC3, "PAPB VC3");
|
||||||
|
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_BUSY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, "PAPB VC3");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, "PAPB VC3");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PTME_RESETN, "PTME RESETN",
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PTME_RESETN, "PTME RESETN",
|
||||||
@ -745,14 +753,19 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
|||||||
gpioChecker(args.gpioComIF.addGpios(gpioCookiePtmeIp), "PTME PAPB VCs");
|
gpioChecker(args.gpioComIF.addGpios(gpioCookiePtmeIp), "PTME PAPB VCs");
|
||||||
|
|
||||||
// Creating virtual channel interfaces
|
// Creating virtual channel interfaces
|
||||||
VirtualChannelIF* vc0 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC0_PAPB_EMPTY,
|
VirtualChannelIF* vc0 =
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC0);
|
new PapbVcInterface(&args.gpioComIF, gpioIds::VC0_PAPB_BUSY, gpioIds::VC0_PAPB_EMPTY,
|
||||||
VirtualChannelIF* vc1 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_EMPTY,
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC0);
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC1);
|
VirtualChannelIF* vc1 =
|
||||||
VirtualChannelIF* vc2 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_EMPTY,
|
new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_BUSY, gpioIds::VC1_PAPB_EMPTY,
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC2);
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC1);
|
||||||
VirtualChannelIF* vc3 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_EMPTY,
|
VirtualChannelIF* vc2 =
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC3);
|
new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_BUSY, gpioIds::VC2_PAPB_EMPTY,
|
||||||
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC2);
|
||||||
|
VirtualChannelIF* vc3 =
|
||||||
|
new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_BUSY, gpioIds::VC3_PAPB_EMPTY,
|
||||||
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC3);
|
||||||
|
|
||||||
// Creating ptme object and adding virtual channel interfaces
|
// Creating ptme object and adding virtual channel interfaces
|
||||||
Ptme* ptme = new Ptme(objects::PTME);
|
Ptme* ptme = new Ptme(objects::PTME);
|
||||||
ptme->addVcInterface(ccsds::VC0, vc0);
|
ptme->addVcInterface(ccsds::VC0, vc0);
|
||||||
@ -1017,16 +1030,18 @@ void ObjectFactory::createRadSensorChipSelect(LinuxLibgpioIF* gpioIF) {
|
|||||||
|
|
||||||
void ObjectFactory::createPlI2cResetGpio(LinuxLibgpioIF* gpioIF) {
|
void ObjectFactory::createPlI2cResetGpio(LinuxLibgpioIF* gpioIF) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
if (gpioIF == nullptr) {
|
if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) {
|
||||||
return;
|
if (gpioIF == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
GpioCookie* gpioI2cResetnCookie = new GpioCookie;
|
||||||
|
GpiodRegularByLineName* gpioI2cResetn = new GpiodRegularByLineName(
|
||||||
|
q7s::gpioNames::PL_I2C_ARESETN, "PL_I2C_ARESETN", Direction::OUT, Levels::HIGH);
|
||||||
|
gpioI2cResetnCookie->addGpio(gpioIds::PL_I2C_ARESETN, gpioI2cResetn);
|
||||||
|
gpioChecker(gpioIF->addGpios(gpioI2cResetnCookie), "PL I2C ARESETN");
|
||||||
|
// Reset I2C explicitely again.
|
||||||
|
gpioIF->pullLow(gpioIds::PL_I2C_ARESETN);
|
||||||
|
TaskFactory::delayTask(1);
|
||||||
|
gpioIF->pullHigh(gpioIds::PL_I2C_ARESETN);
|
||||||
}
|
}
|
||||||
GpioCookie* gpioI2cResetnCookie = new GpioCookie;
|
|
||||||
GpiodRegularByLineName* gpioI2cResetn = new GpiodRegularByLineName(
|
|
||||||
q7s::gpioNames::PL_I2C_ARESETN, "PL_I2C_ARESETN", Direction::OUT, Levels::HIGH);
|
|
||||||
gpioI2cResetnCookie->addGpio(gpioIds::PL_I2C_ARESETN, gpioI2cResetn);
|
|
||||||
gpioChecker(gpioIF->addGpios(gpioI2cResetnCookie), "PL I2C ARESETN");
|
|
||||||
// Reset I2C explicitely again.
|
|
||||||
gpioIF->pullLow(gpioIds::PL_I2C_ARESETN);
|
|
||||||
TaskFactory::delayTask(1);
|
|
||||||
gpioIF->pullHigh(gpioIds::PL_I2C_ARESETN);
|
|
||||||
}
|
}
|
||||||
|
@ -96,9 +96,13 @@ enum gpioId_t {
|
|||||||
|
|
||||||
SPI_MUX,
|
SPI_MUX,
|
||||||
VC0_PAPB_EMPTY,
|
VC0_PAPB_EMPTY,
|
||||||
|
VC0_PAPB_BUSY,
|
||||||
VC1_PAPB_EMPTY,
|
VC1_PAPB_EMPTY,
|
||||||
|
VC1_PAPB_BUSY,
|
||||||
VC2_PAPB_EMPTY,
|
VC2_PAPB_EMPTY,
|
||||||
|
VC2_PAPB_BUSY,
|
||||||
VC3_PAPB_EMPTY,
|
VC3_PAPB_EMPTY,
|
||||||
|
VC3_PAPB_BUSY,
|
||||||
PTME_RESETN,
|
PTME_RESETN,
|
||||||
|
|
||||||
PDEC_RESET,
|
PDEC_RESET,
|
||||||
|
@ -7,16 +7,20 @@
|
|||||||
|
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
PapbVcInterface::PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbEmptyId,
|
PapbVcInterface::PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbBusyId,
|
||||||
std::string uioFile, int mapNum)
|
gpioId_t papbEmptyId, std::string uioFile, int mapNum)
|
||||||
: gpioComIF(gpioComIF), papbEmptyId(papbEmptyId), uioFile(std::move(uioFile)), mapNum(mapNum) {}
|
: gpioComIF(gpioComIF),
|
||||||
|
papbBusyId(papbBusyId),
|
||||||
|
papbEmptyId(papbEmptyId),
|
||||||
|
uioFile(std::move(uioFile)),
|
||||||
|
mapNum(mapNum) {}
|
||||||
|
|
||||||
PapbVcInterface::~PapbVcInterface() {}
|
PapbVcInterface::~PapbVcInterface() {}
|
||||||
|
|
||||||
ReturnValue_t PapbVcInterface::initialize() {
|
ReturnValue_t PapbVcInterface::initialize() {
|
||||||
UioMapper uioMapper(uioFile, mapNum);
|
UioMapper uioMapper(uioFile, mapNum);
|
||||||
ReturnValue_t result = uioMapper.getMappedAdress(const_cast<uint32_t**>(&vcBaseReg),
|
ReturnValue_t result = uioMapper.getMappedAdress(const_cast<uint32_t**>(&vcBaseReg),
|
||||||
UioMapper::Permissions::READ_WRITE);
|
UioMapper::Permissions::WRITE_ONLY);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -28,16 +32,63 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) {
|
|||||||
if (size < 4) {
|
if (size < 4) {
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (pollReadyForPacket()) {
|
if (pollInterfaceReadiness(0, true) == returnvalue::OK) {
|
||||||
startPacketTransfer(ByteWidthCfg::ONE);
|
startPacketTransfer(ByteWidthCfg::ONE);
|
||||||
} else {
|
} else {
|
||||||
return DirectTmSinkIF::IS_BUSY;
|
return DirectTmSinkIF::IS_BUSY;
|
||||||
}
|
}
|
||||||
|
// TODO: This should work but does not.. :(
|
||||||
|
// size_t idx = 0;
|
||||||
|
// while (idx < size) {
|
||||||
|
//
|
||||||
|
// nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
||||||
|
// if ((size - idx) < 4) {
|
||||||
|
// *vcBaseReg = CONFIG_DATA_INPUT | (size - idx - 1);
|
||||||
|
// usleep(1);
|
||||||
|
// }
|
||||||
|
// if (pollPapbBusySignal(2) == returnvalue::OK) {
|
||||||
|
// // vcBaseReg + DATA_REG_OFFSET + 3 = static_cast<uint8_t>(data + idx);
|
||||||
|
// // vcBaseReg + DATA_REG_OFFSET + 2 = static_cast<uint8_t>(data + idx + 1);
|
||||||
|
// // vcBaseReg + DATA_REG_OFFSET + 1 = static_cast<uint8_t>(data + idx + 2);
|
||||||
|
// // vcBaseReg + DATA_REG_OFFSET = static_cast<uint8_t>(data + idx + 3);
|
||||||
|
//
|
||||||
|
// // std::memcpy((vcBaseReg + DATA_REG_OFFSET), data + idx , nextWriteSize);
|
||||||
|
// *(vcBaseReg + DATA_REG_OFFSET) = *reinterpret_cast<const uint32_t*>(data + idx);
|
||||||
|
// //uint8_t* byteReg = reinterpret_cast<uint8_t*>(vcBaseReg + DATA_REG_OFFSET);
|
||||||
|
//
|
||||||
|
// //byteReg[0] = data[idx];
|
||||||
|
// //byteReg[1] = data[idx];
|
||||||
|
// } else {
|
||||||
|
// abortPacketTransfer();
|
||||||
|
// return returnvalue::FAILED;
|
||||||
|
// }
|
||||||
|
// // TODO: Change this after the bugfix. Right now, the PAPB ignores the content of the byte
|
||||||
|
// // width configuration.5
|
||||||
|
// // It's okay to increment by a larger amount for the last segment here, loop will be over
|
||||||
|
// // in any case.
|
||||||
|
// idx += 4;
|
||||||
|
// }
|
||||||
for (size_t idx = 0; idx < size; idx++) {
|
for (size_t idx = 0; idx < size; idx++) {
|
||||||
// if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
|
// This delay is super-important, DO NOT REMOVE!
|
||||||
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
|
// Polling the GPIO or the config register too often messes up the scheduler.
|
||||||
|
// TODO: Maybe this should not be done like this. It would be better if there was a custom
|
||||||
|
// FPGA module which can accept packets and then takes care of dumping that packet into
|
||||||
|
// the PTME. DMA would be an ideal solution for this.
|
||||||
|
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
||||||
|
if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
|
||||||
|
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
|
||||||
|
} else {
|
||||||
|
abortPacketTransfer();
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
||||||
|
if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
|
||||||
|
completePacketTransfer();
|
||||||
|
} else {
|
||||||
|
abortPacketTransfer();
|
||||||
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
completePacketTransfer();
|
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,33 +98,60 @@ void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) {
|
|||||||
|
|
||||||
void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; }
|
void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; }
|
||||||
|
|
||||||
bool PapbVcInterface::pollReadyForPacket() const {
|
ReturnValue_t PapbVcInterface::pollInterfaceReadiness(uint32_t maxPollRetries,
|
||||||
// Check if PAPB interface is ready to receive data. Use the configuration register for this.
|
bool checkReadyState) const {
|
||||||
// Bit 5, see PTME ptme_001_01-0-7-r2 Table 31.
|
uint32_t busyIdx = 0;
|
||||||
uint32_t reg = *vcBaseReg;
|
nextDelay.tv_nsec = FIRST_DELAY_PAPB_POLLING_NS;
|
||||||
// bool busy = (reg >> 5) & 0b1;
|
|
||||||
return (reg >> 6) & 0b1;
|
while (true) {
|
||||||
|
// Check if PAPB interface is ready to receive data. Use the configuration register for this.
|
||||||
|
// Bit 5, see PTME ptme_001_01-0-7-r2 Table 31.
|
||||||
|
uint32_t reg = *vcBaseReg;
|
||||||
|
bool busy = (reg >> 5) & 0b1;
|
||||||
|
bool ready = (reg >> 6) & 0b1;
|
||||||
|
if (not busy) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
if (checkReadyState and not ready) {
|
||||||
|
return PAPB_BUSY;
|
||||||
|
}
|
||||||
|
|
||||||
|
busyIdx++;
|
||||||
|
if (busyIdx >= maxPollRetries) {
|
||||||
|
return PAPB_BUSY;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ignore signal handling here for now.
|
||||||
|
nanosleep(&nextDelay, &remDelay);
|
||||||
|
// Adaptive delay.
|
||||||
|
if (nextDelay.tv_nsec * 2 <= MAX_DELAY_PAPB_POLLING_NS) {
|
||||||
|
nextDelay.tv_nsec *= 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PapbVcInterface::isVcInterfaceBufferEmpty() {
|
void PapbVcInterface::isVcInterfaceBufferEmpty() {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
gpio::Levels papbEmptyState = gpio::Levels::HIGH;
|
gpio::Levels papbEmptyState = gpio::Levels::HIGH;
|
||||||
|
|
||||||
result = gpioComIF->readGpio(papbEmptyId, papbEmptyState);
|
result = gpioComIF->readGpio(papbEmptyId, papbEmptyState);
|
||||||
|
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "PapbVcInterface::isVcInterfaceBufferEmpty: Failed to read papb empty signal"
|
sif::warning << "PapbVcInterface::isVcInterfaceBufferEmpty: Failed to read papb empty signal"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (papbEmptyState == gpio::Levels::HIGH) {
|
if (papbEmptyState == gpio::Levels::HIGH) {
|
||||||
return true;
|
sif::debug << "PapbVcInterface::isVcInterfaceBufferEmpty: Buffer is empty" << std::endl;
|
||||||
|
} else {
|
||||||
|
sif::debug << "PapbVcInterface::isVcInterfaceBufferEmpty: Buffer is not empty" << std::endl;
|
||||||
}
|
}
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PapbVcInterface::isBusy() const { return not pollReadyForPacket(); }
|
bool PapbVcInterface::isBusy() const { return pollInterfaceReadiness(0, true) == PAPB_BUSY; }
|
||||||
|
|
||||||
void PapbVcInterface::cancelTransfer() { abortPacketTransfer(); }
|
void PapbVcInterface::cancelTransfer() { abortPacketTransfer(); }
|
||||||
|
|
||||||
|
@ -30,7 +30,8 @@ class PapbVcInterface : public VirtualChannelIF {
|
|||||||
* @param uioFile UIO file providing access to the PAPB bus
|
* @param uioFile UIO file providing access to the PAPB bus
|
||||||
* @param mapNum Map number of UIO map associated with this virtual channel
|
* @param mapNum Map number of UIO map associated with this virtual channel
|
||||||
*/
|
*/
|
||||||
PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbEmptyId, std::string uioFile, int mapNum);
|
PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbBusyId, gpioId_t papbEmptyId,
|
||||||
|
std::string uioFile, int mapNum);
|
||||||
virtual ~PapbVcInterface();
|
virtual ~PapbVcInterface();
|
||||||
|
|
||||||
bool isBusy() const override;
|
bool isBusy() const override;
|
||||||
@ -82,6 +83,9 @@ class PapbVcInterface : public VirtualChannelIF {
|
|||||||
static constexpr long int MAX_DELAY_PAPB_POLLING_NS = 40;
|
static constexpr long int MAX_DELAY_PAPB_POLLING_NS = 40;
|
||||||
|
|
||||||
LinuxLibgpioIF* gpioComIF = nullptr;
|
LinuxLibgpioIF* gpioComIF = nullptr;
|
||||||
|
|
||||||
|
/** Pulled to low when virtual channel not ready to receive data */
|
||||||
|
gpioId_t papbBusyId = gpio::NO_GPIO;
|
||||||
/** High when external buffer memory of virtual channel is empty */
|
/** High when external buffer memory of virtual channel is empty */
|
||||||
gpioId_t papbEmptyId = gpio::NO_GPIO;
|
gpioId_t papbEmptyId = gpio::NO_GPIO;
|
||||||
|
|
||||||
@ -116,13 +120,13 @@ class PapbVcInterface : public VirtualChannelIF {
|
|||||||
*
|
*
|
||||||
* @return returnvalue::OK when ready to receive data else PAPB_BUSY.
|
* @return returnvalue::OK when ready to receive data else PAPB_BUSY.
|
||||||
*/
|
*/
|
||||||
inline bool pollReadyForPacket() const;
|
inline ReturnValue_t pollInterfaceReadiness(uint32_t maxPollRetries, bool checkReadyState) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function can be used for debugging to check whether there are packets in
|
* @brief This function can be used for debugging to check whether there are packets in
|
||||||
* the packet buffer of the virtual channel or not.
|
* the packet buffer of the virtual channel or not.
|
||||||
*/
|
*/
|
||||||
bool isVcInterfaceBufferEmpty();
|
void isVcInterfaceBufferEmpty();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function sends a complete telemetry transfer frame data field (1105 bytes)
|
* @brief This function sends a complete telemetry transfer frame data field (1105 bytes)
|
||||||
|
@ -57,7 +57,8 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -119,7 +120,8 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -187,7 +189,8 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -255,7 +258,8 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em|cmake-build-debug-q7s|bsp_q7s|cmake-build-debug/_deps|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -418,7 +422,8 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="build-Debug-RPi/_deps/etl-src/uml|build-Debug-RPi/_deps/etl-src/test|build-Debug-RPi/_deps/etl-src/temp|build-Debug-RPi/_deps/etl-src/support|build-Debug-RPi/_deps/etl-src/subprojects|build-Debug-RPi/_deps/etl-src/scripts|build-Debug-RPi/_deps/etl-src/images|build-Debug-RPi/_deps/etl-src/examples|build-Debug-RPi/_deps/etl-src/cmake|build-Debug-RPi/_deps/etl-src/arduino|cmake-build-debug-q7s|cmake-build-debug|cmake-build-debug-q7s-em|cmake-build-release-q7s-em|bsp_hosted|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|build-Debug-RPi/_deps/etl-src/uml|build-Debug-RPi/_deps/etl-src/test|build-Debug-RPi/_deps/etl-src/temp|build-Debug-RPi/_deps/etl-src/support|build-Debug-RPi/_deps/etl-src/subprojects|build-Debug-RPi/_deps/etl-src/scripts|build-Debug-RPi/_deps/etl-src/images|build-Debug-RPi/_deps/etl-src/examples|build-Debug-RPi/_deps/etl-src/cmake|build-Debug-RPi/_deps/etl-src/arduino|cmake-build-debug-q7s|cmake-build-debug|cmake-build-debug-q7s-em|cmake-build-release-q7s-em|bsp_hosted|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -580,7 +585,8 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="build-Debug-RPi/_deps/etl-src/uml|build-Debug-RPi/_deps/etl-src/test|build-Debug-RPi/_deps/etl-src/temp|build-Debug-RPi/_deps/etl-src/support|build-Debug-RPi/_deps/etl-src/subprojects|build-Debug-RPi/_deps/etl-src/scripts|build-Debug-RPi/_deps/etl-src/images|build-Debug-RPi/_deps/etl-src/examples|build-Debug-RPi/_deps/etl-src/cmake|build-Debug-RPi/_deps/etl-src/arduino|cmake-build-debug-q7s|cmake-build-debug|cmake-build-debug-q7s-em|cmake-build-release-q7s-em|bsp_hosted|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|build-Debug-RPi/_deps/etl-src/uml|build-Debug-RPi/_deps/etl-src/test|build-Debug-RPi/_deps/etl-src/temp|build-Debug-RPi/_deps/etl-src/support|build-Debug-RPi/_deps/etl-src/subprojects|build-Debug-RPi/_deps/etl-src/scripts|build-Debug-RPi/_deps/etl-src/images|build-Debug-RPi/_deps/etl-src/examples|build-Debug-RPi/_deps/etl-src/cmake|build-Debug-RPi/_deps/etl-src/arduino|cmake-build-debug-q7s|cmake-build-debug|cmake-build-debug-q7s-em|cmake-build-release-q7s-em|bsp_hosted|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -750,7 +756,8 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|cmake-build-debug-q7s-em|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|cmake-build-debug-q7s-em|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -917,7 +924,8 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="cmake-build-debug-q7s|cmake-build-release-q7s-em|cmake-build-release-q7s/_deps/etl-src/uml|cmake-build-release-q7s/_deps/etl-src/test|cmake-build-release-q7s/_deps/etl-src/temp|cmake-build-release-q7s/_deps/etl-src/support|cmake-build-release-q7s/_deps/etl-src/subprojects|cmake-build-release-q7s/_deps/etl-src/scripts|cmake-build-release-q7s/_deps/etl-src/images|cmake-build-release-q7s/_deps/etl-src/examples|cmake-build-release-q7s/_deps/etl-src/cmake|cmake-build-release-q7s/_deps/etl-src/arduino|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|cmake-build-debug-q7s-em|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s|cmake-build-release-q7s-em|cmake-build-release-q7s/_deps/etl-src/uml|cmake-build-release-q7s/_deps/etl-src/test|cmake-build-release-q7s/_deps/etl-src/temp|cmake-build-release-q7s/_deps/etl-src/support|cmake-build-release-q7s/_deps/etl-src/subprojects|cmake-build-release-q7s/_deps/etl-src/scripts|cmake-build-release-q7s/_deps/etl-src/images|cmake-build-release-q7s/_deps/etl-src/examples|cmake-build-release-q7s/_deps/etl-src/cmake|cmake-build-release-q7s/_deps/etl-src/arduino|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|cmake-build-debug-q7s-em|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -1084,7 +1092,8 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em/_deps/etl-src|cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -1149,7 +1158,8 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em/_deps/etl-src|cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -1172,7 +1182,7 @@
|
|||||||
</extensions>
|
</extensions>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
<configuration artifactName="${ProjName}" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1171630561" name="eive-q7s-debug-em" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.enablement=null,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.image=null,org.eclipse.cdt.docker.launcher.containerbuild.property.connection=null" parent="org.eclipse.cdt.build.core.emptycfg">
|
<configuration artifactName="${ProjName}" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1171630561" name="eive-q7s-debug-em" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.enablement=null,org.eclipse.cdt.docker.launcher.containerbuild.property.dockerdpath=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.connection=unix:///var/run/docker.sock,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.image=null" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1171630561." name="/" resourcePath="">
|
<folderInfo id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689.1171630561." name="/" resourcePath="">
|
||||||
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.1640701365" name="Arm Cross GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base">
|
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.1640701365" name="Arm Cross GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base">
|
||||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.564607779" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
|
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.564607779" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
|
||||||
@ -1317,7 +1327,9 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="cmake-build-debug-q7s|cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em/_deps/etl-src|cmake-build-debug-q7s|cmake-build-release-q7s-em|build-Debug-RPi|bsp_hosted|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|cmake-build-debug|build-Debug-Host|build-Watchdog-Debug" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="cmake-build-debug-q7s-em/_deps/etl-src/include"/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
@ -1386,7 +1398,8 @@
|
|||||||
</toolChain>
|
</toolChain>
|
||||||
</folderInfo>
|
</folderInfo>
|
||||||
<sourceEntries>
|
<sourceEntries>
|
||||||
<entry excluding="cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
<entry excluding="unittest/rebootLogic|thirdparty/json|cmake-build-debug-q7s-em/_deps/etl-src|cmake-build-debug/_deps/etl-src/uml|cmake-build-debug/_deps/etl-src/test|cmake-build-debug/_deps/etl-src/temp|cmake-build-debug/_deps/etl-src/support|cmake-build-debug/_deps/etl-src/subprojects|cmake-build-debug/_deps/etl-src/scripts|cmake-build-debug/_deps/etl-src/images|cmake-build-debug/_deps/etl-src/examples|cmake-build-debug/_deps/etl-src/cmake|cmake-build-debug/_deps/etl-src/arduino|cmake-build-release-q7s-em|build-Debug-RPi|bsp_linux_board|cmake-build-debug-q7s/_deps/etl-src/uml|cmake-build-debug-q7s/_deps/etl-src/temp|cmake-build-debug-q7s/_deps/etl-src/support|cmake-build-debug-q7s/_deps/etl-src/subprojects|cmake-build-debug-q7s/_deps/etl-src/scripts|cmake-build-debug-q7s/_deps/etl-src/images|cmake-build-debug-q7s/_deps/etl-src/examples|cmake-build-debug-q7s/_deps/etl-src/cmake|cmake-build-debug-q7s/_deps/etl-src/arduino|tmtc|scripts|bsp_te0720_1cfa|thirdparty/rapidcsv/tests|thirdparty/rapidcsv/examples|thirdparty/rapidcsv/doc|thirdparty/json/third_party|thirdparty/json/test|thirdparty/json/single_include|thirdparty/json/doc|thirdparty/json/cmake|thirdparty/json/benchmarks|archive|cmake-build-release-q7s|bsp_egse|cmake-build-debug-q7s/_deps/etl-src/test|fsfwconfig" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||||
|
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="thirdparty/json/include"/>
|
||||||
</sourceEntries>
|
</sourceEntries>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
|
@ -42,7 +42,13 @@ ReturnValue_t PersistentLogTmStoreTask::performOperation(uint8_t opCode) {
|
|||||||
if (not someonesBusy) {
|
if (not someonesBusy) {
|
||||||
TaskFactory::delayTask(100);
|
TaskFactory::delayTask(100);
|
||||||
} else if (vcBusyDuringDump) {
|
} else if (vcBusyDuringDump) {
|
||||||
|
// TODO: Might not be necessary
|
||||||
|
sif::debug << "VC busy, delaying" << std::endl;
|
||||||
TaskFactory::delayTask(10);
|
TaskFactory::delayTask(10);
|
||||||
|
} else {
|
||||||
|
// TODO: Would be best to remove this, but not delaying here can lead to evil issues.
|
||||||
|
// Polling the PAPB of the PTME core too often leads to scheuduling issues.
|
||||||
|
TaskFactory::delayTask(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,13 @@ ReturnValue_t PersistentSingleTmStoreTask::performOperation(uint8_t opCode) {
|
|||||||
if (not busy) {
|
if (not busy) {
|
||||||
TaskFactory::delayTask(100);
|
TaskFactory::delayTask(100);
|
||||||
} else if (dumpContext.vcBusyDuringDump) {
|
} else if (dumpContext.vcBusyDuringDump) {
|
||||||
|
sif::debug << "VC busy, delaying" << std::endl;
|
||||||
|
// TODO: Might not be necessary
|
||||||
TaskFactory::delayTask(10);
|
TaskFactory::delayTask(10);
|
||||||
|
} else {
|
||||||
|
// TODO: Would be best to remove this, but not delaying here can lead to evil issues.
|
||||||
|
// Polling the PAPB of the PTME core too often leads to scheuduling issues.
|
||||||
|
TaskFactory::delayTask(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,9 @@ enum SystemctlCmd : uint8_t { START = 0, STOP = 1, RESTART = 2, NUM_CMDS = 3 };
|
|||||||
static constexpr char CONF_FOLDER[] = "conf";
|
static constexpr char CONF_FOLDER[] = "conf";
|
||||||
|
|
||||||
static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
||||||
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
static constexpr char LEGACY_REBOOT_WATCHDOG_FILE_NAME[] = "reboot.txt";
|
||||||
|
static constexpr char REBOOT_WATCHDOG_FILE_NAME[] = "reboot_watchdog.txt";
|
||||||
|
static constexpr char REBOOT_COUNTER_FILE_NAME[] = "reboot_counters.txt";
|
||||||
static constexpr char TIME_FILE_NAME[] = "time_backup.txt";
|
static constexpr char TIME_FILE_NAME[] = "time_backup.txt";
|
||||||
|
|
||||||
static constexpr uint32_t SYS_ROM_BASE_ADDR = 0x80000000;
|
static constexpr uint32_t SYS_ROM_BASE_ADDR = 0x80000000;
|
||||||
|
@ -11,23 +11,20 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore,
|
|||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
|
||||||
const auto& dest = destinations[idx];
|
const auto& dest = destinations[idx];
|
||||||
if (destinations.size() > 1) {
|
if ((destinations.size() > 1) and (idx < (destinations.size() - 1))) {
|
||||||
if (idx < destinations.size() - 1) {
|
// Create copy of data to ensure each TM recipient has its own copy. That way, we don't need
|
||||||
// Create copy of data to ensure each TM recipient has its own copy. That way, we don't need
|
// to bother with send order and where the data is deleted.
|
||||||
// to bother with send order and where the data is deleted.
|
store_address_t storeId;
|
||||||
store_address_t storeId;
|
result = tmStore.addData(&storeId, tmData, tmSize);
|
||||||
result = tmStore.addData(&storeId, tmData, tmSize);
|
if (result == returnvalue::OK) {
|
||||||
if (result == returnvalue::OK) {
|
message.setStorageId(storeId);
|
||||||
message.setStorageId(storeId);
|
|
||||||
} else {
|
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
|
||||||
sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy"
|
|
||||||
<< std::endl;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
message.setStorageId(origStoreId);
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
sif::error << "PusLiveDemux::handlePacket: Store too full to create data copy" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
message.setStorageId(origStoreId);
|
||||||
}
|
}
|
||||||
result = ownerQueue.sendMessage(dest.queueId, &message);
|
result = ownerQueue.sendMessage(dest.queueId, &message);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
|
2
tmtc
2
tmtc
Submodule tmtc updated: c9f4a8070d...ec0ebc3653
@ -19,116 +19,117 @@ CoreController::CoreController() {
|
|||||||
setCurrentBootCopy(xsc::CHIP_0, xsc::COPY_0);
|
setCurrentBootCopy(xsc::CHIP_0, xsc::COPY_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::performRebootFileHandling(bool recreateFile) {
|
void CoreController::performRebootWatchdogHandling(bool recreateFile) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||||
if (not std::filesystem::exists(path) or recreateFile) {
|
if (not std::filesystem::exists(path) or recreateFile) {
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
sif::info << "CoreController::performRebootFileHandling: Recreating reboot file" << std::endl;
|
sif::info << "CoreController::performRebootFileHandling: Recreating reboot file" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
rebootFile.enabled = true;
|
rebootWatchdogFile.enabled = true;
|
||||||
rebootFile.img00Cnt = 0;
|
rebootWatchdogFile.img00Cnt = 0;
|
||||||
rebootFile.img01Cnt = 0;
|
rebootWatchdogFile.img01Cnt = 0;
|
||||||
rebootFile.img10Cnt = 0;
|
rebootWatchdogFile.img10Cnt = 0;
|
||||||
rebootFile.img11Cnt = 0;
|
rebootWatchdogFile.img11Cnt = 0;
|
||||||
rebootFile.lastChip = xsc::Chip::CHIP_0;
|
rebootWatchdogFile.lastChip = xsc::Chip::CHIP_0;
|
||||||
rebootFile.lastCopy = xsc::Copy::COPY_0;
|
rebootWatchdogFile.lastCopy = xsc::Copy::COPY_0;
|
||||||
rebootFile.img00Lock = false;
|
rebootWatchdogFile.img00Lock = false;
|
||||||
rebootFile.img01Lock = false;
|
rebootWatchdogFile.img01Lock = false;
|
||||||
rebootFile.img10Lock = false;
|
rebootWatchdogFile.img10Lock = false;
|
||||||
rebootFile.img11Lock = false;
|
rebootWatchdogFile.img11Lock = false;
|
||||||
rebootFile.mechanismNextChip = xsc::Chip::NO_CHIP;
|
rebootWatchdogFile.mechanismNextChip = xsc::Chip::NO_CHIP;
|
||||||
rebootFile.mechanismNextCopy = xsc::Copy::NO_COPY;
|
rebootWatchdogFile.mechanismNextCopy = xsc::Copy::NO_COPY;
|
||||||
rebootFile.bootFlag = false;
|
rebootWatchdogFile.bootFlag = false;
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
} else {
|
} else {
|
||||||
if (not parseRebootFile(path, rebootFile)) {
|
if (not parseRebootWatchdogFile(path, rebootWatchdogFile)) {
|
||||||
performRebootFileHandling(true);
|
performRebootWatchdogHandling(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CURRENT_CHIP == xsc::CHIP_0) {
|
if (CURRENT_CHIP == xsc::CHIP_0) {
|
||||||
if (CURRENT_COPY == xsc::COPY_0) {
|
if (CURRENT_COPY == xsc::COPY_0) {
|
||||||
rebootFile.img00Cnt++;
|
rebootWatchdogFile.img00Cnt++;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img01Cnt++;
|
rebootWatchdogFile.img01Cnt++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (CURRENT_COPY == xsc::COPY_0) {
|
if (CURRENT_COPY == xsc::COPY_0) {
|
||||||
rebootFile.img10Cnt++;
|
rebootWatchdogFile.img10Cnt++;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img11Cnt++;
|
rebootWatchdogFile.img11Cnt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rebootFile.bootFlag) {
|
if (rebootWatchdogFile.bootFlag) {
|
||||||
// Trigger event to inform ground that a reboot was triggered
|
// Trigger event to inform ground that a reboot was triggered
|
||||||
uint32_t p1 = rebootFile.lastChip << 16 | rebootFile.lastCopy;
|
uint32_t p1 = rebootWatchdogFile.lastChip << 16 | rebootWatchdogFile.lastCopy;
|
||||||
uint32_t p2 = rebootFile.img00Cnt << 24 | rebootFile.img01Cnt << 16 | rebootFile.img10Cnt << 8 |
|
uint32_t p2 = rebootWatchdogFile.img00Cnt << 24 | rebootWatchdogFile.img01Cnt << 16 |
|
||||||
rebootFile.img11Cnt;
|
rebootWatchdogFile.img10Cnt << 8 | rebootWatchdogFile.img11Cnt;
|
||||||
triggerEvent(REBOOT_MECHANISM_TRIGGERED, p1, p2);
|
triggerEvent(REBOOT_MECHANISM_TRIGGERED, p1, p2);
|
||||||
// Clear the boot flag
|
// Clear the boot flag
|
||||||
rebootFile.bootFlag = false;
|
rebootWatchdogFile.bootFlag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rebootFile.mechanismNextChip != xsc::NO_CHIP and
|
if (rebootWatchdogFile.mechanismNextChip != xsc::NO_CHIP and
|
||||||
rebootFile.mechanismNextCopy != xsc::NO_COPY) {
|
rebootWatchdogFile.mechanismNextCopy != xsc::NO_COPY) {
|
||||||
if (CURRENT_CHIP != rebootFile.mechanismNextChip or
|
if (CURRENT_CHIP != rebootWatchdogFile.mechanismNextChip or
|
||||||
CURRENT_COPY != rebootFile.mechanismNextCopy) {
|
CURRENT_COPY != rebootWatchdogFile.mechanismNextCopy) {
|
||||||
std::string infoString = std::to_string(rebootFile.mechanismNextChip) + " " +
|
std::string infoString = std::to_string(rebootWatchdogFile.mechanismNextChip) + " " +
|
||||||
std::to_string(rebootFile.mechanismNextCopy);
|
std::to_string(rebootWatchdogFile.mechanismNextCopy);
|
||||||
sif::warning << "CoreController::performRebootFileHandling: Expected to be on image "
|
sif::warning << "CoreController::performRebootFileHandling: Expected to be on image "
|
||||||
<< infoString << " but currently on other image. Locking " << infoString
|
<< infoString << " but currently on other image. Locking " << infoString
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
// Firmware or other component might be corrupt and we are on another image then the target
|
// Firmware or other component might be corrupt and we are on another image then the target
|
||||||
// image specified by the mechanism. We can't really trust the target image anymore.
|
// image specified by the mechanism. We can't really trust the target image anymore.
|
||||||
// Lock it for now
|
// Lock it for now
|
||||||
if (rebootFile.mechanismNextChip == xsc::CHIP_0) {
|
if (rebootWatchdogFile.mechanismNextChip == xsc::CHIP_0) {
|
||||||
if (rebootFile.mechanismNextCopy == xsc::COPY_0) {
|
if (rebootWatchdogFile.mechanismNextCopy == xsc::COPY_0) {
|
||||||
rebootFile.img00Lock = true;
|
rebootWatchdogFile.img00Lock = true;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img01Lock = true;
|
rebootWatchdogFile.img01Lock = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (rebootFile.mechanismNextCopy == xsc::COPY_0) {
|
if (rebootWatchdogFile.mechanismNextCopy == xsc::COPY_0) {
|
||||||
rebootFile.img10Lock = true;
|
rebootWatchdogFile.img10Lock = true;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img11Lock = true;
|
rebootWatchdogFile.img11Lock = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rebootFile.lastChip = CURRENT_CHIP;
|
rebootWatchdogFile.lastChip = CURRENT_CHIP;
|
||||||
rebootFile.lastCopy = CURRENT_COPY;
|
rebootWatchdogFile.lastCopy = CURRENT_COPY;
|
||||||
// Only reboot if the reboot functionality is enabled.
|
// Only reboot if the reboot functionality is enabled.
|
||||||
// The handler will still increment the boot counts
|
// The handler will still increment the boot counts
|
||||||
if (rebootFile.enabled and (*rebootFile.relevantBootCnt >= rebootFile.maxCount)) {
|
if (rebootWatchdogFile.enabled and
|
||||||
|
(*rebootWatchdogFile.relevantBootCnt >= rebootWatchdogFile.maxCount)) {
|
||||||
// Reboot to other image
|
// Reboot to other image
|
||||||
bool doReboot = false;
|
bool doReboot = false;
|
||||||
xsc::Chip tgtChip = xsc::NO_CHIP;
|
xsc::Chip tgtChip = xsc::NO_CHIP;
|
||||||
xsc::Copy tgtCopy = xsc::NO_COPY;
|
xsc::Copy tgtCopy = xsc::NO_COPY;
|
||||||
determineAndExecuteReboot(rebootFile, doReboot, tgtChip, tgtCopy);
|
determineAndExecuteReboot(rebootWatchdogFile, doReboot, tgtChip, tgtCopy);
|
||||||
if (doReboot) {
|
if (doReboot) {
|
||||||
rebootFile.bootFlag = true;
|
rebootWatchdogFile.bootFlag = true;
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
sif::info << "Boot counter for image " << CURRENT_CHIP << " " << CURRENT_COPY
|
sif::info << "Boot counter for image " << CURRENT_CHIP << " " << CURRENT_COPY
|
||||||
<< " too high. Rebooting to " << tgtChip << " " << tgtCopy << std::endl;
|
<< " too high. Rebooting to " << tgtChip << " " << tgtCopy << std::endl;
|
||||||
#endif
|
#endif
|
||||||
rebootFile.mechanismNextChip = tgtChip;
|
rebootWatchdogFile.mechanismNextChip = tgtChip;
|
||||||
rebootFile.mechanismNextCopy = tgtCopy;
|
rebootWatchdogFile.mechanismNextCopy = tgtCopy;
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
xsc_boot_copy(static_cast<xsc_libnor_chip_t>(tgtChip),
|
xsc_boot_copy(static_cast<xsc_libnor_chip_t>(tgtChip),
|
||||||
static_cast<xsc_libnor_copy_t>(tgtCopy));
|
static_cast<xsc_libnor_copy_t>(tgtCopy));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rebootFile.mechanismNextChip = xsc::NO_CHIP;
|
rebootWatchdogFile.mechanismNextChip = xsc::NO_CHIP;
|
||||||
rebootFile.mechanismNextCopy = xsc::NO_COPY;
|
rebootWatchdogFile.mechanismNextCopy = xsc::NO_COPY;
|
||||||
}
|
}
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::determineAndExecuteReboot(RebootFile &rf, bool &needsReboot,
|
void CoreController::determineAndExecuteReboot(RebootWatchdogFile &rf, bool &needsReboot,
|
||||||
xsc::Chip &tgtChip, xsc::Copy &tgtCopy) {
|
xsc::Chip &tgtChip, xsc::Copy &tgtCopy) {
|
||||||
tgtChip = xsc::CHIP_0;
|
tgtChip = xsc::CHIP_0;
|
||||||
tgtCopy = xsc::COPY_0;
|
tgtCopy = xsc::COPY_0;
|
||||||
@ -217,7 +218,7 @@ void CoreController::determineAndExecuteReboot(RebootFile &rf, bool &needsReboot
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CoreController::parseRebootFile(std::string path, RebootFile &rf) {
|
bool CoreController::parseRebootWatchdogFile(std::string path, RebootWatchdogFile &rf) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
std::string selfMatch;
|
std::string selfMatch;
|
||||||
if (CURRENT_CHIP == xsc::CHIP_0) {
|
if (CURRENT_CHIP == xsc::CHIP_0) {
|
||||||
@ -400,34 +401,34 @@ bool CoreController::parseRebootFile(std::string path, RebootFile &rf) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
void CoreController::resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||||
// Disable the reboot file mechanism
|
// Disable the reboot file mechanism
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||||
if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) {
|
if (tgtChip == xsc::ALL_CHIP and tgtCopy == xsc::ALL_COPY) {
|
||||||
rebootFile.img00Cnt = 0;
|
rebootWatchdogFile.img00Cnt = 0;
|
||||||
rebootFile.img01Cnt = 0;
|
rebootWatchdogFile.img01Cnt = 0;
|
||||||
rebootFile.img10Cnt = 0;
|
rebootWatchdogFile.img10Cnt = 0;
|
||||||
rebootFile.img11Cnt = 0;
|
rebootWatchdogFile.img11Cnt = 0;
|
||||||
} else {
|
} else {
|
||||||
if (tgtChip == xsc::CHIP_0) {
|
if (tgtChip == xsc::CHIP_0) {
|
||||||
if (tgtCopy == xsc::COPY_0) {
|
if (tgtCopy == xsc::COPY_0) {
|
||||||
rebootFile.img00Cnt = 0;
|
rebootWatchdogFile.img00Cnt = 0;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img01Cnt = 0;
|
rebootWatchdogFile.img01Cnt = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (tgtCopy == xsc::COPY_0) {
|
if (tgtCopy == xsc::COPY_0) {
|
||||||
rebootFile.img10Cnt = 0;
|
rebootWatchdogFile.img10Cnt = 0;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img11Cnt = 0;
|
rebootWatchdogFile.img11Cnt = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::rewriteRebootFile(RebootFile file) {
|
void CoreController::rewriteRebootWatchdogFile(RebootWatchdogFile file) {
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||||
std::ofstream rebootFile(path);
|
std::ofstream rebootFile(path);
|
||||||
if (rebootFile.is_open()) {
|
if (rebootFile.is_open()) {
|
||||||
// Initiate reboot file first. Reboot handling will be on on initialization
|
// Initiate reboot file first. Reboot handling will be on on initialization
|
||||||
@ -450,15 +451,15 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
if (size < 1) {
|
if (size < 1) {
|
||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
}
|
}
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||||
// Disable the reboot file mechanism
|
// Disable the reboot file mechanism
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||||
if (data[0] == 0) {
|
if (data[0] == 0) {
|
||||||
rebootFile.enabled = false;
|
rebootWatchdogFile.enabled = false;
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
} else if (data[0] == 1) {
|
} else if (data[0] == 1) {
|
||||||
rebootFile.enabled = true;
|
rebootWatchdogFile.enabled = true;
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
} else {
|
} else {
|
||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
}
|
}
|
||||||
@ -490,11 +491,11 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
if (size < 1) {
|
if (size < 1) {
|
||||||
return HasActionsIF::INVALID_PARAMETERS;
|
return HasActionsIF::INVALID_PARAMETERS;
|
||||||
}
|
}
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||||
// Disable the reboot file mechanism
|
// Disable the reboot file mechanism
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||||
rebootFile.maxCount = data[0];
|
rebootWatchdogFile.maxCount = data[0];
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
@ -504,23 +505,23 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
void CoreController::setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy) {
|
||||||
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix(sdInfo.active) + REBOOT_WATCHDOG_FILE;
|
||||||
// Disable the reboot file mechanism
|
// Disable the reboot file mechanism
|
||||||
parseRebootFile(path, rebootFile);
|
parseRebootWatchdogFile(path, rebootWatchdogFile);
|
||||||
if (tgtChip == xsc::CHIP_0) {
|
if (tgtChip == xsc::CHIP_0) {
|
||||||
if (tgtCopy == xsc::COPY_0) {
|
if (tgtCopy == xsc::COPY_0) {
|
||||||
rebootFile.img00Lock = lock;
|
rebootWatchdogFile.img00Lock = lock;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img01Lock = lock;
|
rebootWatchdogFile.img01Lock = lock;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (tgtCopy == xsc::COPY_0) {
|
if (tgtCopy == xsc::COPY_0) {
|
||||||
rebootFile.img10Lock = lock;
|
rebootWatchdogFile.img10Lock = lock;
|
||||||
} else {
|
} else {
|
||||||
rebootFile.img11Lock = lock;
|
rebootWatchdogFile.img11Lock = lock;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rewriteRebootFile(rebootFile);
|
rewriteRebootWatchdogFile(rebootWatchdogFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreController::setCurrentBootCopy(xsc::Chip chip, xsc::Copy copy) {
|
void CoreController::setCurrentBootCopy(xsc::Chip chip, xsc::Copy copy) {
|
||||||
|
@ -14,7 +14,7 @@ enum Copy : int { COPY_0, COPY_1, NO_COPY, SELF_COPY, ALL_COPY };
|
|||||||
|
|
||||||
} // namespace xsc
|
} // namespace xsc
|
||||||
|
|
||||||
struct RebootFile {
|
struct RebootWatchdogFile {
|
||||||
static constexpr uint8_t DEFAULT_MAX_BOOT_CNT = 10;
|
static constexpr uint8_t DEFAULT_MAX_BOOT_CNT = 10;
|
||||||
|
|
||||||
bool enabled = true;
|
bool enabled = true;
|
||||||
@ -39,7 +39,7 @@ class SdCardManager;
|
|||||||
|
|
||||||
class CoreController {
|
class CoreController {
|
||||||
public:
|
public:
|
||||||
static constexpr char REBOOT_FILE[] = "/conf/reboot.txt";
|
static constexpr char REBOOT_WATCHDOG_FILE[] = "/conf/reboot.txt";
|
||||||
//! [EXPORT] : [COMMENT] The reboot mechanism was triggered.
|
//! [EXPORT] : [COMMENT] The reboot mechanism was triggered.
|
||||||
//! P1: First 16 bits: Last Chip, Last 16 bits: Last Copy,
|
//! P1: First 16 bits: Last Chip, Last 16 bits: Last Copy,
|
||||||
//! P2: Each byte is the respective reboot count for the slots
|
//! P2: Each byte is the respective reboot count for the slots
|
||||||
@ -57,13 +57,13 @@ class CoreController {
|
|||||||
static void setCurrentBootCopy(xsc::Chip chip, xsc::Copy copy);
|
static void setCurrentBootCopy(xsc::Chip chip, xsc::Copy copy);
|
||||||
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
const uint8_t* data, size_t size);
|
const uint8_t* data, size_t size);
|
||||||
void performRebootFileHandling(bool recreateFile);
|
void performRebootWatchdogHandling(bool recreateFile);
|
||||||
void determineAndExecuteReboot(RebootFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
|
void determineAndExecuteReboot(RebootWatchdogFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
|
||||||
xsc::Copy& tgtCopy);
|
xsc::Copy& tgtCopy);
|
||||||
void setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
void setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||||
void resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
void resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy);
|
||||||
bool parseRebootFile(std::string path, RebootFile& file);
|
bool parseRebootWatchdogFile(std::string path, RebootWatchdogFile& file);
|
||||||
void rewriteRebootFile(RebootFile file);
|
void rewriteRebootWatchdogFile(RebootWatchdogFile file);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct SdFsmParams {
|
struct SdFsmParams {
|
||||||
@ -74,6 +74,6 @@ class CoreController {
|
|||||||
} sdInfo;
|
} sdInfo;
|
||||||
|
|
||||||
SdCardManager* sdcMan = nullptr;
|
SdCardManager* sdcMan = nullptr;
|
||||||
RebootFile rebootFile = {};
|
RebootWatchdogFile rebootWatchdogFile = {};
|
||||||
bool doPerformRebootFileHandling = true;
|
bool doPerformRebootFileHandling = true;
|
||||||
};
|
};
|
Reference in New Issue
Block a user