-
Notifications
You must be signed in to change notification settings - Fork 1.3k
STM32: Add new STM board: Thunderpack #2723
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
STM32: Add new STM board: Thunderpack #2723
Conversation
…cuitpython/stm32f412c
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.
Thanks for this! It looks like a really interesting form factor!
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.
This looks good to me in terms of style, but I'm wondering if we can wrap this into the usual flash write API to save some of this flash waste. @tannewt do you think it'd be feasible to put NVM at the end of an existing flash sector, like the last sector of the filesystem? The internal flash write already has RAM allocated for copying and editing sectors in the internal filesystem region.
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.
Thanks for the changes! @tannewt this looks good to me for now, but pending your feedback I'd like to revisit this nvm sector location stuff as part of the internal flash fixes down the line.
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.
This looks good to me! I'm fine with a NVM refactor after this.
I'm going to merge this and will watch the CI. I think it should be fine. |
@tannewt this ended up failing every other STM32F411 board with an internal filesystem due to a bad ifdef in internal flash :C let's make sure we let the CI complete next time we add a build flag like this. |
@hierophect The CI has been passing after this was merged in: https://github.com/adafruit/circuitpython/runs/534277499 for commit 59eb35d I'm not sure why you are saying it's broken. |
@tannewt I'm confused, that's for the Commander? This one had an issue where |
@tannewt ah nevermind my mistake. It was caused by a merge issue since I needed to factor the filesystem start into each chip definition for the F7 and H7. The merge didn't duplicate the line for the #ifdef. My bad, I assumed that was causing the test failure. That said, it does say it failed the tests - but I guess that's just a git actions thing? |
Ya, GitHub Actions has been really flaky and I don't want to hold people up due to something we can't control. |
This PR makes the following STM port changes:
Note on NVM support
The smallest flash sector STM can write to is 16k. To prevent using too much RAM while writing, my implementation caps the NVM byte array size to 512 bytes. The reason I didn't use
CIRCUITPY_INTERNAL_NVM_SIZE
is that is used instm/supervisor/internal_flash.h
to calculate the overall flash layout.