Skip to content

Commit

Permalink
[nrf noup] zephyr: Add RAM flash configuration to cache for sysbuild
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Dominik Ermel <[email protected]>
(cherry picked from commit c19337f)
  • Loading branch information
nordicjm authored and jfischer-no committed Mar 7, 2024
1 parent 8e373cc commit 90a91e0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions boot/zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,14 @@ zephyr_library_sources(
${BOOT_DIR}/zephyr/nrf_cleanup.c
)
endif()

if(SYSBUILD AND CONFIG_PCD_APP)
# Sysbuild requires details of the RAM flash device are stored to the cache of MCUboot so
# that they can be read when running partition manager
dt_nodelabel(ram_flash_dev NODELABEL flash_sim0)
dt_reg_addr(ram_flash_addr PATH ${ram_flash_dev})
dt_reg_size(ram_flash_size PATH ${ram_flash_dev})

set(RAM_FLASH_ADDR "${ram_flash_addr}" CACHE STRING "" FORCE)
set(RAM_FLASH_SIZE "${ram_flash_size}" CACHE STRING "" FORCE)
endif()

0 comments on commit 90a91e0

Please sign in to comment.