-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Python replacement for DTC [DNM/WIP] #5615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5615 +/- ##
=======================================
Coverage 51.29% 51.29%
=======================================
Files 440 440
Lines 42232 42232
Branches 8055 8055
=======================================
Hits 21665 21665
Misses 20048 20048
Partials 519 519 Continue to review full report at Codecov.
|
Please add:
around the |
…ile() Signed-off-by: Leandro Pereira <[email protected]>
When parsing pre-processed .dts files, some nodes appear twice in the file, causing some nodes to not appear in the parsed data. Update the nodes recursively. Signed-off-by: Leandro Pereira <[email protected]>
It was not being used by any script, and parse_node() was setting it to the `type` variable, which contains the type `type` from Python. Signed-off-by: Leandro Pereira <[email protected]>
DTS files may be preprocessed by the C preprocessor in order to build nodes selectively based on configuration. When CPP touches a file, it leaves some directives that may be used by a compiler for errors and such; just ignore these lines as we're not going to need them. Signed-off-by: Leandro Pereira <[email protected]>
Some files contain lines such as "chosen { };", which were not being correctly parsed. Signed-off-by: Leandro Pereira <[email protected]>
DTS syntax allows for the following: some-node { property-name; } And the devicetree.py was converting property-name to a boolean property with value 1. In order to dump the DTS file, store `{empty: True}` instead. Signed-off-by: Leandro Pereira <[email protected]>
This script parses a .dts file preprocessed by a C preprocessor and dumps it as a .dts. It's simlar to what the dtc compiler does, but without requiring a host dtc binary (which might not be available on all platforms Zephyr supports). Signed-off-by: Leandro Pereira <[email protected]>
Signed-off-by: Sebastian Boe <[email protected]>
Signed-off-by: Sebastian Boe <[email protected]>
With 96b_nitrogen on hello world I was observing a key error. This patch resolves the key error. With DTC interrupt-parent would always be set to a phandle, but with flatten.py it is set to the name of the peripheral instead. e.g. interrupt-parent = "/soc/interrupt-controller@e000e100"; vs interrupt-parent = <0x1>; I don't know how all this works, so they may very well be a cleaner solution here. Signed-off-by: Sebastian Boe <[email protected]>
Signed-off-by: Sebastian Boe <[email protected]>
Signed-off-by: Sebastian Boe <[email protected]>
Signed-off-by: Anas Nashif <[email protected]>
With DTC now being handled with Python, there's no need to look for it on Windows at all. Later we might even remove the requirement on UNIX platforms. Signed-off-by: Carles Cufi <[email protected]>
98f1f64
to
54c4e9b
Compare
This is not required for v1.11 since we have all pieces we need now to build natively on Windows, including |
not needed anymore |
just for sharing here, still need to resolve some of the issues with a few boards and fix the last commit to be less hackish