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:
Damien George 2022-03-17 17:11:03 +11:00
parent dc91024a73
commit a92d45c3df
1 changed files with 2 additions and 2 deletions

View File

@ -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();