2024-08-08 19:02:04 +08:00
|
|
|
module(
|
|
|
|
name = "pico-sdk",
|
2024-09-11 07:49:04 +08:00
|
|
|
version = "2.0.1-develop",
|
2024-08-08 19:02:04 +08:00
|
|
|
)
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
|
2024-08-08 19:02:04 +08:00
|
|
|
bazel_dep(name = "platforms", version = "0.0.9")
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
bazel_dep(name = "bazel_skylib", version = "1.6.1")
|
2024-08-08 19:02:04 +08:00
|
|
|
bazel_dep(name = "rules_python", version = "0.22.1")
|
|
|
|
bazel_dep(name = "picotool", version = "2.0.0")
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
|
|
|
|
# Note: rules_cc is special-cased repository; a dependency on rules_cc in a
|
|
|
|
# module will not ensure that the root Bazel module has that same version of
|
|
|
|
# rules_cc. For that reason, this primarily acts as a FYI. You'll still need
|
|
|
|
# to explicitly list this dependency in your own project's MODULE.bazel file.
|
2024-06-13 22:50:04 +08:00
|
|
|
bazel_dep(name = "rules_cc", version = "0.0.9")
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
|
|
|
|
# rules_cc v0.0.10 is not yet cut, so manually pull in the desired version.
|
|
|
|
# This does not apply to dependent projects, so it needs to be copied to your
|
|
|
|
# project's MODULE.bazel too.
|
|
|
|
archive_override(
|
|
|
|
module_name = "rules_cc",
|
2024-08-08 19:02:04 +08:00
|
|
|
integrity = "sha256-zdQo/pQWKdIAPKSflBxOSWZNwCbc86T7SechKZo/3Xw=",
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
strip_prefix = "rules_cc-1acf5213b6170f1f0133e273cb85ede0e732048f",
|
2024-08-08 19:02:04 +08:00
|
|
|
urls = "https://github.com/bazelbuild/rules_cc/archive/1acf5213b6170f1f0133e273cb85ede0e732048f.tar.gz",
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
|
2024-09-11 23:34:44 +08:00
|
|
|
http_archive(
|
|
|
|
name = "arm_gcc_linux-aarch64",
|
|
|
|
build_file = "//bazel/toolchain:gcc_arm_none_eabi.BUILD",
|
|
|
|
sha256 = "8fd8b4a0a8d44ab2e195ccfbeef42223dfb3ede29d80f14dcf2183c34b8d199a",
|
|
|
|
strip_prefix = "arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-eabi",
|
|
|
|
url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz",
|
|
|
|
)
|
|
|
|
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
http_archive(
|
|
|
|
name = "arm_gcc_linux-x86_64",
|
|
|
|
build_file = "//bazel/toolchain:gcc_arm_none_eabi.BUILD",
|
|
|
|
sha256 = "6cd1bbc1d9ae57312bcd169ae283153a9572bd6a8e4eeae2fedfbc33b115fdbb",
|
2024-08-08 19:02:04 +08:00
|
|
|
strip_prefix = "arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi",
|
|
|
|
url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz",
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "arm_gcc_win-x86_64",
|
|
|
|
build_file = "//bazel/toolchain:gcc_arm_none_eabi.BUILD",
|
|
|
|
sha256 = "51d933f00578aa28016c5e3c84f94403274ea7915539f8e56c13e2196437d18f",
|
2024-08-08 19:02:04 +08:00
|
|
|
strip_prefix = "arm-gnu-toolchain-13.2.Rel1-mingw-w64-i686-arm-none-eabi",
|
|
|
|
url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip",
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "arm_gcc_mac-x86_64",
|
|
|
|
build_file = "//bazel/toolchain:gcc_arm_none_eabi.BUILD",
|
|
|
|
sha256 = "075faa4f3e8eb45e59144858202351a28706f54a6ec17eedd88c9fb9412372cc",
|
2024-08-08 19:02:04 +08:00
|
|
|
strip_prefix = "arm-gnu-toolchain-13.2.Rel1-darwin-x86_64-arm-none-eabi",
|
|
|
|
url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-x86_64-arm-none-eabi.tar.xz",
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "arm_gcc_mac-aarch64",
|
|
|
|
build_file = "//bazel/toolchain:gcc_arm_none_eabi.BUILD",
|
|
|
|
sha256 = "39c44f8af42695b7b871df42e346c09fee670ea8dfc11f17083e296ea2b0d279",
|
2024-08-08 19:02:04 +08:00
|
|
|
strip_prefix = "arm-gnu-toolchain-13.2.Rel1-darwin-arm64-arm-none-eabi",
|
|
|
|
url = "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-arm64-arm-none-eabi.tar.xz",
|
|
|
|
)
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "clang_linux-x86_64",
|
|
|
|
build_file = "//bazel/toolchain:clang.BUILD",
|
|
|
|
sha256 = "e12ee0db9226f5b4a4400c5eb2c0f757d7056181b651622b5453acb00105fd87",
|
|
|
|
type = "zip",
|
|
|
|
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/linux-amd64/+/git_revision:248c53429427034f45705af60d47f3b1090c4799",
|
|
|
|
)
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "clang_win-x86_64",
|
|
|
|
build_file = "//bazel/toolchain:clang.BUILD",
|
|
|
|
sha256 = "8c41e8b507f4dfede80842f98a716cac209f552064088fa1b7f4c64a1e547534",
|
|
|
|
type = "zip",
|
|
|
|
# Windows doesn't like `:` in the produced filename, so replace it with `%3A`.
|
|
|
|
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/windows-amd64/+/git_revision:248c53429427034f45705af60d47f3b1090c4799".replace("git_revision:", "git_revision%3A"),
|
|
|
|
)
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "clang_mac-x86_64",
|
|
|
|
build_file = "//bazel/toolchain:clang.BUILD",
|
|
|
|
sha256 = "1d92f52609d3c1e958fd56f5e9a68ab99b2042ddcc6e90a5eb5009cf7ac4897d",
|
|
|
|
type = "zip",
|
|
|
|
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/mac-amd64/+/git_revision:248c53429427034f45705af60d47f3b1090c4799",
|
|
|
|
)
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "clang_mac-aarch64",
|
|
|
|
build_file = "//bazel/toolchain:clang.BUILD",
|
|
|
|
sha256 = "53184680db7e0043a8fba1556c7644b8f5e6c8cdffa4436a92a8e8adb0f45b8d",
|
|
|
|
type = "zip",
|
|
|
|
url = "https://chrome-infra-packages.appspot.com/dl/fuchsia/third_party/clang/mac-arm64/+/git_revision:248c53429427034f45705af60d47f3b1090c4799",
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# TODO: Provide tinyusb as a proper Bazel module.
|
|
|
|
http_archive(
|
|
|
|
name = "tinyusb",
|
|
|
|
build_file = "//src/rp2_common/tinyusb:tinyusb.BUILD",
|
2024-08-08 19:02:04 +08:00
|
|
|
sha256 = "d64728aef58b80d5ce3747cad133f520da46e2b7ea3aadfda0e981aba6b658b3",
|
|
|
|
strip_prefix = "tinyusb-4232642899362fa5e9cf0dc59bad6f1f6d32c563",
|
|
|
|
url = "https://github.com/hathach/tinyusb/archive/4232642899362fa5e9cf0dc59bad6f1f6d32c563.tar.gz",
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
)
|
|
|
|
|
2024-06-13 22:50:04 +08:00
|
|
|
# TODO: Provide btstack as a proper Bazel module.
|
|
|
|
http_archive(
|
|
|
|
name = "btstack",
|
|
|
|
build_file = "//src/rp2_common/pico_btstack:btstack.BUILD",
|
2024-08-08 19:02:04 +08:00
|
|
|
sha256 = "64e86d9cf82b346e743fe1d4818b9380712b17abdb3f2c3524e92464b5ef3d19",
|
|
|
|
strip_prefix = "btstack-2b49e57bd1fae85ac32ac1f41cdb7c794de335f6",
|
|
|
|
url = "https://github.com/bluekitchen/btstack/archive/2b49e57bd1fae85ac32ac1f41cdb7c794de335f6.tar.gz",
|
2024-06-13 22:50:04 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# TODO: Provide btstack as a proper Bazel module.
|
|
|
|
http_archive(
|
|
|
|
name = "cyw43-driver",
|
|
|
|
build_file = "//src/rp2_common/pico_cyw43_driver:cyw43-driver.BUILD",
|
2024-08-08 19:02:04 +08:00
|
|
|
sha256 = "0fcc7707fef95dd562d5572604713266613a27caeeae2f10afeccee9592a53ce",
|
|
|
|
strip_prefix = "cyw43-driver-faf36381bad1f668a30172b6336c9a970966ef4c",
|
|
|
|
url = "https://github.com/georgerobotics/cyw43-driver/archive/faf36381bad1f668a30172b6336c9a970966ef4c.tar.gz",
|
2024-06-13 22:50:04 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# TODO: Provide lwip as a proper Bazel module.
|
|
|
|
http_archive(
|
|
|
|
name = "lwip",
|
|
|
|
build_file = "//src/rp2_common/pico_lwip:lwip.BUILD",
|
2024-08-08 19:02:04 +08:00
|
|
|
sha256 = "72856d557f72911cf6826ef745c23c54822df83a474557823241164a1d1361aa",
|
|
|
|
strip_prefix = "lwip-0a0452b2c39bdd91e252aef045c115f88f6ca773",
|
|
|
|
url = "https://github.com/lwip-tcpip/lwip/archive/0a0452b2c39bdd91e252aef045c115f88f6ca773.tar.gz",
|
2024-06-13 22:50:04 +08:00
|
|
|
)
|
|
|
|
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
register_toolchains(
|
2024-09-11 23:34:44 +08:00
|
|
|
"//bazel/toolchain:linux-aarch64-rp2040",
|
|
|
|
"//bazel/toolchain:linux-aarch64-rp2350",
|
2024-08-08 19:02:04 +08:00
|
|
|
"//bazel/toolchain:linux-x86_64-rp2040",
|
|
|
|
"//bazel/toolchain:linux-x86_64-rp2350",
|
|
|
|
"//bazel/toolchain:win-x86_64-rp2040",
|
|
|
|
"//bazel/toolchain:win-x86_64-rp2350",
|
|
|
|
"//bazel/toolchain:mac-x86_64-rp2040",
|
|
|
|
"//bazel/toolchain:mac-x86_64-rp2350",
|
|
|
|
"//bazel/toolchain:mac-aarch64-rp2040",
|
|
|
|
"//bazel/toolchain:mac-aarch64-rp2350",
|
|
|
|
# Require users to opt-in to the Pico SDK's toolchains.
|
|
|
|
dev_dependency = True,
|
Introduce initial Bazel build (#1705)
* Build boot_stage2 with Bazel
Introduces the initial foundations of a Bazel build, including a
toolchain, critical generated headers, platform patterns, and enough
BUILD files to build boot_stage2.
* Bazel libraries to support picotool
* Move SDK defines to toolchain
* Switch to `archive_override` in MODULE.bazel
Uses archive_override where applicable to allow transitive bzlmod deps
to propagate.
* Multiplatform objcopy selection in Bazel build
Makes an objcopy alias that redirects to the objcopy tool for the
current exec platform, which allows boot_stage2 to build on Linux,
macOS, and Windows.
* Generate Bazel build files
Adds initial set of generated Bazel build files. Note that these do not
yet build, as dependency cycles are present.
* Fix dependency cycles in Bazel build
Fixes many dependency cycles, some were unintentionally created by the
build file generator, others are true dependency cycles that require
manual workarounds.
* Silence warning in pico_stdio Bazel build
Silences a stray warning in the Bazel build.
* Fix wildcard Bazel build
This makes `bazel build //...` succeed, and also prevents the fetching
of toolchains that aren't compatible with the current execution
environment (i.e. Windows computers will no longer try to download macOS
toolchains).
* Get the SDK working
Finishes out the remainder of the work required to successfully compile
a working blinky example.
* Fix UART stdio dependencies in Bazel build
Fixes some dependencies around pico_stdlib so that pico_stdlib links
properly and UART stdio works.
* Add linux support to Bazel build
* Get Bazel deps from registry
Adds external an external registry for resolving Bazel module
dependencies.
* Fix host configuration for picotool
Provides the appropriate defines for host builds to support the picotool
build.
* Remove -ffreestanding from Bazel toolchain
The -ffreestanding toolchain flag is quite strict, so remove it from the
Bazel toolchain.
* Remove unused .bzl file
* Reduce Bazel compiler flags
Cuts out most of the Bazel toolchain flags and only specifies the
bare-minimum set of flags. Also, adds wrapper linker flags for functions
the SDK wraps.
* Get USB serial working
Adds initial TinyUSB support and enough integration to get USB serial
working.
* Remove "Generated build file"
Removes comments that indicates BUILD.bazel files are generated. This
was used during initial bringup to indicate hand-crafted vs
automatically generated BUILD.bazel files.
* Do not build USB libraries unless configured
Prevents USB libraries from being built unless the build is properly
configured to use them.
* Switch to rules_cc toolchains
Moves toolchain configuration to use the new rules in rules_cc.
* Minor cleanup in parse_version.py
Cleans up trailing whitespace and runs the black formatter on
parse_version.py.
* Simplify constraint dimensions in Bazel build
Consolidates the class/chip constraint settings to be a single
constraint_setting with a config_setting that represents the rp2 class.
* Update pin of rules_cc in Bazel build
Includes a necessary fix for the target_compatible_with expression in
the cc_toolchain to work as intended.
* Move toolchains from pico.bzl to BUILD.bazel
Moves toolchain definitions from pico.bzl to BUILD.bazel to make them
easier to find and read.
* Run buildifier on Bazel build files
Fix trivial formatting issues by running buildifier on all BUILD.bazel
files.
* Make objcopy rule
Makes a simple objcopy rule to remove direct references to the ARM
toolchains.
* Fix link flags in Bazel build
Critical flags were not being applied to link steps. This applies -mcpu
and -mthumb to the link steps to make the produced binaries work again.
* Mention missing host build support
* Fix various Bazel library rules
* pico_bit_ops was incomplete.
* pico_double and pico_float were trying to link in the "none"
implementation.
* Extend Bazel build documentation
Improves documentation and comments across the Bazel build.
* Clean up auxilary tools in Bazel build
Switches genrules to use skylib rules to simplify things. Reworks
version header generation to use the Bazel module version rather than
parsing CMake.
* Update boot_stage2 Bazel build file
Moves `includes` to be enumerated on the correct library.
* Add WORKSPACE version fallback
WORKSPACE Bazel projects don't support querying module version, so add a
fallback of '0.0.1-WORKSPACE' so the build can succeed.
* Fix malloc handling in Bazel build
* Fix Bazel dependency cycle in pico_malloc
* Prevent malloc from being linked into boot_stage2
Prevents Bazel from ever trying to link malloc into the boot_stage2
binary.
* Remove custom bootloader platform
A dedicated boot_stage2 platform introduces a lot of complexity that
needs to be more thought-through.
2024-06-05 07:50:32 +08:00
|
|
|
)
|