Skip to content

fix(boards): add CYW43 defines to Pico W boards (#2014) - #2024

Merged
zackees merged 1 commit into
mainfrom
fix/rpipicow-cyw43-defines-2014
Nov 16, 2026
Merged

zackees merged 1 commit into
mainfrom
fix/rpipicow-cyw43-defines-2014

Conversation

@zackees

@zackees zackees commented Nov 16, 2026

Copy link
Copy Markdown
Member

Root cause

arduino-pico's cores/rp2040/cyw43_wrappers.cpp defines cyw43_pinMode, cyw43_digitalWrite and init_cyw43_wifi only under #if defined(PICO_CYW43_SUPPORTED), while the rpipicow variant calls them unconditionally. The core's boards.txt sets rpipicow.build.extra_flags=-DPICO_CYW43_SUPPORTED=1 -DCYW43_PIN_WL_DYNAMIC=1. fbuild's bundled rpipicow.json was a stale PlatformIO snapshot that predates upstream adding those flags, so every Pico W sketch failed at link.

Generator / source

The bundled JSON comes from enrich_boards (copies build.extra_flags from the locally installed PlatformIO platform) and ci/enrich_extra_flags.py (only fills missing extra_flags). Upstream maxgerhardt/platform-raspberrypi@develop boards/rpipicow.json already carries both defines, so a regeneration from current upstream keeps them; the snapshot was simply stale. No generator change needed. The new test guards against a regeneration from an older source dropping them again.

Audit

Boards whose arduino-pico build.extra_flags contains PICO_CYW43_SUPPORTED:

  • 4.5.3 (fbuild's pinned default): pimoroni_pico_plus_2w, rpipico2w, rpipicow, sparkfun_iotredboard_rp2350, sparkfun_thingplusrp2350, sparkfun_xrp_controller, sparkfun_xrp_controller_beta
  • 5.7.0 adds: pimoroni_plasma2350w, soldered_nula_rp2350, waveshare_rp2350b_plus_w

Of these, fbuild bundles only rpipicow, rpipico2w and sparkfun_xrp_controller. rpipico2w and sparkfun_xrp_controller already had the defines; rpipicow was the only one missing them. The other boards have no bundled JSON, so there is nothing to fix for them.

Tests

board::tests_enriched_json::test_cyw43_boards_define_pico_cyw43_supported asserts that get_defines() resolves PICO_CYW43_SUPPORTED=1 and CYW43_PIN_WL_DYNAMIC=1 for all three bundled CYW43 boards. It failed before the JSON change and passes after it.

Validation

  • soldr cargo fmt --all: clean
  • soldr cargo clippy --workspace --all-targets -- -D warnings: pass
  • bash test -p fbuild-config: 250 passed, 1 ignored
  • End to end: the issue's blink sketch (board = rpipicow, board_build.core = earlephilhower) built with the rebuilt CLI and daemon now links: build succeeded in 7.7s (flash: 344912 bytes, ram: 79724 bytes).

Fixes #2014

arduino-pico only compiles cyw43_pinMode, cyw43_digitalWrite and
init_cyw43_wifi under PICO_CYW43_SUPPORTED, but the rpipicow variant
calls them unconditionally. The core's boards.txt sets
-DPICO_CYW43_SUPPORTED=1 -DCYW43_PIN_WL_DYNAMIC=1 for rpipicow;
fbuild's bundled rpipicow.json was a stale PlatformIO snapshot without
them, so every Pico W sketch failed at link.

Add the defines and a regression test covering every bundled board
whose arduino-pico build.extra_flags sets them (rpipicow, rpipico2w,
sparkfun_xrp_controller).

Fixes #2014
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@zackees
zackees added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit bc50602 Nov 16, 2026
31 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Raspberry Pi Pico W: rpipicow.json lacks the CYW43 defines, so every sketch fails at link (2.5.51)

1 participant