Skip to content
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

stm32pinout.py: some info #2

Open
fpistm opened this issue Dec 10, 2021 · 2 comments
Open

stm32pinout.py: some info #2

fpistm opened this issue Dec 10, 2021 · 2 comments

Comments

@fpistm
Copy link

fpistm commented Dec 10, 2021

Hi @matthijskooijman

I've ended up here reading one of your blog post.
Maybe you already know that but just in case, a part of the STM32 mcu db (included in STM32CubeMX) is now available on GitHub:
https://github.com/STMicroelectronics/STM32_open_pin_data

About this:

# TODO: It could be good to (also) support sorting signals by AF index.
# This requires reading from one more xml file, see
# https://community.st.com/s/question/0D53W00000JMY0USAX/how-to-extract-alternate-function-mappings-from-cubemxs-xml-database-files
# TODO: Can we do even smarter sorting of function names? So that
# related signals (e.g. I2C1_SDA and I2C_SCL) end up vertically
# adjacent? Also requires sorting pins in this script (i.e. on pin no or
# pin name), otherwise sorting afterwards breaks the alignment. Probably
# a non-trivial optimization problem, though.
# TODO: Can we also include pin structure (e.g. 5V tolerant FT, or TT,
# etc.)? Not sure if this is stored in the XML files anywhere, though...

We also use thoses db to generate some of our generic files and so several of the TODO are done in this script:
https://github.com/stm32duino/Arduino_Core_STM32/blob/main/CI/update/stm32variant.py

Which allows to generate the generic variant including the PeripheralPins.c.

Hope this was useful.
Feel free to close this issue as it is mainly to provide some information. 😉

@matthijskooijman
Copy link
Owner

@fpistm Cool, thanks for the pointers. I really like that ST is using github and is opening up development more, really cool.

@matthijskooijman
Copy link
Owner

I've updated my blogpost with some of your info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants