[Bazel] Pico W crash on `cyw43_arch_init()`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c
- Domain
- build-system, embedded-iot
Research direction
Start with the Bazel multicore configuration and the Pico W wireless initialization path around cyw43_arch_init(). Reproduce the crash using the Pico SDK 2.1.0 Bazel build with multicore enabled, then compare the documented multicore and flash-safe-execute workarounds. Done means Pico W and Pico 2 W wireless examples initialize without requiring an undocumented manual flag.
Written by the indexing model from the issue text.
Description
If you're using Pico W or Pico 2 W with the Bazel build, cyw43_arch_init() will immediately crash if --@pico-sdk//bazel/config:PICO_MULTICORE_ENABLED=False is not also set.
Affected Pico SDK version: 2.1.0
Details
By default, the Bazel build enables multicore support to make the use of the additional cores easier. Unfortunately, this default behavior doesn't play well with the wireless libraries for reasons I haven't fully investigated. When multicore support is enabled, PICO_FLASH_SAFE_EXECUTE_PICO_SUPPORT_MULTICORE_LOCKOUT is also enabled, which, if I'm reading correctly requires an explicit call to flash_safe_execute_core_init() OR for one of PICO_FLASH_ASSUME_CORE0_SAFE or PICO_FLASH_ASSUME_CORE1_SAFE to be set. For reasons I'd have to re-dig up later, this all matters because cyw43_arch_init() hits the flash init path. The easiest solution to get the Pico W working with existing examples is usually to just disable multicore support, but the other mentioned workarounds may also be viable if you need both multicore support and wireless libraries.
- Dominant language
- C
- Stars
- 5k
- Forks
- 1.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/pico-sdk
-
hardware_pio
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/pico-sdk#3193 ·
-
pioasm
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
raspberrypi/pico-sdk#3189 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
raspberrypi/pico-sdk#3183 ·
-
c++
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/pico-sdk#3181 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/pico-sdk#3167 ·
All issues in raspberrypi/pico-sdk
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100