Open beriberikix opened 2 years ago
This is a good idea @beriberikix , and since it involves devicetree I think a potential topic to bring up in coming Linux Plumbers Conf 2023. Do update if you have had any more insights on this topic from since when you've raised this issue.
Okay! I still think creating a custom output for lopper might be the most straightforward. I know the MicroPython folks are asking a similar question.
The idea was inspired by this talk: https://youtu.be/m8wh0pT_P-c?si=KPeCzlqY5_yIaPZ8
Note: this is currently out of scope for the GSoC season due to the time required to implement but I'm leaving this here for future contributions.
Arduino cores call each board a "variant" and place board-specific files in the
variants
folder. These files, plus specifying them in the boards.txt (see #10,) is what let's the Arduino tools know how to build, flash and generally interact with a board.In the Zephyr world, a lot of that information is encapsulated in files like a board's device tree. It is theoretically possible to use this information to partially (or fully?) autogenerate Arduino variants and boards.txt. There are many libraries out there, but for example lopper is a common Python library to manipulate DTS files.