Skip to content

[nrf fromtree] boot: zephyr: RAM cleanup debug loop #460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions boot/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,13 @@ config MCUBOOT_CLEANUP_RAM
help
Sets contents of memory to 0 before jumping to application.

config MCUBOOT_INFINITE_LOOP_AFTER_RAM_CLEANUP
bool "Infinite loop after RAM cleanup"
depends on MCUBOOT_CLEANUP_RAM
help
Verification option that keeps execution in infinite loop after
RAM cleanup has been performed.

# Disable MBEDTLS from being selected if NRF_SECURITY is enabled, and use default NRF_SECURITY
# configuration file for MBEDTLS
config MBEDTLS
Expand Down
3 changes: 3 additions & 0 deletions boot/zephyr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ static void do_boot(struct boot_rsp *rsp)
" b clear\n"
"out:\n"
" dsb\n"
#if CONFIG_MCUBOOT_INFINITE_LOOP_AFTER_RAM_CLEANUP
" b out\n"
#endif /*CONFIG_MCUBOOT_INFINITE_LOOP_AFTER_RAM_CLEANUP */
/* jump to reset vector of an app */
" bx r0\n"
:
Expand Down