Repository navigation
Commit 036ffe9
zephyr-cp: enable BLE on the Raspberry Pi Pico W
Same CYW43439 as the Pico 2 W, and the shared-bus HCI driver needed no
board-specific work, so this is the Pico 2 W change applied to the RP2040
board:
- overlay: hang the infineon,cyw43-bt-hci node off the stock
infineon,airoc-wifi node and point zephyr,bt-hci at it.
- overlay: the settings partition had the same defect as the Pico 2 W's --
originally 2K at 0x180800, neither erase-sector aligned nor big enough
for one of the RP2040's 4K sectors; main has since made it one aligned
4K sector at 0x17f000, which is still one short of the two nvs_mount()
insists on, so bt_enable() fails before opening the HCI driver. Give
settings two sectors at 0x17e000, taken from the code partition. nvm
and circuitpy stay at 0x180000 and 0x181000 to match ports/raspberrypi
(cptools/check_partitions.py checks this), so CIRCUITPY is not moved.
- conf: BT_EXT_ADV=n, since this controller rejects the Bluetooth 5
extended advertising commands, plus a deeper system workqueue stack.
HW_STACK_PROTECTION is deliberately left off here: it earned its place on
the Cortex-M33 but costs RAM, and this is the constrained board.
Builds at 68.67% flash and 84.32% RAM of 264K, so BLE fits with about 42K
to spare.
Verified on hardware after the "ranges" fix (now on main): the adapter
comes up as WiFi MAC + 2 and a legacy LE scan returns nearby advertisers.
That run used the earlier layout with settings at 0x181000; the 0x17e000
placement is build-tested only.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent f675fb7 commit 036ffe9
3 files changed
Lines changed: 65 additions & 1 deletion
File tree
- ports/zephyr-cp/boards/raspberrypi/rpi_pico_w_zephyr
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
3 | 58 | | |
0 commit comments