Repository navigation
Add the Pimoroni Pico Plus 2 W, and variants for rp2 - #165
Merged
Merged
Conversation
rp2 variants of ours now work: build_mp.py generates a board directory that links upstream's board unchanged and adds the variant's mpconfigvariant.cmake, mpconfigboard.h and pins.csv, the way it already does for esp32. PIMORONI_PICO_PLUS2_W builds the Pico 2 W for the board's 16 MB flash (13 MB filesystem), 8 MB PSRAM on GP47, 48 GPIOs and its own pin names, with the RM2's PIO clock divider written out. It has an optional release cell beside the Pico 2's.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a build for the Pimoroni Pico Plus 2 W (PIM726) and makes variants of ours work on rp2.
The plain
RPI_PICO2_Wbuild runs on this board but assumes a Pico 2 W: 4 MB of flash, no PSRAM and 30 GPIOs. The new variant uses the board's 16 MB flash (13 MB filesystem), its 8 MB of PSRAM (about 8 MB of heap) and all 48 GPIOs, with pin names for them.build_mp.py. The rp2 port only accepts
BOARD_VARIANT=for anmpconfigvariant_<V>.cmakeinside upstream's board folder. For a variant of ours,build_mp.pynow generates a board directory (rp2_board_dir, passed asBOARD_DIR=, the way esp32 already does) that links upstream's board unchanged and adds the variant'smpconfigvariant.cmake,mpconfigboard.h(included after the board's, so it can#undefits name) andpins.csv(in place of the board's). Upstream's tree is not touched. Builds of upstream's variants and boards are not affected, and the esp32 path only shares the smalllink_boardhelper: the generated esp32 board directories are byte-for-byte what they were (compared for T_EMBED, LCD_7, WIFI6_DEV_KIT_H2 and a plain board).The variant (
variants/rp2/RPI_PICO2_W/PIMORONI_PICO_PLUS2_W/) sets the SDK'spimoroni_pico_plus2_w_rp2350board, 48 GPIOs, PSRAM with its chip select on GP47, a 13 MB filesystem (the image with every module is 2.9 MB, so 3 MB is left for it) and the RM2's PIO clock divider of 2, as CircuitPython sets. The radio's pins come from the SDK's board header and match CircuitPython's.pins.csvnames GP0 to GP47, the switch (USER_SW,BUTTONon GP45), the Qw/ST I2C pins (I2C_SDA,I2C_SCLon GP4 and GP5), the radio's pins and its GPIOs, and the LED.Release cell.
mp-pico-plus2-wsits besidemp-pico2and, like it, is built only with--pico2.Checked on a board. Flashed to a Pico Plus 2 W:
machine.Pin(45)Pin("LED")A 5 MB file written to the filesystem, past the old build's 4 MB flash, read back intact.
New unit tests cover the generated directory (
python3 -m unittest test_build_mp test_release_firmware).