Skip to content

Commit 1dbbc2e

Browse files
committed
[nrf fromtree] sysbuild: Import image devicetrees
Make the image devicetrees available to sysbuild for advanced use cases. This is done by calling `zephyr_dt_import` on each image target. The DT target properties are all expected to be prefixed with `DT_`, so there should be no conflicts. Thus, the DT contents of a given `<image>` can be retrieved using e.g.: dt_nodelabel(<var> NODELABEL <label> TARGET <image>) as noted in `extensions.cmake`. Signed-off-by: Grzegorz Swiderski <[email protected]> (cherry picked from commit da197fe)
1 parent 78c9d31 commit 1dbbc2e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cmake/modules/extensions.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3816,6 +3816,10 @@ endfunction()
38163816
# alias at the beginning of a path interchangeably with the full
38173817
# path to the aliased node in these functions. The usage comments
38183818
# will make this clear in each case.
3819+
#
3820+
# - These methods are also available to sysbuild. To retrieve the DT
3821+
# information of some <image>, after its CMake configuration step,
3822+
# the dt_* function call must include a "TARGET <image>" argument.
38193823

38203824
# Usage:
38213825
# dt_nodelabel(<var> NODELABEL <label> [REQUIRED] [TARGET <target>])

share/sysbuild/cmake/modules/sysbuild_extensions.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ function(ExternalZephyrProject_Cmake)
512512
endif()
513513
load_cache(IMAGE ${ZCMAKE_APPLICATION} BINARY_DIR ${BINARY_DIR})
514514
import_kconfig(CONFIG_ ${BINARY_DIR}/zephyr/.config TARGET ${ZCMAKE_APPLICATION})
515+
zephyr_dt_import(EDT_PICKLE_FILE ${BINARY_DIR}/zephyr/edt.pickle TARGET ${ZCMAKE_APPLICATION})
515516

516517
# This custom target informs CMake how the BYPRODUCTS are generated if a target
517518
# depends directly on the BYPRODUCT instead of depending on the image target.

0 commit comments

Comments
 (0)