Skip to content

Initial Pico/2 W Bazel support - #2049

Merged
kilograham merged 10 commits into
raspberrypi:developfrom
armandomontanez:pico_2_w_bazel_support
Nov 21, 2024
Merged

Initial Pico/2 W Bazel support#2049
kilograham merged 10 commits into
raspberrypi:developfrom
armandomontanez:pico_2_w_bazel_support

Conversation

@armandomontanez

Copy link
Copy Markdown
Contributor

Builds out initial Bazel support for Pico W wireless libraries. With these changes, it's now possible to produce working Wifi and Bluetooth applications for Pico W boards.

@kilograham kilograham added this to the 2.1.0 milestone Nov 20, 2024
@armandomontanez

Copy link
Copy Markdown
Contributor Author

Okay, marking this as ready for review since it's a pretty big step forward now. I've gotten BLE and Wifi examples working in pico-examples, I'm totally down to send out a PR for that later.

There's still a little more to go:

  • MbedTLS hasn't been hooked up/tested.
  • FreeRTOS interactions with the wireless libraries hasn't been tested.
  • Gatt header compilation works for independent gatt files. If a gatt file depends on another, there's no way to get it (yet).
  • Need to properly pin Python PIP dependencies for the gatt header creation.

@armandomontanez
armandomontanez marked this pull request as ready for review November 21, 2024 20:45

@kilograham kilograham left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

@kilograham
kilograham merged commit 338f99f into raspberrypi:develop Nov 21, 2024
@RyanDraves

RyanDraves commented Dec 14, 2024

Copy link
Copy Markdown

@armandomontanez, do you have BUILD files for the BLE & Wifi examples? I'm able to compile an example, but it's crashing on cyw43_arch_init for some unknown reason. I have these config options set:

        "--@pico-sdk//bazel/config:PICO_BT_ENABLE_BLE=True",
        "--@pico-sdk//bazel/config:PICO_BOARD=pico_w",
        "--@pico-sdk//bazel/config:PICO_BTSTACK_CONFIG=//project:btstack_config",

where btstack_config is just pulled from the examples. Is there additional configuration options that need to be set? I've found no projects on Github using this yet to reference

Happy to open an issue if that's preferred

@armandomontanez

Copy link
Copy Markdown
Contributor Author

Try setting --@pico-sdk//bazel/config:PICO_MULTICORE_ENABLED=False. I was considering flipping the default to False for this reason. Wireless works with multicore support, but IIRC you have to either 1) flip some other configuration flags or 2) be careful about your init order.

I was testing against a bunch of the examples in pico-examples, I just put up a draft PR here: raspberrypi/pico-examples#587

@armandomontanez

Copy link
Copy Markdown
Contributor Author

I filed #2139 to leave a breadcrumb.

@RyanDraves

Copy link
Copy Markdown

Thanks for the tips. I tried adding --@pico-sdk//bazel/config:PICO_MULTICORE_ENABLED=False without any luck. I was able to build and run the standalone example from your PR though; I'll go searching for the discrepancy and update here and/or the ticket when I find it

@RyanDraves

Copy link
Copy Markdown

I have it building now from my toy examples as well. My last issue was unrelated; --@pico-sdk//bazel/config:PICO_MULTICORE_ENABLED=False was the relevant fix. Thanks!

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

Successfully merging this pull request may close these issues.

3 participants