Updater: Write functional ram code loader
Updater RAM Code ---------------- * Ack running watchdog every 250 ms * Blink green LED every 250 ms Firmware -------- * Add RAM code loader * Reorganize initialization * Add update command to shell
This commit is contained in:
@@ -676,6 +676,22 @@ shellmatta_retCode_t shell_cmd_reset_cal(const shellmatta_handle_t handle, const
|
||||
return SHELLMATTA_OK;
|
||||
}
|
||||
|
||||
shellmatta_retCode_t shell_cmd_update(const shellmatta_handle_t handle, const char *arguments, uint32_t length)
|
||||
{
|
||||
(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();
|
||||
|
||||
return SHELLMATTA_OK;
|
||||
}
|
||||
|
||||
//typedef struct shellmatta_cmd
|
||||
//{
|
||||
// char *cmd; /**< command name */
|
||||
@@ -685,7 +701,7 @@ shellmatta_retCode_t shell_cmd_reset_cal(const shellmatta_handle_t handle, const
|
||||
// shellmatta_cmdFct_t cmdFct; /**< pointer to the cmd callack function */
|
||||
// struct shellmatta_cmd *next; /**< pointer to next command or NULL */
|
||||
//} shellmatta_cmd_t;
|
||||
static shellmatta_cmd_t cmd[19] = {
|
||||
static shellmatta_cmd_t cmd[20] = {
|
||||
{
|
||||
.cmd = "version",
|
||||
.cmdAlias = "ver",
|
||||
@@ -836,7 +852,16 @@ static shellmatta_cmd_t cmd[19] = {
|
||||
.helpText = "Reset Calibration",
|
||||
.usageText = "",
|
||||
.cmdFct = shell_cmd_reset_cal,
|
||||
.next = &cmd[19],
|
||||
},
|
||||
{
|
||||
.cmd = "update",
|
||||
.cmdAlias = NULL,
|
||||
.helpText = "Update Firmware",
|
||||
.usageText = "",
|
||||
.cmdFct = shell_cmd_update,
|
||||
.next = NULL,
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user