blob: 5a7060938c6d868522cb300fa6a82a76b888e904 [file] [log] [blame]
load("//bazel:defs.bzl", "compatible_with_rp2")
package(default_visibility = ["//visibility:public"])
# Picotool needs this, so we can't strictly constrain compatibility.
cc_library(
name = "pico_bootrom_headers",
hdrs = [
"include/pico/bootrom.h",
"include/pico/bootrom/lock.h",
"include/pico/bootrom/sf_table.h",
"include/pico/bootrom_constants.h",
],
includes = ["include"],
tags = ["manual"],
visibility = ["@picotool//:__subpackages__"],
deps = [
"//src/rp2_common/hardware_boot_lock:hardware_boot_lock_headers",
],
)
cc_library(
name = "pico_bootrom",
srcs = [
"bootrom.c",
"bootrom_lock.c",
],
hdrs = [
"include/pico/bootrom.h",
"include/pico/bootrom/lock.h",
"include/pico/bootrom/sf_table.h",
"include/pico/bootrom_constants.h",
],
implementation_deps = [
"//src/common/boot_picobin_headers",
"//src/common/boot_picoboot_headers",
"//src/rp2_common/hardware_sync",
"//src/rp2_common/pico_runtime_init",
],
includes = ["include"],
target_compatible_with = compatible_with_rp2(),
deps = [
"//src/rp2_common/hardware_boot_lock",
] + select({
"//bazel/constraint:host": [
],
"//conditions:default": [
"//src/rp2_common:pico_platform_internal",
],
}),
)