Skip to content

Commit d4d359f

Browse files
committed
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]>
1 parent 6a178d2 commit d4d359f

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
@@ -364,6 +364,13 @@ config MCUBOOT_CLEANUP_RAM
364364
help
365365
Sets contents of memory to 0 before jumping to application.
366366

367+
config MCUBOOT_LOOP_AFTER_RAM_CLEANUP
368+
bool "Loop after RAM cleanup"
369+
depends on MCUBOOT_CLEANUP_RAM
370+
help
371+
Verification option that keeps execution in infinite loop after
372+
RAM cleanup has been performed.
373+
367374
config MBEDTLS_CFG_FILE
368375
# It might be awkward to define an Mbed TLS header file when TinyCrypt
369376
# 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
@@ -249,6 +249,9 @@ static void do_boot(struct boot_rsp *rsp)
249249
" b clear\n"
250250
"out:\n"
251251
" dsb\n"
252+
#if CONFIG_MCUBOOT_LOOP_AFTER_RAM_CLEANUP
253+
" b out\n"
254+
#endif /*CONFIG_MCUBOOT_LOOP_AFTER_RAM_CLEANUP */
252255
/* jump to reset vector of an app */
253256
" bx r0\n"
254257
:

0 commit comments

Comments
 (0)