Skip to content

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

Open
@armandomontanez

Description

@armandomontanez

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions