Skip to content

Conversation

57300
Copy link
Contributor

@57300 57300 commented May 22, 2025

manifest-pr-skip

57300 added 5 commits May 26, 2025 17:47
…t name in dts.cmake"

This reverts commit 61d3a82.

Signed-off-by: Grzegorz Swiderski <[email protected]>
Extract the part of `dts.cmake` that invokes `gen_dts_cmake.py`, then
generalize it into a CMake extension, which can be reused by sysbuild.

The Python script itself is also updated, so that the generated CMake
file can accept an input variable DEVICETREE_TARGET, which comes from
the `zephyr_dt_import(TARGET ...)` argument.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 468db18)
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 <[email protected]>
(cherry picked from commit 7cddb2a)
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)
@57300 57300 force-pushed the sysbuild-dt-migrate branch from 6bf0fa0 to 1dbbc2e Compare May 26, 2025 15:47
Copy link

@hakonfam hakonfam self-requested a review May 27, 2025 06:26
@nordicjm nordicjm merged commit f1626fa into nrfconnect:main May 27, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants