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 <jamie.mccrae@nordicsemi.no>
(cherry picked from commit c28768e)
  • Loading branch information
nordicjm authored and cvinayak committed Oct 20, 2023
1 parent d9ed9a6 commit 9cd1de1
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 @@ -352,3 +352,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 9cd1de1

Please sign in to comment.