Skip to content

Commit e8642c9

Browse files
committed
[nrf fromlist] boot: zephyr: RAM cleanup debug loop
Option to put execution in infinite loop. Meant to be used for debug. Upstream PR #: 2370 Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no> (cherry picked from commit b9274db5791c58c8e2172331c9e14594d18e7617)
1 parent f123819 commit e8642c9

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
@@ -412,6 +412,13 @@ config MCUBOOT_CLEANUP_RAM
412412
help
413413
Sets contents of memory to 0 before jumping to application.
414414

415+
config MCUBOOT_INFINITE_LOOP_AFTER_RAM_CLEANUP
416+
bool "Infinite loop after RAM cleanup"
417+
depends on MCUBOOT_CLEANUP_RAM
418+
help
419+
Verification option that keeps execution in infinite loop after
420+
RAM cleanup has been performed.
421+
415422
# Disable MBEDTLS from being selected if NRF_SECURITY is enabled, and use default NRF_SECURITY
416423
# configuration file for MBEDTLS
417424
config MBEDTLS

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)