Skip to content

Commit c82b710

Browse files
michalek-nonordicjm
authored andcommitted
[nrf fromtree] boot: zephyr: RAM cleanup debug loop
Option to put execution in infinite loop. Meant to be used for debug. Signed-off-by: Mateusz Michalek <[email protected]> (cherry picked from commit 5eaf190)
1 parent 62013cb commit c82b710

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

boot/zephyr/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,13 @@ config MCUBOOT_CLEANUP_RAM
371371
help
372372
Sets contents of memory to 0 before jumping to application.
373373

374+
config MCUBOOT_INFINITE_LOOP_AFTER_RAM_CLEANUP
375+
bool "Infinite loop after RAM cleanup"
376+
depends on MCUBOOT_CLEANUP_RAM
377+
help
378+
Verification option that keeps execution in infinite loop after
379+
RAM cleanup has been performed.
380+
374381
config MBEDTLS_CFG_FILE
375382
# It might be awkward to define an Mbed TLS header file when TinyCrypt
376383
# is used, but the fact is that Mbed TLS' ASN1 parse module is used

boot/zephyr/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ static void do_boot(struct boot_rsp *rsp)
294294
" b clear\n"
295295
"out:\n"
296296
" dsb\n"
297+
#if CONFIG_MCUBOOT_INFINITE_LOOP_AFTER_RAM_CLEANUP
298+
" b out\n"
299+
#endif /*CONFIG_MCUBOOT_INFINITE_LOOP_AFTER_RAM_CLEANUP */
297300
/* jump to reset vector of an app */
298301
" bx r0\n"
299302
:

0 commit comments

Comments
 (0)