Skip to content

Add the Pimoroni Pico Plus 2 W, and variants for rp2 - #165

Merged
bdbarnett merged 1 commit into
mainfrom
boards/pico-plus2w
Oct 21, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
boards/pico-plus2w

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

This adds a build for the Pimoroni Pico Plus 2 W (PIM726) and makes variants of ours work on rp2.

./build_mp.py --port rp2 --board RPI_PICO2_W --variant PIMORONI_PICO_PLUS2_W --modules all

The plain RPI_PICO2_W build 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 an mpconfigvariant_<V>.cmake inside upstream's board folder. For a variant of ours, build_mp.py now generates a board directory (rp2_board_dir, passed as BOARD_DIR=, the way esp32 already does) that links upstream's board unchanged and adds the variant's mpconfigvariant.cmake, mpconfigboard.h (included after the board's, so it can #undef its name) and pins.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 small link_board helper: 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's pimoroni_pico_plus2_w_rp2350 board, 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.csv names GP0 to GP47, the switch (USER_SW, BUTTON on GP45), the Qw/ST I2C pins (I2C_SDA, I2C_SCL on GP4 and GP5), the radio's pins and its GPIOs, and the LED.

Release cell. mp-pico-plus2-w sits beside mp-pico2 and, like it, is built only with --pico2.

Checked on a board. Flashed to a Pico Plus 2 W:

Pico 2 W build this build
Board name Raspberry Pi Pico 2 W Pimoroni Pico Plus 2 W
Heap 375,552 B 8,563,200 B
Filesystem 1,114,112 B 13,631,488 B
4 MB allocation MemoryError works
machine.Pin(45) invalid pin reads 1 (not pressed)
I2C scan on GP4/GP5 empty empty
Wi-Fi, BLE, Pin("LED") work work

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).

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.
@bdbarnett
bdbarnett merged commit 4104657 into main Oct 21, 2026
32 checks passed
@bdbarnett
bdbarnett deleted the boards/pico-plus2w branch October 21, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant