Added OBSW Watchdog #67

Merged
meierj merged 20 commits from mueller/added-watchdog into develop 2021-07-31 08:51:56 +02:00
3 changed files with 15 additions and 12 deletions
Showing only changes of commit 1a4f907925 - Show all commits

View File

@ -318,7 +318,7 @@ wget https://eive-cloud.irs.uni-stuttgart.de/index.php/s/rfoaistRd67yBbH/downloa
or the following command for Linux (could be useful for CI/CD) or the following command for Linux (could be useful for CI/CD)
```sh ```sh
wget https://eive-cloud.irs.uni-stuttgart.de/index.php/s/2Fp2ag6NGnbtAsK/download/gcc-arm-linux-gnueabi.tar.gz wget https://eive-cloud.irs.uni-stuttgart.de/index.php/s/MRaeA2XnMXpZ5Pp/download/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
``` ```
## Installing CMake and MSYS2 on Windows ## Installing CMake and MSYS2 on Windows

View File

@ -20,6 +20,18 @@ CoreController::Copy CoreController::currentCopy = Copy::NO_COPY;
CoreController::CoreController(object_id_t objectId): CoreController::CoreController(object_id_t objectId):
ExtendedControllerBase(objectId, objects::NO_OBJECT, 5) { ExtendedControllerBase(objectId, objects::NO_OBJECT, 5) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
try {
result = sdCardInit();
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "CoreController::CoreController: SD card init failed" << std::endl;
}
}
catch(const std::filesystem::filesystem_error& e) {
sif::error << "CoreController::CoreController: sdCardInit failed with exception " <<
e.what() << std::endl;
}
initBootCopy(); initBootCopy();
} }
@ -41,16 +53,6 @@ LocalPoolDataSetBase* CoreController::getDataSetHandle(sid_t sid) {
ReturnValue_t CoreController::initialize() { ReturnValue_t CoreController::initialize() {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
try {
result = sdCardInit();
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "CoreController::initialize: SD card init failed" << std::endl;
}
}
catch(const std::filesystem::filesystem_error& e) {
sif::error << "CoreController::initialize: sdCardInit failed with exception " << e.what()
<< std::endl;
}
result = scratch::writeNumber(scratch::ALLOC_FAILURE_COUNT, 0); result = scratch::writeNumber(scratch::ALLOC_FAILURE_COUNT, 0);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
@ -374,6 +376,7 @@ ReturnValue_t CoreController::actionListDirectoryIntoFile(ActionId_t actionId,
} }
ReturnValue_t CoreController::initBootCopy() { ReturnValue_t CoreController::initBootCopy() {
// We could create this file even before the OBSW is started..
std::string fileName = "/tmp/curr_copy.txt"; std::string fileName = "/tmp/curr_copy.txt";
std::string cmd = "xsc_boot_copy > " + fileName; std::string cmd = "xsc_boot_copy > " + fileName;
int result = std::system(cmd.c_str()); int result = std::system(cmd.c_str());

View File

@ -62,7 +62,7 @@ private:
SdCardManager::SdStatusPair& statusPair); SdCardManager::SdStatusPair& statusPair);
ReturnValue_t initVersionFile(); ReturnValue_t initVersionFile();
ReturnValue_t initBootCopy(); static ReturnValue_t initBootCopy();
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);