Skip to content

Commit 9a60557

Browse files
ahasztagtomchy
authored andcommitted
bootloader: Fix NSIB on nrf54l15dk/nrf54l15/cpuapp/ns
This commit fixes the device not booting on nrf54l15dk/nrf54l15/cpuapp/ns target when NSIB is used. The issue was being a result of the SRAM used by B0 not being properly placed (at sram_nonsecure, while it should be at sram_secure). This resulted in KMU hardware errors. Signed-off-by: Artur Hadasz <[email protected]>
1 parent 2ab0a19 commit 9a60557

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

subsys/partition_manager/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ if(CONFIG_TRUSTED_EXECUTION_NONSECURE OR CONFIG_TRUSTED_EXECUTION_SECURE)
104104
if(CONFIG_BOOTLOADER_MCUBOOT)
105105
ncs_add_partition_manager_config(pm.yml.mcuboot)
106106
endif()
107+
108+
if(CONFIG_SOC_SERIES_NRF54LX)
109+
# If building with secure boot enabled (with or without MCUboot),
110+
# place B0 SRAM inside sram_secure region.
111+
# - CONFIG_SECURE_BOOT is set only if B0 updates the main application.
112+
# - CONFIG_MCUBOOT_MCUBOOT_IMAGE_NUMBER is set only if B0 updates MCUboot.
113+
if(CONFIG_SECURE_BOOT OR (NOT CONFIG_MCUBOOT_MCUBOOT_IMAGE_NUMBER EQUAL -1))
114+
ncs_add_partition_manager_config(pm.yml.b0)
115+
endif()
116+
endif()
107117
endif()
108118

109119
if(CONFIG_MEMFAULT_NCS_INTERNAL_FLASH_BACKED_COREDUMP)

subsys/partition_manager/pm.yml.b0

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#include <zephyr/autoconf.h>
2+
3+
b0_sram:
4+
span: sram_secure

0 commit comments

Comments
 (0)