Repository navigation
fix(boards): add CYW43 defines to Pico W boards (#2014) - #2024
Merged
Merged
Conversation
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
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
14 of 17 tasks
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.
Root cause
arduino-pico's
cores/rp2040/cyw43_wrappers.cppdefinescyw43_pinMode,cyw43_digitalWriteandinit_cyw43_wifionly under#if defined(PICO_CYW43_SUPPORTED), while therpipicowvariant calls them unconditionally. The core'sboards.txtsetsrpipicow.build.extra_flags=-DPICO_CYW43_SUPPORTED=1 -DCYW43_PIN_WL_DYNAMIC=1. fbuild's bundledrpipicow.jsonwas 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(copiesbuild.extra_flagsfrom the locally installed PlatformIO platform) andci/enrich_extra_flags.py(only fills missingextra_flags). Upstreammaxgerhardt/platform-raspberrypi@developboards/rpipicow.jsonalready 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_flagscontainsPICO_CYW43_SUPPORTED:Of these, fbuild bundles only
rpipicow,rpipico2wandsparkfun_xrp_controller.rpipico2wandsparkfun_xrp_controlleralready had the defines;rpipicowwas 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_supportedasserts thatget_defines()resolvesPICO_CYW43_SUPPORTED=1andCYW43_PIN_WL_DYNAMIC=1for all three bundled CYW43 boards. It failed before the JSON change and passes after it.Validation
soldr cargo fmt --all: cleansoldr cargo clippy --workspace --all-targets -- -D warnings: passbash test -p fbuild-config: 250 passed, 1 ignoredboard = 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