Skip to content

Initial Pico/2 W Bazel support #2049

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

Merged
merged 10 commits into from
Nov 21, 2024

Conversation

armandomontanez
Copy link
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
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
Copy link
Contributor

@kilograham kilograham left a comment

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
4 checks passed
@RyanDraves
Copy link

RyanDraves commented Dec 14, 2024

@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
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
Contributor Author

I filed #2139 to leave a breadcrumb.

@RyanDraves
Copy link

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

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.

None yet

3 participants