-
Notifications
You must be signed in to change notification settings - Fork 149
scripts: genllheaders: add script to generate common LL headers #68
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
scripts: genllheaders: add script to generate common LL headers #68
Conversation
erwango
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm globally fine with this proposal. Thanks for this addition!
2 requests, though:
- I'd prefer headers to be moved into
stm32cube/within a "common_ll/include" folder or similar. - While available ll_usb.h are not a public api but are
Also, IIC following files are missing: _dma2d.h, _i2c.h
What should we do with |
My proposal is to make a blacklist of drivers for which api are not public, and don't generate header file for these ones. |
KozhinovAlexander
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except of some small style changes this PR looks very straight-forward and necessary to me.
erwango
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nitpick.
Last request: We'd need a way to identify the Cube package versions that were used for this generation.
It could be "direct" by logging each cube package version that was used, that would be ideal.
It too much trouble, we nca use an "indirect" method by providing the SHA1 used for generation.
scripts/genllheaders/genllheaders.py
Outdated
| if not entry.is_dir() or not entry.name.startswith("stm32"): | ||
| continue | ||
|
|
||
| family = entry.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To remain in line with usual vocabulary, please use series instead of family.
For instance: we usually refer as stm32 family and f1 series.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adjusted names
|
@erwango CubeMX is not used for the generation of these headers, the script is pointed to the |
I know I was rather referring to the Cube HAL packages versions. |
|
@erwango Ideally the update hal script should take care of that step, I agree. However, I'd do that in a second stage. I can generate a README.rst file with the version/sha taken from each series README file. Does that sound good? |
For now it'll be fine, txs! |
|
@erwango generated README only includes version, as SHA1 is not present for all series. |
|
@erwango ping |
erwango
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update README section "How to introduce a new version of stm32cube:" to mention that script should be run systematically after a new STM32Cube package version is introduced.
In a second step, this should be made part of the update script directly.
|
Approved on my side, but would like potential out of tree users to review and approve before merge |
martinjaeger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only found a small typo which is not critical.
erwango
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please generate a new batch of headers based on the latest cube versions and we're good to go.
The script is able to generate common LL headers which can be used in both Zephyr and applications to make it easier to create family independent code. Signed-off-by: Gerard Marull-Paretas <[email protected]>
Initial batch of auto-generated generic LL headers. Signed-off-by: Gerard Marull-Paretas <[email protected]>
Add a test to check that generated output is correct. Signed-off-by: Gerard Marull-Paretas <[email protected]>
Reference the newly introduced generic LL headers. Signed-off-by: Gerard Marull-Paretas <[email protected]>
|
@galak can we merge this one? |
The script is able to generate common LL headers which can be used in
both Zephyr and applications to make it easier to create family
independent code.