Commit 518d93a6 authored by Ioannis Glaropoulos's avatar Ioannis Glaropoulos Committed by Andrzej Puzdrowski
Browse files

zephyr: Kconfig: change default for MCUBOOT_CLEANUP_ARM_CODE



Zephyr has introduced an option to perform the cleanup
of ARM core HW registers during early boot, when the
firmware is chain-loaded by MCUboot. Therefore, MCUboot
does not need to perform the same cleanup before jumping
to the application image. The patch relies on the fact
that building MCUboot with Zephyr implies loading also
a Zephyr-based application firmware. If this is not the
case, the application developer needs to enable the
MCUBOOT_CLEANUP_ARM_CODE Kconfig option manually, in the
project configuration.

Signed-off-by: default avatarIoannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
parent 6610e880
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -147,7 +147,20 @@ config BOOT_SIGNATURE_KEY_FILE
config MCUBOOT_CLEANUP_ARM_CORE
	bool "Perform core cleanup before chain-load the application"
	depends on CPU_CORTEX_M
	default y
	default y if !ARCH_SUPPORTS_ARCH_HW_INIT
	help
	  This option instructs MCUboot to perform a clean-up of a set of
	  architecture core HW registers before junping to the application
	  firmware. The clean-up sets these registers to their warm-reset
	  values as specified by the architecture.

	  By default, this option is enabled only if the architecture does
	  not have the functionality to perform such a register clean-up
	  during application firmware boot.

	  Zephyr applications on Cortex-M will perform this register clean-up
	  by default, if they are chain-loadable by MCUboot, so MCUboot does
	  not need to perform such a cleanup itself.

config MBEDTLS_CFG_FILE
	default "mcuboot-mbedtls-cfg.h"