-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
rp2/boards: Add Waveshare rp2040 plus #10314
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
base: master
Are you sure you want to change the base?
rp2/boards: Add Waveshare rp2040 plus #10314
Conversation
According to The Waveshare website, the RP2040 Plus is a software compatible board to the Raspberry Pi Pico that uses either a 4MB or 16MB flash chip, a USB-C connector and adds some battery recharge circuitry/connector. Since this board is supported in the pico-sdk folders, all that was needed was folders named WAVESHARE_RP2040_PLUS_4MB/_16MB in the ports/rp2/boards folder populated with updated board.json, mpconfigboard.cmake and mpconfigboard.h files. Signed-off-by: David Hunter <github@retiredwizard.com>
Update the MICROPY_HW_BOARD_NAME parameter with the correct name indicating 16MB of flash rather than 4MB. Signed-off-by: RetiredWizard <github@retiredwizard.com>
84f1e17
to
726fcf5
Compare
A BOARD_VARIANT should be used in this case, see the WEACTSTUDIO board definition. It allows one board definition ( |
@mattytrentini I started down that path first but realized that WEACTSTUDIO isn't supported in the pico-sdk. If I use that option we won't be using the resources provided in the pico-sdk. I'll go ahead and combine the two boards using that option if that's the right way to go but I was thinking it was better building on the SDK. |
Also looking at the WEACTSTUDIO download page on micropython.org, I'm not sure I understand how the nightly firmware builds are being built. Do the variant versions only get populated with releases? Which variant is being produced for the nightly builds? |
Sorry, I wasn't very clear; I meant see the WEACTSTUDIO for an example of how to do the board variants. :) So create the WAVESHARE_RP_2040 board (as you've done, but just one definition) using the pico-sdk to build but use the BOARD_VARIANT check as WEACTSTUDIO does to select the flash size.
Right now, they're not, only the default BOARD_VARIANT is built. But that should change very soon and won't affect your board definition - a small update to the autobuild files is needed. |
I was under the impression that the build directory name was what connected the build to the pico-sdk, is that not the case? How are the headers from the pico-sdk linked to board build then? |
Never mind, after looking at the WEACTSTUDIO files again, I realized the PICO_BOARD parameter can be used to define the link to the SDK. |
946494d
to
0da2439
Compare
A tab was used on one of the features line, this replaces it with 4 spaces. Signed-off-by: RetiredWizard <github@RetiredWizard.com>
Modified the ports/rp2/boards/WAVESHARE_RP2040_PLUS directory to use "make" variants to select the 4mb or 16mb flash option. This results in a single board definition for the two configurations the board can be purchased in. Signed-off-by: RetiredWizard <github@RetiredWizard.com>
Signed-off-by: RetiredWizard <github@RetiredWizard.com>
Signed-off-by: RetiredWizard <github@RetiredWizard.com>
e6d526a
to
bef4135
Compare
Remove the variant identifier from general board identifier keys. Signed-off-by: RetiredWizard <github@RetiredWizard.com>
PR #9085 actually adds these boards and several other Waveshare boards. I'm thinking it's probably easier to add the variant mode to that PR than try and merge both. This one should probably be closed. |
According to The Waveshare website, the RP2040 Plus is a software compatible board to the Raspberry Pi Pico that uses either a 4MB or 16MB flash chip, a USB-C connector and adds some battery recharge circuitry/connector. I have been using the standard downloaded Raspberry Pi Pico Micropython and Circuitpython images and other than only seeing 2MB of flash have not seen any issues.
Recently I took a look at building a Micropython image that uses the correct flash size and since it turns out that this board is supported in the pico-sdk folders all I had to do was create a folder named WAVESHARE_RP2040_PLUS_4MB in the ports/rp2/boards folder and populate it with an updated board.json, mpconfigboard.cmake and mpconfigboard.h files.
I've tested the build on my 4MB board and haven't seen any issues. I also built the 16MB image but I don't have a 16MB board to test it on. I did load it on my 4MB board and Micropython boots and I'm able to run programs if I don't use too much flash but copying larger amounts of data to the board end up crashing it which is probably to be expected 😁