Add host Bazel build Updates target_compatible_with across the repo to ensure that wildcard builds for both host and rp2040 succeed.
diff --git a/src/common/pico_base/BUILD.bazel b/src/common/pico_base/BUILD.bazel index dd8cf99..e4aa2f7 100644 --- a/src/common/pico_base/BUILD.bazel +++ b/src/common/pico_base/BUILD.bazel
@@ -61,6 +61,7 @@ "//src/common/pico_sync:__pkg__", "//src/common/pico_time:__pkg__", "//src/common/pico_util:__pkg__", + "//src/host/hardware_timer:__pkg__", "//src/host/pico_platform:__pkg__", "//src/rp2_common/boot_stage2:__pkg__", "//src/rp2_common/hardware_claim:__pkg__", @@ -94,10 +95,16 @@ # via an intermediate. ":pico_platform", ":pico_base_interface", - "//src/rp2_common/cmsis:cmsis_core", - "//src/rp2_common/boot_stage2", - "//src/rp2_common/pico_bootrom", - "//src/rp2_common/pico_runtime", - "//src/rp2_common/pico_standard_link", - ], + ] + select({ + "//bazel/constraint:rp2": [ + "//src/rp2_common/boot_stage2", + "//src/rp2_common/cmsis:cmsis_core", + "//src/rp2_common/pico_bootrom", + "//src/rp2_common/pico_runtime", + "//src/rp2_common/pico_standard_link", + ], + "//bazel/constraint:host": [ + "//src/host/pico_platform", + ], + }), )
diff --git a/src/common/pico_bit_ops/BUILD.bazel b/src/common/pico_bit_ops/BUILD.bazel index 3a81933..d414d35 100644 --- a/src/common/pico_bit_ops/BUILD.bazel +++ b/src/common/pico_bit_ops/BUILD.bazel
@@ -8,6 +8,7 @@ hdrs = ["include/pico/bit_ops.h"], includes = ["include"], visibility = [ + "//src/host/pico_bit_ops:__pkg__", "//src/rp2_common/pico_bit_ops:__pkg__", ], deps = [ @@ -19,13 +20,10 @@ name = "pico_bit_ops", hdrs = ["include/pico/bit_ops.h"], includes = ["include"], - # TODO: Add `select()` for host redirections. - target_compatible_with = select({ - "//bazel/constraint:rp2": [], - "//conditions:default": ["@platforms//:incompatible"], - }), deps = [ "//src/common/pico_base", - "//src/rp2_common/pico_bit_ops", - ], + ] + select({ + "//bazel/constraint:host": ["//src/host/pico_bit_ops"], + "//bazel/constraint:rp2": ["//src/rp2_common/pico_bit_ops"], + }), )
diff --git a/src/common/pico_stdlib/BUILD.bazel b/src/common/pico_stdlib/BUILD.bazel index 0e34e67..0feb8e4 100644 --- a/src/common/pico_stdlib/BUILD.bazel +++ b/src/common/pico_stdlib/BUILD.bazel
@@ -6,39 +6,46 @@ name = "pico_stdlib_interface", hdrs = ["include/pico/stdlib.h"], includes = ["include"], - # TODO: Add `select()` for host redirections. - target_compatible_with = select({ - "//bazel/constraint:rp2": [], - "//conditions:default": ["@platforms//:incompatible"], - }), visibility = [ + "//src/host/pico_stdio:__pkg__", + "//src/host/pico_stdlib:__pkg__", "//src/rp2_common/pico_stdlib:__pkg__", "//src/rp2_common/tinyusb:__pkg__", ], deps = [ "//src/common/pico_base", "//src/common/pico_time", - "//src/rp2_common/hardware_gpio", - "//src/rp2_common/hardware_uart", - "//src/rp2_common/pico_stdio", - ], + ] + select({ + "//bazel/constraint:rp2": [ + "//src/rp2_common/hardware_gpio", + "//src/rp2_common/hardware_uart", + ], + "//bazel/constraint:host": [ + "//src/host/hardware_gpio", + "//src/host/hardware_uart", + ], + }), ) cc_library( name = "pico_stdlib", hdrs = ["include/pico/stdlib.h"], includes = ["include"], - # TODO: Add `select()` for host redirections. - target_compatible_with = select({ - "//bazel/constraint:rp2": [], - "//conditions:default": ["@platforms//:incompatible"], - }), deps = [ "//src/common/pico_base", "//src/common/pico_time", - "//src/rp2_common/hardware_gpio", - "//src/rp2_common/hardware_uart", - "//src/rp2_common/pico_stdio", - "//src/rp2_common/pico_stdlib", - ], + ] + select({ + "//bazel/constraint:rp2": [ + "//src/rp2_common/hardware_gpio", + "//src/rp2_common/hardware_uart", + "//src/rp2_common/pico_stdio", + "//src/rp2_common/pico_stdlib", + ], + "//bazel/constraint:host": [ + "//src/host/hardware_gpio", + "//src/host/hardware_uart", + "//src/host/pico_stdio", + "//src/host/pico_stdlib", + ], + }), )
diff --git a/src/common/pico_sync/BUILD.bazel b/src/common/pico_sync/BUILD.bazel index 68042a9..b963c3c 100644 --- a/src/common/pico_sync/BUILD.bazel +++ b/src/common/pico_sync/BUILD.bazel
@@ -16,14 +16,15 @@ "include/pico/sync.h", ], includes = ["include"], - # TODO: Add `select()` for host redirections. - target_compatible_with = select({ - "//bazel/constraint:rp2": [], - "//conditions:default": ["@platforms//:incompatible"], - }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_time:pico_time_headers", - "//src/rp2_common/hardware_sync", - ], + ] + select({ + "//bazel/constraint:rp2": [ + "//src/rp2_common/hardware_sync", + ], + "//bazel/constraint:host": [ + "//src/host/hardware_sync", + ], + }), )
diff --git a/src/common/pico_time/BUILD.bazel b/src/common/pico_time/BUILD.bazel index b32dc5b..716c65b 100644 --- a/src/common/pico_time/BUILD.bazel +++ b/src/common/pico_time/BUILD.bazel
@@ -14,9 +14,14 @@ "//src/common/pico_sync:__pkg__", "//src/rp2_common/tinyusb:__pkg__", ], - deps = [ - "//src/rp2_common/hardware_timer:hardware_timer_headers", - ], + deps = select({ + "//bazel/constraint:rp2": [ + "//src/rp2_common/hardware_timer:hardware_timer_headers", + ], + "//bazel/constraint:host": [ + "//src/host/hardware_timer:hardware_timer_headers", + ], + }), ) cc_library( @@ -30,15 +35,16 @@ "include/pico/timeout_helper.h", ], includes = ["include"], - # TODO: Add `select()` for host redirections. - target_compatible_with = select({ - "//bazel/constraint:rp2": [], - "//conditions:default": ["@platforms//:incompatible"], - }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_sync", "//src/common/pico_util", - "//src/rp2_common/hardware_timer", - ], + ] + select({ + "//bazel/constraint:rp2": [ + "//src/rp2_common/hardware_timer", + ], + "//bazel/constraint:host": [ + "//src/host/hardware_timer", + ], + }), )
diff --git a/src/common/pico_util/BUILD.bazel b/src/common/pico_util/BUILD.bazel index 00d7b23..856d7b5 100644 --- a/src/common/pico_util/BUILD.bazel +++ b/src/common/pico_util/BUILD.bazel
@@ -13,14 +13,15 @@ "include/pico/util/queue.h", ], includes = ["include"], - # TODO: Add `select()` for host redirections. - target_compatible_with = select({ - "//bazel/constraint:rp2": [], - "//conditions:default": ["@platforms//:incompatible"], - }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_sync", - "//src/rp2_common/hardware_sync", - ], + ] + select({ + "//bazel/constraint:rp2": [ + "//src/rp2_common/hardware_sync", + ], + "//bazel/constraint:host": [ + "//src/host/hardware_sync", + ], + }), )
diff --git a/src/host/hardware_divider/BUILD.bazel b/src/host/hardware_divider/BUILD.bazel new file mode 100644 index 0000000..3548f1b --- /dev/null +++ b/src/host/hardware_divider/BUILD.bazel
@@ -0,0 +1,10 @@ +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "hardware_divider", + srcs = ["divider.c"], + hdrs = ["include/hardware/divider.h"], + includes = ["include"], + target_compatible_with = ["//bazel/constraint:host"], + deps = ["//src/common/pico_base"], +)
diff --git a/src/host/hardware_gpio/BUILD.bazel b/src/host/hardware_gpio/BUILD.bazel new file mode 100644 index 0000000..816ebb4 --- /dev/null +++ b/src/host/hardware_gpio/BUILD.bazel
@@ -0,0 +1,10 @@ +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "hardware_gpio", + srcs = ["gpio.c"], + hdrs = ["include/hardware/gpio.h"], + includes = ["include"], + target_compatible_with = ["//bazel/constraint:host"], + deps = ["//src/common/pico_base"], +)
diff --git a/src/host/hardware_sync/BUILD.bazel b/src/host/hardware_sync/BUILD.bazel new file mode 100644 index 0000000..f218d36 --- /dev/null +++ b/src/host/hardware_sync/BUILD.bazel
@@ -0,0 +1,11 @@ +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "hardware_sync", + srcs = ["sync_core0_only.c"], + hdrs = ["include/hardware/sync.h"], + implementation_deps = ["//src/host/pico_platform:platform_defs"], + includes = ["include"], + target_compatible_with = ["//bazel/constraint:host"], + deps = ["//src/common/pico_base"], +)
diff --git a/src/host/hardware_timer/BUILD.bazel b/src/host/hardware_timer/BUILD.bazel new file mode 100644 index 0000000..af37e2f --- /dev/null +++ b/src/host/hardware_timer/BUILD.bazel
@@ -0,0 +1,30 @@ +package(default_visibility = ["//visibility:public"]) + +_DEFINES = [ + "PICO_HARDWARE_TIMER_RESOLUTION_US=1000", + # TODO: This seems to be the default, make configurable eventually. + "PICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1", +] + +# This exists to break a dependency cycle between +# this library and //src/common/pico_time. +# Application code should always use :hardware_timer instead. +cc_library( + name = "hardware_timer_headers", + hdrs = ["include/hardware/timer.h"], + defines = _DEFINES, + includes = ["include"], + target_compatible_with = ["//bazel/constraint:host"], + visibility = ["//src/common/pico_time:__pkg__"], + deps = ["//src/common/pico_base:pico_base_interface"], +) + +cc_library( + name = "hardware_timer", + srcs = ["timer.c"], + hdrs = ["include/hardware/timer.h"], + defines = _DEFINES, + includes = ["include"], + target_compatible_with = ["//bazel/constraint:host"], + deps = ["//src/common/pico_base"], +)
diff --git a/src/host/hardware_uart/BUILD.bazel b/src/host/hardware_uart/BUILD.bazel new file mode 100644 index 0000000..5288d14 --- /dev/null +++ b/src/host/hardware_uart/BUILD.bazel
@@ -0,0 +1,10 @@ +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "hardware_uart", + srcs = ["uart.c"], + hdrs = ["include/hardware/uart.h"], + includes = ["include"], + target_compatible_with = ["//bazel/constraint:host"], + deps = ["//src/common/pico_base"], +)
diff --git a/src/host/pico_bit_ops/BUILD.bazel b/src/host/pico_bit_ops/BUILD.bazel new file mode 100644 index 0000000..a0e7dc4 --- /dev/null +++ b/src/host/pico_bit_ops/BUILD.bazel
@@ -0,0 +1,8 @@ +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "pico_bit_ops", + srcs = ["bit_ops.c"], + implementation_deps = ["//src/common/pico_bit_ops:pico_bit_ops_headers"], + target_compatible_with = ["//bazel/constraint:host"], +)
diff --git a/src/host/pico_divider/BUILD.bazel b/src/host/pico_divider/BUILD.bazel new file mode 100644 index 0000000..e82785f --- /dev/null +++ b/src/host/pico_divider/BUILD.bazel
@@ -0,0 +1,8 @@ +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "pico_divider", + srcs = ["divider.c"], + implementation_deps = ["//src/common/pico_divider"], + target_compatible_with = ["//bazel/constraint:host"], +)
diff --git a/src/host/pico_multicore/BUILD.bazel b/src/host/pico_multicore/BUILD.bazel new file mode 100644 index 0000000..61b1092 --- /dev/null +++ b/src/host/pico_multicore/BUILD.bazel
@@ -0,0 +1,9 @@ +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "pico_multicore", + hdrs = ["include/pico/multicore.h"], + includes = ["include"], + target_compatible_with = ["//bazel/constraint:host"], + deps = ["//src/common/pico_base"], +)
diff --git a/src/host/pico_platform/BUILD.bazel b/src/host/pico_platform/BUILD.bazel index 2cad9cd..d89fd3a 100644 --- a/src/host/pico_platform/BUILD.bazel +++ b/src/host/pico_platform/BUILD.bazel
@@ -6,6 +6,7 @@ "include/hardware/platform_defs.h", ], includes = ["include"], + target_compatible_with = ["//bazel/constraint:host"], ) cc_library( @@ -15,6 +16,7 @@ "include/pico/platform.h", ], includes = ["include"], + target_compatible_with = ["//bazel/constraint:host"], deps = [ ":platform_defs", "//src/common/pico_base:pico_base_interface",
diff --git a/src/host/pico_printf/BUILD.bazel b/src/host/pico_printf/BUILD.bazel new file mode 100644 index 0000000..b6a4bb7 --- /dev/null +++ b/src/host/pico_printf/BUILD.bazel
@@ -0,0 +1,6 @@ +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "pico_printf", + target_compatible_with = ["//bazel/constraint:host"], +)
diff --git a/src/host/pico_stdio/BUILD.bazel b/src/host/pico_stdio/BUILD.bazel new file mode 100644 index 0000000..abdc993 --- /dev/null +++ b/src/host/pico_stdio/BUILD.bazel
@@ -0,0 +1,13 @@ +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "pico_stdio", + srcs = ["stdio.c"], + hdrs = ["include/pico/stdio.h"], + implementation_deps = [ + "//src/common/pico_stdlib:pico_stdlib_interface", + "//src/host/hardware_uart", + ], + includes = ["include"], + target_compatible_with = ["//bazel/constraint:host"], +)
diff --git a/src/host/pico_stdlib/BUILD.bazel b/src/host/pico_stdlib/BUILD.bazel new file mode 100644 index 0000000..245f693 --- /dev/null +++ b/src/host/pico_stdlib/BUILD.bazel
@@ -0,0 +1,11 @@ +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "pico_stdlib", + srcs = ["stdlib.c"], + implementation_deps = [ + "//src/common/pico_stdlib:pico_stdlib_interface", + "//src/host/pico_stdio", + ], + target_compatible_with = ["//bazel/constraint:host"], +)
diff --git a/src/rp2040/hardware_regs/BUILD.bazel b/src/rp2040/hardware_regs/BUILD.bazel index 6bd0081..d2793e6 100644 --- a/src/rp2040/hardware_regs/BUILD.bazel +++ b/src/rp2040/hardware_regs/BUILD.bazel
@@ -9,6 +9,7 @@ "include/hardware/platform_defs.h", ], includes = ["include"], + target_compatible_with = ["//bazel/constraint:rp2040"], ) cc_library( @@ -50,4 +51,5 @@ "include/hardware/regs/xosc.h", ], includes = ["include"], + target_compatible_with = ["//bazel/constraint:rp2040"], )
diff --git a/src/rp2040/hardware_structs/BUILD.bazel b/src/rp2040/hardware_structs/BUILD.bazel index 692334c..a4ddb7b 100644 --- a/src/rp2040/hardware_structs/BUILD.bazel +++ b/src/rp2040/hardware_structs/BUILD.bazel
@@ -40,4 +40,5 @@ "include/hardware/structs/xosc.h", ], includes = ["include"], + target_compatible_with = ["//bazel/constraint:rp2040"], )
diff --git a/src/rp2_common/boot_stage2/BUILD.bazel b/src/rp2_common/boot_stage2/BUILD.bazel index df6a041..6cff436 100644 --- a/src/rp2_common/boot_stage2/BUILD.bazel +++ b/src/rp2_common/boot_stage2/BUILD.bazel
@@ -23,6 +23,10 @@ "asminclude", "include", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), visibility = ["//src/rp2_common/pico_standard_link:__pkg__"], ) @@ -45,6 +49,10 @@ # rp2040_bootloader_binary transition forcibly clobbers --custom_malloc. malloc = ":no_malloc", tags = ["manual"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "boot_stage2.ld", ":config", @@ -63,6 +71,10 @@ name = "boot_stage2_bin", src = ":boot_stage2_elf", out = "boot_stage2.bin", + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), ) # WORKAROUND: Python rules always require a .py extension. @@ -70,11 +82,13 @@ name = "copy_tool_to_py", src = "pad_checksum", out = "pad_checksum_tool.py", + target_compatible_with = ["//bazel/constraint:host"], ) py_binary( name = "pad_checksum_tool", srcs = ["pad_checksum_tool.py"], + target_compatible_with = ["//bazel/constraint:host"], ) run_binary( @@ -86,12 +100,20 @@ "$(location boot_stage2_bin)", "$(location boot_stage2.S)", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), tool = ":pad_checksum_tool", ) cc_library( name = "boot_stage2", srcs = [":boot_stage2_padded"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), visibility = ["//visibility:public"], # This isn't referenced as a symbol, so alwayslink is required to ensure # it doesn't get dropped before the linker script can find it.
diff --git a/src/rp2_common/cmsis/BUILD.bazel b/src/rp2_common/cmsis/BUILD.bazel index 24cf5df..173c683 100644 --- a/src/rp2_common/cmsis/BUILD.bazel +++ b/src/rp2_common/cmsis/BUILD.bazel
@@ -4,6 +4,10 @@ name = "rename_exceptions", hdrs = ["include/cmsis/rename_exceptions.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), ) cc_library( @@ -28,6 +32,10 @@ "stub/CMSIS/Core/Include", "stub/CMSIS/Device/RaspberryPi/RP2040/Include", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/rp2_common/hardware_clocks", ],
diff --git a/src/rp2_common/hardware_adc/BUILD.bazel b/src/rp2_common/hardware_adc/BUILD.bazel index 29dfd09..9d46bf4 100644 --- a/src/rp2_common/hardware_adc/BUILD.bazel +++ b/src/rp2_common/hardware_adc/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["adc.c"], hdrs = ["include/hardware/adc.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_gpio",
diff --git a/src/rp2_common/hardware_base/BUILD.bazel b/src/rp2_common/hardware_base/BUILD.bazel index ebf54b9..cc2b1a8 100644 --- a/src/rp2_common/hardware_base/BUILD.bazel +++ b/src/rp2_common/hardware_base/BUILD.bazel
@@ -4,4 +4,8 @@ name = "hardware_base", hdrs = ["include/hardware/address_mapped.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), )
diff --git a/src/rp2_common/hardware_claim/BUILD.bazel b/src/rp2_common/hardware_claim/BUILD.bazel index b9875ca..1daa428 100644 --- a/src/rp2_common/hardware_claim/BUILD.bazel +++ b/src/rp2_common/hardware_claim/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["claim.c"], hdrs = ["include/hardware/claim.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_base:pico_platform",
diff --git a/src/rp2_common/hardware_clocks/BUILD.bazel b/src/rp2_common/hardware_clocks/BUILD.bazel index 7152804..76f52a9 100644 --- a/src/rp2_common/hardware_clocks/BUILD.bazel +++ b/src/rp2_common/hardware_clocks/BUILD.bazel
@@ -7,6 +7,10 @@ name = "hardware_clocks_headers", hdrs = ["include/hardware/clocks.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), visibility = [ "//src/rp2_common/hardware_pll:__pkg__", "//src/rp2_common/hardware_xosc:__pkg__", @@ -22,6 +26,10 @@ srcs = ["clocks.c"], hdrs = ["include/hardware/clocks.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/rp2_common/hardware_gpio",
diff --git a/src/rp2_common/hardware_divider/BUILD.bazel b/src/rp2_common/hardware_divider/BUILD.bazel index 0b3dc9c..1ef2bd9 100644 --- a/src/rp2_common/hardware_divider/BUILD.bazel +++ b/src/rp2_common/hardware_divider/BUILD.bazel
@@ -8,6 +8,10 @@ "include/hardware/divider_helper.S", ], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/pico_platform",
diff --git a/src/rp2_common/hardware_dma/BUILD.bazel b/src/rp2_common/hardware_dma/BUILD.bazel index fceabfb..001f967 100644 --- a/src/rp2_common/hardware_dma/BUILD.bazel +++ b/src/rp2_common/hardware_dma/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["dma.c"], hdrs = ["include/hardware/dma.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_claim",
diff --git a/src/rp2_common/hardware_exception/BUILD.bazel b/src/rp2_common/hardware_exception/BUILD.bazel index 72b4c41..5c1b2d0 100644 --- a/src/rp2_common/hardware_exception/BUILD.bazel +++ b/src/rp2_common/hardware_exception/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["exception.c"], hdrs = ["include/hardware/exception.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_base",
diff --git a/src/rp2_common/hardware_flash/BUILD.bazel b/src/rp2_common/hardware_flash/BUILD.bazel index ee79e6f..ae3d381 100644 --- a/src/rp2_common/hardware_flash/BUILD.bazel +++ b/src/rp2_common/hardware_flash/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["flash.c"], hdrs = ["include/hardware/flash.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/pico_bootrom",
diff --git a/src/rp2_common/hardware_gpio/BUILD.bazel b/src/rp2_common/hardware_gpio/BUILD.bazel index 5d035eb..63c5e76 100644 --- a/src/rp2_common/hardware_gpio/BUILD.bazel +++ b/src/rp2_common/hardware_gpio/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["gpio.c"], hdrs = ["include/hardware/gpio.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_binary_info",
diff --git a/src/rp2_common/hardware_i2c/BUILD.bazel b/src/rp2_common/hardware_i2c/BUILD.bazel index cd9110f..71329c3 100644 --- a/src/rp2_common/hardware_i2c/BUILD.bazel +++ b/src/rp2_common/hardware_i2c/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["i2c.c"], hdrs = ["include/hardware/i2c.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/common/pico_time",
diff --git a/src/rp2_common/hardware_interp/BUILD.bazel b/src/rp2_common/hardware_interp/BUILD.bazel index fa8106f..c4d2087 100644 --- a/src/rp2_common/hardware_interp/BUILD.bazel +++ b/src/rp2_common/hardware_interp/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["interp.c"], hdrs = ["include/hardware/interp.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_claim",
diff --git a/src/rp2_common/hardware_irq/BUILD.bazel b/src/rp2_common/hardware_irq/BUILD.bazel index 0e929c9..0484790 100644 --- a/src/rp2_common/hardware_irq/BUILD.bazel +++ b/src/rp2_common/hardware_irq/BUILD.bazel
@@ -8,6 +8,10 @@ ], hdrs = ["include/hardware/irq.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_sync",
diff --git a/src/rp2_common/hardware_pio/BUILD.bazel b/src/rp2_common/hardware_pio/BUILD.bazel index 0cf474d..e15b6ad 100644 --- a/src/rp2_common/hardware_pio/BUILD.bazel +++ b/src/rp2_common/hardware_pio/BUILD.bazel
@@ -8,6 +8,10 @@ "include/hardware/pio_instructions.h", ], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_base",
diff --git a/src/rp2_common/hardware_pll/BUILD.bazel b/src/rp2_common/hardware_pll/BUILD.bazel index ea0199b..f8a7b50 100644 --- a/src/rp2_common/hardware_pll/BUILD.bazel +++ b/src/rp2_common/hardware_pll/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["pll.c"], hdrs = ["include/hardware/pll.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_base:pico_platform",
diff --git a/src/rp2_common/hardware_pwm/BUILD.bazel b/src/rp2_common/hardware_pwm/BUILD.bazel index 2b9b4d1..b90f55b 100644 --- a/src/rp2_common/hardware_pwm/BUILD.bazel +++ b/src/rp2_common/hardware_pwm/BUILD.bazel
@@ -4,6 +4,10 @@ name = "hardware_pwm", hdrs = ["include/hardware/pwm.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/pico_platform:hardware_regs",
diff --git a/src/rp2_common/hardware_resets/BUILD.bazel b/src/rp2_common/hardware_resets/BUILD.bazel index 294ed23..d3f1bfd 100644 --- a/src/rp2_common/hardware_resets/BUILD.bazel +++ b/src/rp2_common/hardware_resets/BUILD.bazel
@@ -4,6 +4,10 @@ name = "hardware_resets", hdrs = ["include/hardware/resets.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/rp2_common/pico_platform:hardware_structs",
diff --git a/src/rp2_common/hardware_rtc/BUILD.bazel b/src/rp2_common/hardware_rtc/BUILD.bazel index 7992511..7adddaf 100644 --- a/src/rp2_common/hardware_rtc/BUILD.bazel +++ b/src/rp2_common/hardware_rtc/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["rtc.c"], hdrs = ["include/hardware/rtc.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_clocks",
diff --git a/src/rp2_common/hardware_spi/BUILD.bazel b/src/rp2_common/hardware_spi/BUILD.bazel index e9bccc9..55849c5 100644 --- a/src/rp2_common/hardware_spi/BUILD.bazel +++ b/src/rp2_common/hardware_spi/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["spi.c"], hdrs = ["include/hardware/spi.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_clocks",
diff --git a/src/rp2_common/hardware_sync/BUILD.bazel b/src/rp2_common/hardware_sync/BUILD.bazel index 3805642..38d744a 100644 --- a/src/rp2_common/hardware_sync/BUILD.bazel +++ b/src/rp2_common/hardware_sync/BUILD.bazel
@@ -7,6 +7,10 @@ name = "hardware_sync_headers", hdrs = ["include/hardware/sync.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), visibility = ["//src/rp2_common/hardware_claim:__pkg__"], deps = [ "//src/common/pico_base:pico_base_interface", @@ -20,6 +24,10 @@ srcs = ["sync.c"], hdrs = ["include/hardware/sync.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/rp2_common/hardware_base",
diff --git a/src/rp2_common/hardware_timer/BUILD.bazel b/src/rp2_common/hardware_timer/BUILD.bazel index b97bcde..2f305ca 100644 --- a/src/rp2_common/hardware_timer/BUILD.bazel +++ b/src/rp2_common/hardware_timer/BUILD.bazel
@@ -7,6 +7,10 @@ name = "hardware_timer_headers", hdrs = ["include/hardware/timer.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), visibility = ["//src/common/pico_time:__pkg__"], deps = [ "//src/common/pico_base:pico_base_interface", @@ -19,6 +23,10 @@ srcs = ["timer.c"], hdrs = ["include/hardware/timer.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/rp2_common/hardware_claim",
diff --git a/src/rp2_common/hardware_uart/BUILD.bazel b/src/rp2_common/hardware_uart/BUILD.bazel index a329df3..1792ee0 100644 --- a/src/rp2_common/hardware_uart/BUILD.bazel +++ b/src/rp2_common/hardware_uart/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["uart.c"], hdrs = ["include/hardware/uart.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_base",
diff --git a/src/rp2_common/hardware_vreg/BUILD.bazel b/src/rp2_common/hardware_vreg/BUILD.bazel index 0a90697..0f20163 100644 --- a/src/rp2_common/hardware_vreg/BUILD.bazel +++ b/src/rp2_common/hardware_vreg/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["vreg.c"], hdrs = ["include/hardware/vreg.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/pico_platform:hardware_structs",
diff --git a/src/rp2_common/hardware_watchdog/BUILD.bazel b/src/rp2_common/hardware_watchdog/BUILD.bazel index fad2f97..1a6defb 100644 --- a/src/rp2_common/hardware_watchdog/BUILD.bazel +++ b/src/rp2_common/hardware_watchdog/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["watchdog.c"], hdrs = ["include/hardware/watchdog.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_base:pico_platform",
diff --git a/src/rp2_common/hardware_xosc/BUILD.bazel b/src/rp2_common/hardware_xosc/BUILD.bazel index 2ed2201..4eed17d 100644 --- a/src/rp2_common/hardware_xosc/BUILD.bazel +++ b/src/rp2_common/hardware_xosc/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["xosc.c"], hdrs = ["include/hardware/xosc.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_base:pico_platform",
diff --git a/src/rp2_common/pico_async_context/BUILD.bazel b/src/rp2_common/pico_async_context/BUILD.bazel index 577d1c8..1554a0b 100644 --- a/src/rp2_common/pico_async_context/BUILD.bazel +++ b/src/rp2_common/pico_async_context/BUILD.bazel
@@ -21,6 +21,10 @@ # semphr.h # timers.h tags = ["manual"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/common/pico_sync",
diff --git a/src/rp2_common/pico_bit_ops/BUILD.bazel b/src/rp2_common/pico_bit_ops/BUILD.bazel index 35322a8..089130d 100644 --- a/src/rp2_common/pico_bit_ops/BUILD.bazel +++ b/src/rp2_common/pico_bit_ops/BUILD.bazel
@@ -16,6 +16,10 @@ "-Wl,--wrap=__clzsi2", "-Wl,--wrap=__clzll", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_bit_ops:pico_bit_ops_headers", "//src/rp2_common/pico_bootrom",
diff --git a/src/rp2_common/pico_bootrom/BUILD.bazel b/src/rp2_common/pico_bootrom/BUILD.bazel index b31378c..cca3e43 100644 --- a/src/rp2_common/pico_bootrom/BUILD.bazel +++ b/src/rp2_common/pico_bootrom/BUILD.bazel
@@ -8,6 +8,10 @@ "include/pico/bootrom/sf_table.h", ], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_base:pico_platform",
diff --git a/src/rp2_common/pico_bootsel_via_double_reset/BUILD.bazel b/src/rp2_common/pico_bootsel_via_double_reset/BUILD.bazel index 8e85b70..a766bcb 100644 --- a/src/rp2_common/pico_bootsel_via_double_reset/BUILD.bazel +++ b/src/rp2_common/pico_bootsel_via_double_reset/BUILD.bazel
@@ -3,6 +3,10 @@ cc_library( name = "pico_bootsel_via_double_reset", srcs = ["pico_bootsel_via_double_reset.c"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/common/pico_binary_info",
diff --git a/src/rp2_common/pico_btstack/BUILD.bazel b/src/rp2_common/pico_btstack/BUILD.bazel index c3afa3e..dd715a8 100644 --- a/src/rp2_common/pico_btstack/BUILD.bazel +++ b/src/rp2_common/pico_btstack/BUILD.bazel
@@ -18,6 +18,10 @@ # btstack_stdin.h # hal_flash_bank.h tags = ["manual"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_sync",
diff --git a/src/rp2_common/pico_cxx_options/BUILD.bazel b/src/rp2_common/pico_cxx_options/BUILD.bazel index 6fb8268..80a46a2 100644 --- a/src/rp2_common/pico_cxx_options/BUILD.bazel +++ b/src/rp2_common/pico_cxx_options/BUILD.bazel
@@ -2,4 +2,8 @@ cc_library( name = "pico_cxx_options", + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), )
diff --git a/src/rp2_common/pico_cyw43_arch/BUILD.bazel b/src/rp2_common/pico_cyw43_arch/BUILD.bazel index 9ce4516..d64db32 100644 --- a/src/rp2_common/pico_cyw43_arch/BUILD.bazel +++ b/src/rp2_common/pico_cyw43_arch/BUILD.bazel
@@ -21,6 +21,10 @@ # cyw43_ll.h # cyw43_stats.h tags = ["manual"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/pico_async_context",
diff --git a/src/rp2_common/pico_cyw43_driver/BUILD.bazel b/src/rp2_common/pico_cyw43_driver/BUILD.bazel index 1d2fa13..5d2f861 100644 --- a/src/rp2_common/pico_cyw43_driver/BUILD.bazel +++ b/src/rp2_common/pico_cyw43_driver/BUILD.bazel
@@ -35,6 +35,10 @@ # hci_dump_segger_rtt_stdout.h # hci_transport.h tags = ["manual"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/common/pico_time",
diff --git a/src/rp2_common/pico_divider/BUILD.bazel b/src/rp2_common/pico_divider/BUILD.bazel index f35f225..a2f6ef0 100644 --- a/src/rp2_common/pico_divider/BUILD.bazel +++ b/src/rp2_common/pico_divider/BUILD.bazel
@@ -11,6 +11,10 @@ "-Wl,--wrap=__aeabi_uidivmod", "-Wl,--wrap=__aeabi_uldivmod", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/rp2_common/hardware_divider", "//src/rp2_common/pico_platform",
diff --git a/src/rp2_common/pico_double/BUILD.bazel b/src/rp2_common/pico_double/BUILD.bazel index f52e78b..200b15a 100644 --- a/src/rp2_common/pico_double/BUILD.bazel +++ b/src/rp2_common/pico_double/BUILD.bazel
@@ -73,6 +73,10 @@ "-Wl,--wrap=log1p", "-Wl,--wrap=fma", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_divider",
diff --git a/src/rp2_common/pico_fix/BUILD.bazel b/src/rp2_common/pico_fix/BUILD.bazel index a1b4b2e..6173312 100644 --- a/src/rp2_common/pico_fix/BUILD.bazel +++ b/src/rp2_common/pico_fix/BUILD.bazel
@@ -2,4 +2,8 @@ cc_library( name = "pico_fix", + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), )
diff --git a/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/BUILD.bazel b/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/BUILD.bazel index 7b1406c..c40711f 100644 --- a/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/BUILD.bazel +++ b/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["rp2040_usb_device_enumeration.c"], hdrs = ["include/pico/fix/rp2040_usb_device_enumeration.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/common/pico_time",
diff --git a/src/rp2_common/pico_flash/BUILD.bazel b/src/rp2_common/pico_flash/BUILD.bazel index d9aac18..0745b0e 100644 --- a/src/rp2_common/pico_flash/BUILD.bazel +++ b/src/rp2_common/pico_flash/BUILD.bazel
@@ -9,6 +9,10 @@ # FreeRTOS.h # task.h tags = ["manual"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/common/pico_time",
diff --git a/src/rp2_common/pico_float/BUILD.bazel b/src/rp2_common/pico_float/BUILD.bazel index c3cef5e..799b23b 100644 --- a/src/rp2_common/pico_float/BUILD.bazel +++ b/src/rp2_common/pico_float/BUILD.bazel
@@ -73,6 +73,10 @@ "-Wl,--wrap=log1pf", "-Wl,--wrap=fmaf", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_divider",
diff --git a/src/rp2_common/pico_i2c_slave/BUILD.bazel b/src/rp2_common/pico_i2c_slave/BUILD.bazel index 36e0b9b..bd9aaa9 100644 --- a/src/rp2_common/pico_i2c_slave/BUILD.bazel +++ b/src/rp2_common/pico_i2c_slave/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["i2c_slave.c"], hdrs = ["include/pico/i2c_slave.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/rp2_common/hardware_i2c", "//src/rp2_common/hardware_irq",
diff --git a/src/rp2_common/pico_int64_ops/BUILD.bazel b/src/rp2_common/pico_int64_ops/BUILD.bazel index 6311103..7c62226 100644 --- a/src/rp2_common/pico_int64_ops/BUILD.bazel +++ b/src/rp2_common/pico_int64_ops/BUILD.bazel
@@ -6,6 +6,10 @@ hdrs = ["include/pico/int64_ops.h"], includes = ["include"], linkopts = ["-Wl,--wrap=__aeabi_lmul"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/pico_platform",
diff --git a/src/rp2_common/pico_lwip/BUILD.bazel b/src/rp2_common/pico_lwip/BUILD.bazel index 76799a5..bbafc09 100644 --- a/src/rp2_common/pico_lwip/BUILD.bazel +++ b/src/rp2_common/pico_lwip/BUILD.bazel
@@ -18,6 +18,10 @@ # lwip/timeouts.h # semphr.h tags = ["manual"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/common/pico_time",
diff --git a/src/rp2_common/pico_malloc/BUILD.bazel b/src/rp2_common/pico_malloc/BUILD.bazel index 7aa6bae..411a497 100644 --- a/src/rp2_common/pico_malloc/BUILD.bazel +++ b/src/rp2_common/pico_malloc/BUILD.bazel
@@ -11,6 +11,10 @@ "-Wl,--wrap=realloc", "-Wl,--wrap=free", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_sync",
diff --git a/src/rp2_common/pico_mbedtls/BUILD.bazel b/src/rp2_common/pico_mbedtls/BUILD.bazel index 8f9a64b..af8f9c6 100644 --- a/src/rp2_common/pico_mbedtls/BUILD.bazel +++ b/src/rp2_common/pico_mbedtls/BUILD.bazel
@@ -3,6 +3,10 @@ cc_library( name = "pico_mbedtls", srcs = ["pico_mbedtls.c"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/rp2_common/pico_platform", "//src/rp2_common/pico_rand",
diff --git a/src/rp2_common/pico_mem_ops/BUILD.bazel b/src/rp2_common/pico_mem_ops/BUILD.bazel index 7d1c965..0c6aa6f 100644 --- a/src/rp2_common/pico_mem_ops/BUILD.bazel +++ b/src/rp2_common/pico_mem_ops/BUILD.bazel
@@ -18,6 +18,10 @@ "-Wl,--wrap=__aeabi_memcpy8", "-Wl,--wrap=__aeabi_memset8", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/pico_bootrom",
diff --git a/src/rp2_common/pico_multicore/BUILD.bazel b/src/rp2_common/pico_multicore/BUILD.bazel index 220edd4..35961b7 100644 --- a/src/rp2_common/pico_multicore/BUILD.bazel +++ b/src/rp2_common/pico_multicore/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["multicore.c"], hdrs = ["include/pico/multicore.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/common/pico_sync",
diff --git a/src/rp2_common/pico_platform/BUILD.bazel b/src/rp2_common/pico_platform/BUILD.bazel index 0655b41..72c61c8 100644 --- a/src/rp2_common/pico_platform/BUILD.bazel +++ b/src/rp2_common/pico_platform/BUILD.bazel
@@ -5,6 +5,10 @@ actual = select({ "//bazel/constraint:rp2040": "//src/rp2040/hardware_regs:platform_defs", }), + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), ) alias( @@ -12,6 +16,10 @@ actual = select({ "//bazel/constraint:rp2040": "//src/rp2040/hardware_regs:hardware_regs", }), + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), ) alias( @@ -19,6 +27,10 @@ actual = select({ "//bazel/constraint:rp2040": "//src/rp2040/hardware_structs:hardware_structs", }), + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), ) cc_library( @@ -29,6 +41,10 @@ "include/pico/platform.h", ], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ ":hardware_regs", ":platform_defs",
diff --git a/src/rp2_common/pico_printf/BUILD.bazel b/src/rp2_common/pico_printf/BUILD.bazel index d289845..056f091 100644 --- a/src/rp2_common/pico_printf/BUILD.bazel +++ b/src/rp2_common/pico_printf/BUILD.bazel
@@ -12,6 +12,10 @@ "-Wl,--wrap=snprintf", "-Wl,--wrap=vsnprintf", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/rp2_common/pico_bootrom",
diff --git a/src/rp2_common/pico_rand/BUILD.bazel b/src/rp2_common/pico_rand/BUILD.bazel index 3ef576c..7630da5 100644 --- a/src/rp2_common/pico_rand/BUILD.bazel +++ b/src/rp2_common/pico_rand/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["rand.c"], hdrs = ["include/pico/rand.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/common/pico_time",
diff --git a/src/rp2_common/pico_runtime/BUILD.bazel b/src/rp2_common/pico_runtime/BUILD.bazel index f3f9bff..4dcbf0e 100644 --- a/src/rp2_common/pico_runtime/BUILD.bazel +++ b/src/rp2_common/pico_runtime/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["runtime.c"], hdrs = ["include/pico/runtime.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base:pico_base_interface", "//src/common/pico_sync",
diff --git a/src/rp2_common/pico_standard_link/BUILD.bazel b/src/rp2_common/pico_standard_link/BUILD.bazel index bfc1376..46b94d9 100644 --- a/src/rp2_common/pico_standard_link/BUILD.bazel +++ b/src/rp2_common/pico_standard_link/BUILD.bazel
@@ -11,6 +11,10 @@ linkopts = [ "-T$(location memmap_default.ld)", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "memmap_default.ld", "//src/common/pico_base:pico_base_interface",
diff --git a/src/rp2_common/pico_stdio/BUILD.bazel b/src/rp2_common/pico_stdio/BUILD.bazel index d380041..c6ba06a 100644 --- a/src/rp2_common/pico_stdio/BUILD.bazel +++ b/src/rp2_common/pico_stdio/BUILD.bazel
@@ -10,6 +10,10 @@ "include/pico/stdio/driver.h", ], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), visibility = [ "//src/rp2_common/pico_stdio_semihosting:__pkg__", "//src/rp2_common/pico_stdio_uart:__pkg__", @@ -33,6 +37,10 @@ "-Wl,--wrap=putchar", "-Wl,--wrap=getchar", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/common/pico_sync",
diff --git a/src/rp2_common/pico_stdio_semihosting/BUILD.bazel b/src/rp2_common/pico_stdio_semihosting/BUILD.bazel index 5ce2a69..0cadf78 100644 --- a/src/rp2_common/pico_stdio_semihosting/BUILD.bazel +++ b/src/rp2_common/pico_stdio_semihosting/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["stdio_semihosting.c"], hdrs = ["include/pico/stdio_semihosting.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_binary_info", "//src/rp2_common/pico_stdio:pico_stdio_headers",
diff --git a/src/rp2_common/pico_stdio_uart/BUILD.bazel b/src/rp2_common/pico_stdio_uart/BUILD.bazel index 3ca9968..9aced45 100644 --- a/src/rp2_common/pico_stdio_uart/BUILD.bazel +++ b/src/rp2_common/pico_stdio_uart/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["stdio_uart.c"], hdrs = ["include/pico/stdio_uart.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_binary_info", "//src/rp2_common/hardware_gpio",
diff --git a/src/rp2_common/pico_stdio_usb/BUILD.bazel b/src/rp2_common/pico_stdio_usb/BUILD.bazel index 58c3cdb..bb414f5 100644 --- a/src/rp2_common/pico_stdio_usb/BUILD.bazel +++ b/src/rp2_common/pico_stdio_usb/BUILD.bazel
@@ -1,5 +1,6 @@ package(default_visibility = ["//visibility:public"]) +# Picotool requires this, so it should work on host as well as rp2. cc_library( name = "reset_interface_headers", hdrs = ["include/pico/stdio_usb/reset_interface.h"], @@ -11,12 +12,20 @@ name = "tusb_config", hdrs = ["include/tusb_config.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), ) cc_library( name = "pico_stdio_usb_headers", hdrs = ["include/pico/stdio_usb.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), visibility = [ ":__pkg__", "//src/rp2_common/tinyusb:__pkg__", @@ -30,7 +39,12 @@ "stdio_usb.c", "stdio_usb_descriptors.c", ], - target_compatible_with = ["//bazel/constraint:stdio_usb"], + target_compatible_with = [ + "//bazel/constraint:stdio_usb", + ] + select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ ":pico_stdio_usb_headers", ":reset_interface_headers",
diff --git a/src/rp2_common/pico_stdlib/BUILD.bazel b/src/rp2_common/pico_stdlib/BUILD.bazel index 53b01e1..ef7603d 100644 --- a/src/rp2_common/pico_stdlib/BUILD.bazel +++ b/src/rp2_common/pico_stdlib/BUILD.bazel
@@ -3,6 +3,10 @@ cc_library( name = "pico_stdlib", srcs = ["stdlib.c"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_binary_info", "//src/common/pico_stdlib:pico_stdlib_interface",
diff --git a/src/rp2_common/pico_unique_id/BUILD.bazel b/src/rp2_common/pico_unique_id/BUILD.bazel index 7db977e..6c087ea 100644 --- a/src/rp2_common/pico_unique_id/BUILD.bazel +++ b/src/rp2_common/pico_unique_id/BUILD.bazel
@@ -5,6 +5,10 @@ srcs = ["unique_id.c"], hdrs = ["include/pico/unique_id.h"], includes = ["include"], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/rp2_common/hardware_flash",
diff --git a/src/rp2_common/tinyusb/BUILD.bazel b/src/rp2_common/tinyusb/BUILD.bazel index 0c395a7..3373652 100644 --- a/src/rp2_common/tinyusb/BUILD.bazel +++ b/src/rp2_common/tinyusb/BUILD.bazel
@@ -7,6 +7,10 @@ "CFG_TUSB_MCU=OPT_MCU_RP2040", "CFG_TUSB_OS=OPT_OS_PICO", ], + target_compatible_with = select({ + "//bazel/constraint:rp2": [], + "//conditions:default": ["@platforms//:incompatible"], + }), deps = [ "//src/common/pico_base", "//src/common/pico_binary_info",