Skip to content

Commit c28768e

Browse files
committed
[nrf noup] zephyr: Add RAM flash configuration to cache for sysbuild
Puts the flash simulation configurtion into cache variables that can be used by other applications and CMake code to know specifics on the simulated flash details Signed-off-by: Jamie McCrae <[email protected]>
1 parent afa0d67 commit c28768e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

boot/zephyr/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,3 +352,14 @@ zephyr_library_sources(
352352
${BOOT_DIR}/zephyr/nrf_cleanup.c
353353
)
354354
endif()
355+
356+
if(SYSBUILD AND CONFIG_PCD_APP)
357+
# Sysbuild requires details of the RAM flash device are stored to the cache of MCUboot so
358+
# that they can be read when running partition manager
359+
dt_nodelabel(ram_flash_dev NODELABEL flash_sim0)
360+
dt_reg_addr(ram_flash_addr PATH ${ram_flash_dev})
361+
dt_reg_size(ram_flash_size PATH ${ram_flash_dev})
362+
363+
set(RAM_FLASH_ADDR "${ram_flash_addr}" CACHE STRING "" FORCE)
364+
set(RAM_FLASH_SIZE "${ram_flash_size}" CACHE STRING "" FORCE)
365+
endif()

0 commit comments

Comments
 (0)