diff --git a/stm-firmware/include/reflow-controller/updater/updater.h b/stm-firmware/include/reflow-controller/updater/updater.h index c97e0f4..9a72a32 100644 --- a/stm-firmware/include/reflow-controller/updater/updater.h +++ b/stm-firmware/include/reflow-controller/updater/updater.h @@ -33,6 +33,6 @@ */ void __attribute__((noreturn)) start_updater_ram_code(void); -void __attribute__((noreturn)) start_updater(void); +void __attribute__((noreturn)) updater_update_from_file(const char *filename); #endif /* __UPDATER_UPDATER_H__ */ diff --git a/stm-firmware/shell.c b/stm-firmware/shell.c index 6a506d3..7ab07c7 100644 --- a/stm-firmware/shell.c +++ b/stm-firmware/shell.c @@ -633,7 +633,7 @@ shellmatta_retCode_t shell_cmd_update(const shellmatta_handle_t handle, const ch (void)arguments; (void)length; - start_updater(); + updater_update_from_file("update.hex"); return SHELLMATTA_OK; } diff --git a/stm-firmware/updater/updater.c b/stm-firmware/updater/updater.c index 7af012f..3b534bc 100644 --- a/stm-firmware/updater/updater.c +++ b/stm-firmware/updater/updater.c @@ -59,7 +59,7 @@ void __attribute__((noreturn)) start_updater_ram_code(void) while(1); } -void __attribute__((noreturn)) start_updater(void) +void __attribute__((noreturn)) updater_update_from_file(const char *filename) { struct safety_memory_boot_status status; @@ -67,6 +67,8 @@ void __attribute__((noreturn)) start_updater(void) status.reboot_to_bootloader = 0xFFFFFFFFUL; safety_memory_set_boot_status(&status); + safety_memory_set_update_filename(filename); + NVIC_SystemReset(); while (1); }