From 7cddb2a5e5704c05b51bfe7d64e86367b9b03fd9 Mon Sep 17 00:00:00 2001 From: Grzegorz Swiderski Date: Tue, 20 May 2025 16:41:02 +0200 Subject: [PATCH] cmake: extensions: Add TARGET arguments to the dt_* API The CMake dt_* API is backed by target properties. By default, it uses the target named `devicetree_target` that is initialized in `dts.cmake`. We should be able to customize this, now that we have a function for loading those properties into a different target. For example: zephyr_dt_import(EDT_PICKLE_FILE /path/to/edt.pickle TARGET target) dt_nodelabel(node NODELABEL label TARGET target) This would make it possible to reference multiple devicetrees in the same build system, particularly sysbuild. Signed-off-by: Grzegorz Swiderski --- cmake/modules/extensions.cmake | 180 +++++++++++++++++++++------------ 1 file changed, 115 insertions(+), 65 deletions(-) diff --git a/cmake/modules/extensions.cmake b/cmake/modules/extensions.cmake index e015b1182e8..ce95a2413ef 100644 --- a/cmake/modules/extensions.cmake +++ b/cmake/modules/extensions.cmake @@ -3818,7 +3818,7 @@ endfunction() # will make this clear in each case. # Usage: -# dt_nodelabel( NODELABEL