-
Notifications
You must be signed in to change notification settings - Fork 1k
STM32: Configurable bank support #4125
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
Conversation
Alright, I've implemented the configurable flash support for all STM chips I could find that have that feature in one way or another |
5cf9bda
to
cff6eb9
Compare
bender run |
|
bender run |
1 similar comment
bender run |
|
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.
Fake approval to see if that makes bender happy, don't actually merge
bender run |
7d84a6c
to
a65a129
Compare
…ust the one layout.
a65a129
to
e478bdf
Compare
Alright, this should be finished. I found there was some dual bank implementation for the F4 series. So I could rip that out. This makes the PR net negative LOC! :D The F4 & F7 series are weird with their banks and sectors, but they should work. |
bender run |
Hmmm well, I'm sure I didn't break the uart and that it's flaky somehow |
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.
Looks good to me, I've merged embassy-rs/stm32-data#596 so please update this PR with the correct ref.
033d673
to
8017d58
Compare
Alright, that should be it! |
It builds locally, but not sure how I can make the metapac work here without it being merged there since the stm32-data-generated only exists for main...
embassy-rs/stm32-data#596
To make this work, I added two features 'single-bank' and 'dual-bank'. They are optional. If a chip can't configure this, the user doesn't have to select one.
If a chip does have multiple flash options, selecting one of the features is required. There's also a cfg being set so the flash drivers knows it needs to check the configured settings.
The config system is generic,
but it's only implemented for the G4 in this PR.An alternative approach is going the same route as the dual core settings where you get a STM32* feature for single bank and one for dual bank. Let me know if that's more desirable.
closes #2309