Updater: Add safety memory to updater

This commit is contained in:
2021-04-06 20:55:41 +02:00
parent 08eee66d30
commit 6e5627fde2
9 changed files with 86 additions and 22 deletions

View File

@@ -42,6 +42,7 @@
#include <reflow-controller/safety/safety-memory.h>
#include <reflow-controller/hw-version-detect.h>
#include <reflow-controller/temp-profile-executer.h>
#include <reflow-controller/updater/updater.h>
#ifndef GIT_VER
#define GIT_VER "VERSION NOT SET"
@@ -631,13 +632,8 @@ shellmatta_retCode_t shell_cmd_update(const shellmatta_handle_t handle, const ch
(void)handle;
(void)arguments;
(void)length;
struct safety_memory_boot_status status;
safety_memory_get_boot_status(&status);
status.reboot_to_bootloader = 0xFFFFFFFFUL;
safety_memory_set_boot_status(&status);
NVIC_SystemReset();
start_updater();
return SHELLMATTA_OK;
}
@@ -924,8 +920,8 @@ static shellmatta_cmd_t cmd[21] = {
{
.cmd = "update",
.cmdAlias = NULL,
.helpText = "Update Firmware",
.usageText = "",
.helpText = "Update Firmware. The updater searches for a file called update.hex",
.usageText = "update",
.cmdFct = shell_cmd_update,
.next = &cmd[19],