mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
stm32/mboot: Always check the magic number to enter filesystem loading.
Even if MBOOT_FSLOAD is disabled, mboot should still check for 0x70ad0080 so it can immediately return to the application if this feature is not enabled. Otherwise mboot will get stuck in DFU mode. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -1539,8 +1539,8 @@ enter_bootloader:
|
||||
mboot_pack_init();
|
||||
#endif
|
||||
|
||||
#if MBOOT_FSLOAD
|
||||
if ((initial_r0 & 0xffffff80) == 0x70ad0080) {
|
||||
#if MBOOT_FSLOAD
|
||||
// Application passed through elements, validate then process them
|
||||
const uint8_t *elem_end = elem_search(ELEM_DATA_START, ELEM_TYPE_END);
|
||||
if (elem_end != NULL && elem_end[-1] == 0) {
|
||||
@@ -1553,11 +1553,11 @@ enter_bootloader:
|
||||
*status_ptr = ret;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// Always reset because the application is expecting to resume
|
||||
led_state_all(0);
|
||||
leave_bootloader();
|
||||
}
|
||||
#endif
|
||||
|
||||
dfu_init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user