zephyr/scripts/dts
Grzegorz Swiderski 468db18389 cmake: modules: Add zephyr_dt_import
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 <grzegorz.swiderski@nordicsemi.no>
2025-05-22 13:44:18 +02:00
..
python-devicetree dtlib: add test for lineno/filename comments 2025-05-16 09:38:35 +02:00
edtlib_logger.py scripts: dts: extract pickled EDT generation 2024-09-25 13:46:32 -05:00
gen_defines.py scripts: dts: gen_defines: Add support for fixed-subpartitions 2025-04-30 18:44:06 +02:00
gen_driver_kconfig_dts.py scripts: dts: Refactor gen_driver_kconfig_dts 2025-01-19 07:57:57 +01:00
gen_dts_cmake.py cmake: modules: Add zephyr_dt_import 2025-05-22 13:44:18 +02:00
gen_edt.py gen_edt: use workspace dir as base for relative paths in comments 2025-05-16 09:38:35 +02:00
README.txt dts: separate DT libraries from gen_defines.py 2021-04-02 08:28:12 -05:00

This directory used to contain the edtlib.py and dtlib.py libraries
and tests, alongside the gen_defines.py script that uses them for
converting DTS to the C macros used by Zephyr.

The libraries and tests have now been moved to the 'python-devicetree'
subdirectory.

We are now in the process of extracting edtlib and dtlib into a
standalone source code library that we intend to share with other
projects.

Links related to the work making this standalone:

    https://pypi.org/project/devicetree/
    https://python-devicetree.readthedocs.io/en/latest/
    https://github.com/zephyrproject-rtos/python-devicetree

The 'python-devicetree' subdirectory you find here next to this
README.txt matches the standalone python-devicetree repository linked
above.

For now, the 'main' copy will continue to be hosted here in the zephyr
repository. We will mirror changes into the standalone repository as
needed; you can just ignore it for now.

Code in the zephyr repository which needs these libraries will import
devicetree.edtlib from now on, but the code will continue to be found
by manipulating sys.path for now.

Eventually, as APIs stabilize, the python-devicetree code in this
repository will disappear, and a standalone repository will be the
'main' one.