-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Added definitions for Pimoroni RP2040-based boards #4228
Conversation
Thanks and welcome! Several of your files have no trailing newline. This will cause the pre-commit checks to fail. You can turn on pre-commit locally to catch this before you push. $ pip3 install pre-commit # Just do this once.
...
$ pre-commit install # Do this once in each repo clone. You can run the
This has not yet been parameterized, and if yours are different, then we need to finish this off. Right now it's hardwired here: circuitpython/ports/raspberrypi/supervisor/internal_flash.c Lines 49 to 50 in 5d15493
We do not have an In any case the user would need to know which pins need inverted behavior, right? Or does MicroPython provide a way to specify that in a board definition? Perhaps a naming scheme would help, like |
Thanks for the reply, and mention about new lines. I thought I'd followed the other board definitions in the folder exactly, but clearly not. Just tried installing pre-commit, but the second line does not work, as in it cannot find pre-commit. Note I am developing under Ubuntu. "This has not yet been parameterized, and if yours are different". Yes, I believe both Tiny2040 and PicoSystem have more flash than the default 2MB of the Pico. Also Adafruit's own Feather RP2040 has 4MB according to the product page, but that is yet to be configured. |
Fixed the pre-commit issues with a bit of trial and error, so if my config looks okay and matches the style you're expecting, then I think this is good to turn into a proper PR. |
You should have |
So we need to provide you a way to specify a larger flash chip, I think? Or can you live with 2MB for now? Normally we specify the possible flash chips, and our initialization code knows what size they are. The RP2040 is a different because it has to execute from external flash right away. We plan to rework the way we use flash. Are you using a chip from the same family as the Pico or a different manufacturer's chip? Or to be more precise, could you list which chips you are using? |
"So we need to provide you a way to specify a larger flash chip, I think? Or can you live with 2MB for now?" "Are you using a chip from the same family as the Pico or a different manufacturer's chip?" I don't have that information sadly, but I would guess that it's a different flash chip manufacturer. |
Sounds fine. Do the current builds indeed work on all your boards? |
I've tested the Tiny2040 to the best of my ability, but don't have the other two boards to hand so will have to get colleagues to test on Monday |
I'll factor out the flash size early next week. I don't want to release anything with the 2MB setting because changing it later would require reformatting the file system. We can make the size configurable as a stop-gap before we have settings per flash sku and board. |
#4247 has the stop-gap move for flash size. I'll follow up with a better fix after we get some functionality lots of folks are asking for. |
Thanks @tannewt. I've added those definitions to our boards now. Should I expect to see Windows/Linux report a larger mass storage size than 1MB, or is that not hooked in yet? I've tried both our board firmwares and the new QTPy RP2040 and they all report 1MB free. If so, and you think everything else on this PR looks good, i'll go ahead and submit it. |
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 include (or follow up with) the flash part numbers and how they are connected. I'll need that info for my future refactoring.
Thanks Scott. Will follow up with flash codes in the near future |
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.
Thank you!
You'll want to add the boards to https://github.com/adafruit/circuitpython-org too. |
Thanks again Scott. I'll look at the website soon. Does it automatically associate the UF2 with the page? Looks like there's some magic going on under the hood |
It should just work as long as the board ids (aka folder name) match between the two repos. Releases here produce a json file that is merged into circuitpython-org with availability info. So, these boards will have a concrete release artifact with the next beta. |
Definitions are for:
I believe I have set all the files up correctly, but am creating this as a draft PR so we can check things over first.
A few questions I couldn't find answers to:
led.value = True
turns the light on, where led is aDigitalIO
object.