dts: How to manually run the C preprocessor on DTS files? #66721
Unanswered
soares-sergio
asked this question in
Q&A
Replies: 1 comment
-
set(GEN_DEFINES_SCRIPT ${DT_SCRIPTS}/gen_defines.py) which is # This script uses edtlib to generate a header file from a devicetree
# (.dts) file. Information from binding files in YAML format is used
# as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks,
Context: I'm trying to learn more about DTS and how it can go from
.dts
todevicetree.h
. I'm working in a non-Zephyr codebase and I'm investigating if it would be possible to reuse Zephyr's DTS tools/bindings so we don't have to duplicate some of this code in our own codebase.To start, I'm using the
mimxrt595_evk_cm33.dts
as an example and trying to manually run the steps to convert it into a header file.cpp
command directly and providing include directories manually:It seems to run mostly fine but at the end I get multiple errors such as:
Note: I had to add
-traditional-cpp
otherwise it would fail on specific macros such as#address-cells
etc.My cpp version is
13.2.0
.Any ideas on what could be wrong? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions