1package(
2    default_visibility = [
3        "//src/rp2350:__subpackages__",
4        "//src/rp2_common:__pkg__",
5    ],
6)
7
8cc_library(
9    name = "pico_platform_internal",
10    hdrs = [
11        "include/pico/asm_helper.S",
12        "include/pico/platform.h",
13        "include/pico/platform/cpu_regs.h",
14    ],
15    includes = ["include"],
16    target_compatible_with = ["//bazel/constraint:rp2350"],
17
18    # Be extra careful about who references this for now; if users depend on
19    # this but not `pico_platform` they'll end up with undefined symbols.
20    # It's generally safe for anything that circularly depends on
21    # //src/rp2_common:pico_platform to be added to this allowlist because
22    # that implicitly means the transitive dependencies of pico_platform will
23    # get linked in.
24    visibility = [
25        "//src/rp2_common:__pkg__",
26    ],
27    deps = [
28        "//src/rp2350/hardware_regs",
29        "//src/rp2350/hardware_regs:platform_defs",
30        "//src/rp2_common/pico_platform_compiler",
31        "//src/rp2_common/pico_platform_panic:pico_platform_panic_headers",
32        "//src/rp2_common/pico_platform_sections",
33    ],
34)
35
36cc_library(
37    name = "pico_platform",
38    srcs = ["platform.c"],
39    includes = ["include"],
40    target_compatible_with = ["//bazel/constraint:rp2350"],
41    deps = [
42        ":pico_platform_internal",
43        "//src/common/pico_base_headers",
44        "//src/rp2350/hardware_regs",
45        "//src/rp2350/hardware_regs:platform_defs",
46        "//src/rp2_common/hardware_base",
47        "//src/rp2_common/pico_platform_compiler",
48        "//src/rp2_common/pico_platform_panic",
49        "//src/rp2_common/pico_platform_sections",
50        "//src/rp2_common/pico_standard_link",
51    ],
52)
53