Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bazel] Pico W crash on cyw43_arch_init() #2139

Open
armandomontanez opened this issue Dec 15, 2024 · 0 comments
Open

[Bazel] Pico W crash on cyw43_arch_init() #2139

armandomontanez opened this issue Dec 15, 2024 · 0 comments

Comments

@armandomontanez
Copy link
Contributor

armandomontanez commented Dec 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant