6 Commits

Author SHA1 Message Date
armandomontanez
338f99ff1c
Initial Pico/2 W Bazel support (#2049)
* Initial Pico 2 W Bazel support

Improves compatibility with Pico W and Pico 2 W by fixing issues that
prevented correct linking of wireless libraries.

* Improve correctness and configurability

* Require newer rules_python

* Require rules_python@0.36.0

* Fix missing compatibility expressions

* Minor tweaks

* Minor cleanup

* Update suggested version in Bazel README

* More README tweaks

* Improve Bazel btstack build correctness
2024-11-21 16:58:02 -06:00
armandomontanez
89691ed879
Do not assume submodule root directory in presubmit (#2040)
Tweaks compare_build_systems.py slightly so that it does not assume the
root directory of submodules, which arguably made the implementation a
little less intuitive.
2024-11-18 17:33:00 -06:00
armandomontanez
1b64cac8d6
Extend build system checks (#2039)
* Adds check that ensures the Bazel and CMake Pico SDK version strings
  stay in sync.
* Adds check that ensures the Bazel pins for external dependencies stays
  in sync with the git submodule pins.
* Updates cyw43-driver pin in Bazel.
* Makes the checks for some build configurability options non-blocking.
2024-11-13 14:11:49 -06:00
armandomontanez
07d6dc1315
[Bazel] Fix bazel build, add presubmit (#1973)
* [Bazel] Fix bazel build, add presubmit

* Fixes a missing dep in the Bazel build breaking the host build.
* Automagically finds all board headers.
* Improves presubmit script polish for GH Action readiness.
* Adds a GitHub action workflow for the Bazel build.
* Disable failing checks
* Disables Windows, as there's a mix of real build errors and
  overly-ambitious checks that don't work on Windows.
* Disables extra checks temporarily since it's currently failing.
2024-10-12 17:41:43 -05:00
graham sanderson
efe2103f9b SDK 2.0.0 release 2024-08-08 08:54:38 -05:00
armandomontanez
6ff3e4fab2
Expand bazel build to include configuration options and broader support. (#1731)
* Add host Bazel build

Updates target_compatible_with across the repo to ensure that wildcard
builds for both host and rp2040 succeed.

* Get unit tests building

* Add Python script to identify build system differences

Uses the build system tags to make it easier to identify differences
between the CMake and Bazel builds.

* Temporarily disable pico divider test

* Support PICO_BARE_METAL in Bazel

* Support PICO_NO_GC_SECTIONS in Bazel

* Support boot2 configuration in Bazel

Adds support for PICO_DEFAULT_BOOT_STAGE2 and
PICO_DEFAULT_BOOT_STAGE2_FILE in the Bazel build.

* Allowlist some CMake-only options

* Support CXX configuration options in Bazel

* Move multiple_choice_flag.bzl

* Support all pico boards

* Support linking multiple stdio implementations

Changes the Bazel build so stdio implementations are no longer mutually
exclusive.

* Add PICO_BOOT_STAGE2_LINK_IMAGE

* Support PICO_CMSIS_PATH in Bazel

* Support PICO_USE_DEFAULT_MAX_PAGE_SIZE in Bazel

* Silence PICO_CMSIS_VENDOR and PICO_CMSIS_DEVICE differences

* Support PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS in Bazel

* Properly support version defines

* Support embedding binary info in Bazel

* Embed build type in binary

* Support different linker scripts in Bazel build

* Finish out missing PICO_BUILD_DEFINE in Bazel build

* Support PICO_NO_TARGET_NAME

* Reorganize initial configuration options in Bazel

Cleans up and reorganizes some of the initial configuration options
added to the Bazel build so everything is consistent.

* Add builds for pioasm and elf2uf2

* Use Python rules from rules_python

* Actually link in output formats in pioasm tool

* Make tools have public visibility

* Add UF2 Bazel aspect

* Add TODOs for pioasm/uf2 helpers

* Fix compile flag typo

* Update Bazel SDK configuration strings to match recent CMake changes

* Fix pico_divider test

* Clean up straggling TODOs

* Clarify pico_stdio_test compatibility

* Initial Bazel Pico W support

* Add new files from develop

* Clean up compatibility expressions in Bazel build

* Clean up rp2 constraint handling in Bazel

* More Bazel docs cleanup

* Format Bazel build files

* Consolidate transitions in the Pico SDK

* Make every _allowlist_function_transition explicit

* More docs cleanup

* Add a few missing defines

* Improve PICO_CONFIG_HEADER correctness in Bazel

* Minor docs clarifications
2024-06-13 09:50:04 -05:00