Umbrella for the CYW43439 shared-bus Bluetooth work, so nothing here is untracked. Both boards are verified working on hardware: patchram loads over the shared gSPI bus, the controller reports the expected OTP-derived BD_ADDR, and a legacy LE scan returns real advertisers.
Based on the reference implementation in beriberikix/zephyr-cyw43-driver, proposed upstream as zephyrproject-rtos/zephyr#111811 (closed not_planned by the stale bot, not on merit).
State as of 2026-09-09 (rebased onto main 121489fe70)
main moved between the first PRs and now, and two things it did changed this stack:
Pull requests
This repo — stack: main → #5 → #4 → #14
| PR |
Base |
Head |
Contents |
| #5 |
main |
5f0ea1254a |
debug UDC thread stack (independent) |
| #4 |
#5 |
bb410ab164 |
Pico 2 W BLE enablement + settings partition fix |
| #14 |
#4 |
8d2023c6b5 |
Pico W BLE enablement + settings partition fix |
| #17 |
main |
74e414d323 |
README "Board overlay pitfalls" (rework of #13's second commit) |
#13 |
main |
|
closed — ranges; fix landed upstream as ffd62e1c59 |
Module forks
⚠️ No single hal_rpi_pico branch builds working firmware — both its commits must be combined (currently integration-pico2w-ble, see #12).
Build (post-rebase heads, local zephyr tree with the driver)
|
Pico 2 W |
Pico W |
| FLASH |
1,146,096 B / 1528 KB = 73.25% |
1,181,372 B / 1,564,416 B = 75.52% |
| RAM |
229,144 B / 520 KB = 43.03% |
228,044 B / 264 KB = 84.36% |
CONFIG_BT / CONFIG_BT_CYW43_SHARED_BUS |
y / y |
y / y |
check_partitions.py |
matches raspberry_pi_pico2_w |
matches raspberry_pi_pico_w |
CI verification
The reviewable PRs still cannot link — #16 — but the build is now verified green in CI for both
boards on ci/pico2w-ble-assets (94bfd47b5f), which sits on top of this stack and adds one
CI-only commit overriding zephyr/hal_rpi_pico/hal_infineon in zephyr-config/west.yml to the
fork branches. That override needs tyeth/zephyr#1 to exist, not to merge, so CI verification is
decoupled from upstream review. The branch is now 0 commits behind main (was 229) and therefore
exercises the current boards/<vendor>/<board>/ layout.
|
Pico 2 W |
Pico W |
| run |
34287512362 ✅ |
34287514167 ✅ |
| FLASH |
1,146,092 B = 73.25% |
1,181,368 B = 75.51% |
| RAM |
229,144 B = 43.03% |
228,044 B = 84.36% |
| artifact (expires 2026-12-07) |
8,852,015 B |
8,912,451 B |
CI matched the local builds to within 4 bytes of flash and exactly on RAM. The Pico W run reports
BOOT_FLASH 256 B 100.00% — a positive check that .boot2 is linked, i.e. the #6 failure mode
tested rather than inferred. This is also the first CI build of the Pico W BLE firmware; previously
only the Pico 2 W had an asset.
⚠️ Dispatching this workflow on a fork needs both --ref and -f branch= — --ref only
selects the workflow file, while the checkout uses the branch input (default main), so a
--ref-only dispatch silently builds main and yields an artifact with no Bluetooth in it.
Issues
| Issue |
State |
Summary |
| #6 |
closed |
RP2040 boards unbootable — missing ranges (fixed upstream, ffd62e1c59) |
| #7 |
closed |
Same defect in the STM32WBA overlay (fixed upstream, same commit) |
| #8 |
open |
BT_EXT_ADV defaults on port-wide, asserting a capability not all controllers have |
| #9 |
open |
start_scan(extended=) silently ignored |
| #10 |
open |
boot_out.txt stale version on incremental builds |
| #11 |
open |
tests / zephyr CI job red — cause not established; being re-evidenced post-rebase on #5's run |
| #12 |
open |
CI-only west.yml override must not merge; depends on an unreviewed branch |
| #16 |
open |
BLE branches cannot link in CI: HCI driver absent from pinned zephyr revision (also root-causes #13's missing Build CI run: stale base → no merge commit → no pull_request run). Path now verified green via the override branch — see above |
| #18 |
open |
release builds lose USB during BLE activity — the #5 UDC stack fix is debug.conf-only (verified on hardware; +unexplained post-scan stall) |
| tyeth/zephyr#3 |
open |
settings_nvs reads an uninitialized struct when a partition holds zero sectors |
| tyeth/hal_rpi_pico#3 |
open |
cybt HOST_CTRL cache makes a corruption check vacuous |
Seven defects were fixed to get here — only one was mine
| Defect |
Mine? |
Unaligned memcpy into USB DPRAM (M33 widens transfers; M0+ didn't) |
no |
UDC_RPI_PICO_STACK_SIZE 512 B under immediate logging |
no |
storage_partition 2 KB & misaligned → NVS -EDOM (now: 4 KB upstream → NVS -EINVAL, still needs two sectors) |
no |
Stale settings sectors → NVS -EDEADLK |
no |
flash_enable_write emitted to XIP, called with XIP off → silent core hang |
no |
cyw43_btbus_init(NULL) — cybt NULL-checks the handle as a sentinel |
yes |
BT_EXT_ADV on a controller lacking extended advertising |
no |
Known limits
- Extended advertising is not available on this controller and cannot be made so host-side: the CYW43439 reports the feature bit clear and rejects the commands. The in-tree
hal_infineon .hcd is not an alternative — it is the same CYW4343A2 firmware family at an older patch level (...0031 vs pico-sdk's ...0065) and built for UART transport, not the shared bus.
- The georgerobotics
cyw43-driver submodule supplies the controller patchram and is under LICENSE.RP, which permits use only alongside Raspberry Pi silicon. Fine for these boards; a blocker for upstreaming to Zephyr proper.
- Measuring anything timing-sensitive on a
debug.conf build is unsafe: LOG_MODE_IMMEDIATE formats and transmits in-thread over a 115200 UART and manufactured an apparent 12.5 s HCI stall that does not exist in release builds (first-detection latency ~9,700 ms debug vs 22 ms release).
Umbrella for the CYW43439 shared-bus Bluetooth work, so nothing here is untracked. Both boards are verified working on hardware: patchram loads over the shared gSPI bus, the controller reports the expected OTP-derived BD_ADDR, and a legacy LE scan returns real advertisers.
Based on the reference implementation in beriberikix/zephyr-cyw43-driver, proposed upstream as zephyrproject-rtos/zephyr#111811 (closed
not_plannedby the stale bot, not on merit).State as of 2026-09-09 (rebased onto
main121489fe70)mainmoved between the first PRs and now, and two things it did changed this stack:boards/<board>.overlay|conftoboards/<vendor>/<board>/board.overlay|conf(d0f27bfc97). All three branches were rebased and their board-file changes relocated.mainfixed the RP2040ranges;boot bug itself (ffd62e1c59), so zephyr-cp: restore "ranges" on RP2040 partitions, fixing unbootable images #13 was closed as redundant and zephyr-cp: RP2040 boards are unbootable — overlays drop "ranges" from the partitions node #6/zephyr-cp: stm32wba65i_dk1 overlay has the same missing "ranges" defect as the RP2040 boards #7 closed as fixed upstream. It also resized the settings partition to one aligned 4K sector and pinnednvm/circuitpyto matchports/raspberrypivia a newcheck_partitions.pyparity check. One sector is still one short for NVS (nvs_mount()needs two), so zephyr-cp: enable BLE on the Raspberry Pi Pico 2 W #4/zephyr-cp: enable BLE on the Raspberry Pi Pico W #14 now growstorageto 8K at0x17e000out of the code partition and leavecircuitpyalone — CIRCUITPY is no longer reformatted by these branches. That placement is build-tested; the hardware runs used the earlier0x181000layout.Pull requests
This repo — stack:
main→ #5 → #4 → #14main5f0ea1254abb410ab1648d2023c6b5main74e414d323#13mainranges;fix landed upstream asffd62e1c59Module forks
hal_rpi_picobranch builds working firmware — both its commits must be combined (currentlyintegration-pico2w-ble, see #12).Build (post-rebase heads, local zephyr tree with the driver)
CONFIG_BT/CONFIG_BT_CYW43_SHARED_BUScheck_partitions.pyraspberry_pi_pico2_wraspberry_pi_pico_wCI verification
The reviewable PRs still cannot link — #16 — but the build is now verified green in CI for both
boards on
ci/pico2w-ble-assets(94bfd47b5f), which sits on top of this stack and adds oneCI-only commit overriding
zephyr/hal_rpi_pico/hal_infineoninzephyr-config/west.ymlto thefork branches. That override needs tyeth/zephyr#1 to exist, not to merge, so CI verification is
decoupled from upstream review. The branch is now 0 commits behind
main(was 229) and thereforeexercises the current
boards/<vendor>/<board>/layout.CI matched the local builds to within 4 bytes of flash and exactly on RAM. The Pico W run reports
BOOT_FLASH 256 B 100.00%— a positive check that.boot2is linked, i.e. the #6 failure modetested rather than inferred. This is also the first CI build of the Pico W BLE firmware; previously
only the Pico 2 W had an asset.
--refand-f branch=—--refonlyselects the workflow file, while the checkout uses the
branchinput (defaultmain), so a--ref-only dispatch silently buildsmainand yields an artifact with no Bluetooth in it.Issues
ranges(fixed upstream,ffd62e1c59)BT_EXT_ADVdefaults on port-wide, asserting a capability not all controllers havestart_scan(extended=)silently ignoredboot_out.txtstale version on incremental buildstests / zephyrCI job red — cause not established; being re-evidenced post-rebase on #5's runwest.ymloverride must not merge; depends on an unreviewed branchpull_requestrun). Path now verified green via the override branch — see abovedebug.conf-only (verified on hardware; +unexplained post-scan stall)settings_nvsreads an uninitialized struct when a partition holds zero sectorsSeven defects were fixed to get here — only one was mine
memcpyinto USB DPRAM (M33 widens transfers; M0+ didn't)UDC_RPI_PICO_STACK_SIZE512 B under immediate loggingstorage_partition2 KB & misaligned → NVS-EDOM(now: 4 KB upstream → NVS-EINVAL, still needs two sectors)-EDEADLKflash_enable_writeemitted to XIP, called with XIP off → silent core hangcyw43_btbus_init(NULL)— cybt NULL-checks the handle as a sentinelBT_EXT_ADVon a controller lacking extended advertisingKnown limits
hal_infineon.hcdis not an alternative — it is the sameCYW4343A2firmware family at an older patch level (...0031vs pico-sdk's...0065) and built for UART transport, not the shared bus.cyw43-driversubmodule supplies the controller patchram and is underLICENSE.RP, which permits use only alongside Raspberry Pi silicon. Fine for these boards; a blocker for upstreaming to Zephyr proper.debug.confbuild is unsafe:LOG_MODE_IMMEDIATEformats and transmits in-thread over a 115200 UART and manufactured an apparent 12.5 s HCI stall that does not exist in release builds (first-detection latency ~9,700 ms debug vs 22 ms release).