-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Samd51 mm flash #6289
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
Samd51 mm flash #6289
Conversation
I removed the compiler flag and switched to using an MP_WEAK implementation, based on a suggestion from @dhalbert. I think this is ready for a review once the checks have passed. |
Hmm, check failed, but looking at it, the issue was related to getting a dependency for the fomu (there was a certificate error). Doesn't seem to have anything to do with the PR itself, just bad timing. What's the best way to get the checks run again? |
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 is great! Thanks for fixing and add the new setup mechanism.
Thanks, @dhalbert. I just rebased on latest main and pushed to rerun the checks. Hopefully everything passes and this can get merged in. |
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 thing I realized: could you move the MP_WEAK
function to supervisor/shared/external_flash/external_flash.c
? And add a declaration in supervisor/shared/external_flash/external_flash.h
? That makes it more like the other MP_WEAK
uses.
Ah, good call! I'll do just that. |
Huh, that broke the RP2040 builds. I guess I need to figure that out. |
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 working on this!
This is a fix for #5590. The Sparkfun SAMD51 MicroMod has an external flash module that requires two pins to be pulled HIGH before the module is fully enabled.
This update adds a hook that allows for
board.c
to include a methodexternal_flash_setup()
, which get called before the flash filesystem is init'ed (which happens beforeboard_init()
). It also implements this method for the Sparkfun SAMD51 MicroMod so that the flash chip works and CIRCUITPY can be set up and mounted correctly.This only works with the latest version 1.3 of this MicroMod board (the previous version 1.2 has a design flaw that prevents hardware SPI from working with the external flash chip).