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 <grzegorz.swiderski@nordicsemi.no>
This commit is contained in:
parent
7cddb2a5e5
commit
da197fe9ef
2 changed files with 5 additions and 0 deletions
|
@ -3816,6 +3816,10 @@ endfunction()
|
||||||
# alias at the beginning of a path interchangeably with the full
|
# alias at the beginning of a path interchangeably with the full
|
||||||
# path to the aliased node in these functions. The usage comments
|
# path to the aliased node in these functions. The usage comments
|
||||||
# will make this clear in each case.
|
# will make this clear in each case.
|
||||||
|
#
|
||||||
|
# - These methods are also available to sysbuild. To retrieve the DT
|
||||||
|
# information of some <image>, after its CMake configuration step,
|
||||||
|
# the dt_* function call must include a "TARGET <image>" argument.
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# dt_nodelabel(<var> NODELABEL <label> [REQUIRED] [TARGET <target>])
|
# dt_nodelabel(<var> NODELABEL <label> [REQUIRED] [TARGET <target>])
|
||||||
|
|
|
@ -523,6 +523,7 @@ function(ExternalZephyrProject_Cmake)
|
||||||
endif()
|
endif()
|
||||||
load_cache(IMAGE ${ZCMAKE_APPLICATION} BINARY_DIR ${BINARY_DIR})
|
load_cache(IMAGE ${ZCMAKE_APPLICATION} BINARY_DIR ${BINARY_DIR})
|
||||||
import_kconfig(CONFIG_ ${BINARY_DIR}/zephyr/.config TARGET ${ZCMAKE_APPLICATION})
|
import_kconfig(CONFIG_ ${BINARY_DIR}/zephyr/.config TARGET ${ZCMAKE_APPLICATION})
|
||||||
|
zephyr_dt_import(EDT_PICKLE_FILE ${BINARY_DIR}/zephyr/edt.pickle TARGET ${ZCMAKE_APPLICATION})
|
||||||
|
|
||||||
# This custom target informs CMake how the BYPRODUCTS are generated if a target
|
# This custom target informs CMake how the BYPRODUCTS are generated if a target
|
||||||
# depends directly on the BYPRODUCT instead of depending on the image target.
|
# depends directly on the BYPRODUCT instead of depending on the image target.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue