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
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
# This constraint represents the dimension that guides the Pico SDK build. This
|
|
|
|
# constraint will only ever enumerate specific MCUs (and the host), and does NOT
|
|
|
|
# cover the differences from board-to-board.
|
|
|
|
constraint_setting(
|
|
|
|
name = "sdk_target",
|
|
|
|
default_constraint_value = "host",
|
|
|
|
)
|
|
|
|
|
|
|
|
# This constraint value is used to guide the host build.
|
|
|
|
constraint_value(
|
|
|
|
name = "host",
|
|
|
|
constraint_setting = ":sdk_target",
|
|
|
|
)
|
|
|
|
|
|
|
|
# This constraint value is used to guide parts of the build that are specific
|
|
|
|
# to the rp2040.
|
|
|
|
constraint_value(
|
|
|
|
name = "rp2040",
|
|
|
|
constraint_setting = ":sdk_target",
|
|
|
|
)
|
|
|
|
|
2024-08-08 19:02:04 +08:00
|
|
|
# This constraint value is used to guide parts of the build that are specific
|
|
|
|
# to the rp2350.
|
|
|
|
constraint_value(
|
|
|
|
name = "rp2350",
|
|
|
|
constraint_setting = ":sdk_target",
|
|
|
|
)
|
|
|
|
|
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
|
|
|
constraint_setting(
|
2024-06-13 22:50:04 +08:00
|
|
|
name = "wireless_support",
|
|
|
|
default_constraint_value = "no_wireless",
|
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
|
|
|
)
|
|
|
|
|
|
|
|
constraint_value(
|
2024-06-13 22:50:04 +08:00
|
|
|
name = "no_wireless",
|
|
|
|
constraint_setting = ":wireless_support",
|
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
|
|
|
)
|
|
|
|
|
|
|
|
constraint_value(
|
2024-06-13 22:50:04 +08:00
|
|
|
name = "cyw43_wireless",
|
|
|
|
constraint_setting = ":wireless_support",
|
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
|
|
|
config_setting(
|
|
|
|
name = "is_pico_w",
|
|
|
|
flag_values = {"//bazel/config:PICO_BOARD": "pico_w"},
|
|
|
|
)
|
|
|
|
|
2024-08-08 19:02:04 +08:00
|
|
|
config_setting(
|
|
|
|
name = "pico_toolchain_clang_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_TOOLCHAIN": "clang"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_toolchain_gcc_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_TOOLCHAIN": "gcc"},
|
|
|
|
)
|
|
|
|
|
2024-06-13 22:50:04 +08:00
|
|
|
config_setting(
|
|
|
|
name = "pico_baremetal_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_BARE_METAL": "True"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_no_gc_sections_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_NO_GC_SECTIONS": "True"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_cxx_enable_exceptions_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_CXX_ENABLE_EXCEPTIONS": "True"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_cxx_enable_rtti_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_CXX_ENABLE_RTTI": "True"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_cxx_enable_cxa_atexit_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_CXX_ENABLE_RTTI": "True"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_stdio_uart_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_STDIO_UART": "True"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_stdio_usb_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_STDIO_USB": "True"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_stdio_semihosting_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_STDIO_SEMIHOSTING": "True"},
|
|
|
|
)
|
|
|
|
|
2024-08-08 19:02:04 +08:00
|
|
|
config_setting(
|
|
|
|
name = "pico_stdio_rtt_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_STDIO_RTT": "True"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_multicore_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_MULTICORE_ENABLED": "True"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_float_auto_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_FLOAT_IMPL": "auto"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_float_compiler_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_FLOAT_IMPL": "compiler"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_float_dcp_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_FLOAT_IMPL": "dcp"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_float_rp2040_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_FLOAT_IMPL": "rp2040"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_float_vfp_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_FLOAT_IMPL": "vfp"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_double_auto_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_DOUBLE_IMPL": "auto"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_double_compiler_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_DOUBLE_IMPL": "compiler"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_double_dcp_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_DOUBLE_IMPL": "dcp"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_double_rp2040_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_DOUBLE_IMPL": "rp2040"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_divider_hardware_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_DIVIDER_IMPL": "hardware"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_divider_auto_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_DIVIDER_IMPL": "auto"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_printf_pico_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_PRINTF_IMPL": "pico"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_printf_compiler_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_DEFAULT_PRINTF_IMPL": "compiler"},
|
|
|
|
)
|
|
|
|
|
2024-06-13 22:50:04 +08:00
|
|
|
config_setting(
|
|
|
|
name = "pico_use_default_max_page_size_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_USE_DEFAULT_MAX_PAGE_SIZE": "True"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_no_target_name_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_NO_TARGET_NAME": "True"},
|
|
|
|
)
|
|
|
|
|
2024-08-08 19:02:04 +08:00
|
|
|
config_setting(
|
|
|
|
name = "pico_clib_llvm_libc_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_CLIB": "llvm_libc"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_clib_newlib_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_CLIB": "newlib"},
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_clib_picolibc_enabled",
|
|
|
|
flag_values = {"//bazel/config:PICO_CLIB": "picolibc"},
|
|
|
|
)
|
|
|
|
|
2024-06-13 22:50:04 +08:00
|
|
|
config_setting(
|
|
|
|
name = "pico_btstack_config_unset",
|
2024-08-08 19:02:04 +08:00
|
|
|
flag_values = {"//bazel/config:PICO_BTSTACK_CONFIG": "//bazel:empty_cc_lib"},
|
2024-06-13 22:50:04 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_lwip_config_unset",
|
2024-08-08 19:02:04 +08:00
|
|
|
flag_values = {"//bazel/config:PICO_LWIP_CONFIG": "//bazel:empty_cc_lib"},
|
2024-06-13 22:50:04 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "pico_freertos_unset",
|
2024-08-08 19:02:04 +08:00
|
|
|
flag_values = {"//bazel/config:PICO_FREERTOS_LIB": "//bazel:empty_cc_lib"},
|
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
|
|
|
)
|