Documentation for MICROPY_* macros #18585
Replies: 2 comments 3 replies
-
|
I think this is useful and should be part of the build/modify documentation. The main documentation could have a summary of what these macros can be used for and include a reference link to this index. The grouping of macros helps a lot. Thanks |
Beta Was this translation helpful? Give feedback.
-
|
A few months ago I actually parsed the codebase for these and built a kconfig frontend to view/configure the build using them. I got quite an effective description for most of them, though I went through a few rounds of broad code exploration to try to get a more complete picture of what the configs did. There were a few aspects of the build system I didn't get working back then but that was a couple of llm generations ago so it would probably be much easier to get cleaned up now! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
One of the things that I find hard to understand is how the various MICROPY_ macros can be used to adjust the capabilities included in the firmware for a particular board or build. More so as I have not been able to find documentation, other than the occasional comment in source.
There is a rather strict naming convention, that does give some context, but also assumes a familiarity with the code base.
In total there are nearly 1_800 unique MICROPY_macros defined and used in the code base and for only 282 of them there is a comment line preceding ( comment number may be off , based on a rather simplistic regex scan)
As there are a lot of macros that may benefit from some level of documentation.
what I normally do is to search for occurrences, scan for comments and try to read the code to glean the intent from that.
This is something where LLM models scale better than humans.
I have built a simple tool to
the result looks promising : https://gist.github.com/Josverl/9def801af4a80a79de9ae19876efb22f#file-micropy_macros-md
And
maywill need some manual cleanupnow my questions are :
Beta Was this translation helpful? Give feedback.
All reactions