v01d commented on issue #1020: URL: https://github.com/apache/incubator-nuttx/issues/1020#issuecomment-628254880
So I started to play around with devicetrees, to build a minimal proof of concept. I looked into https://github.com/dgibson/dtc again and now I realized that libfdt does not offer an API for parsing a DTS (source) but an already compiled DTB (binary). The DTS handling is only done as an intermediate step. I now understand what @xiaoxiang781216 meant before regarding the DTS only existing during compilation. Zephyr directly parses and works using the DTS file using a python library (dtlib.py). I think that using dtc to build the DTS into a DTB first and then traverse that using libfdt (in order to generate whatever NuttX needs) is reasonable. So, I'm looking into writing a small tool that would parse DTB files using libfdt and generate a set of macro definitions to be included from NuttX. Would a tool like this written in C++ be acceptable to include in NuttX? Or is using C a requirement? Using the standard library could make it much easier to implement. I could force the use of a given C++ standard version if needed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org