blob: f386da471ca2a56f9e4d6bf862da119549a328ec [file] [log] [blame]
Austin Schuh0a96ea32022-01-01 22:29:30 -08001load("//third_party/pico-sdk:hex.bzl", "uf2_from_elf")
2
3# TODO(austin): We should be able to either push the linker script into the crosstool, or wrap this in a macro.
4cc_binary(
5 name = "blink.elf",
6 srcs = [
7 "blink.c",
8 "//third_party/pico-sdk/src/rp2_common/boot_stage2:bs2_default_padded_checksummed.S",
9 ],
10 additional_linker_inputs = [
11 "//third_party/pico-sdk:src/rp2_common/pico_standard_link/memmap_default.ld",
12 ],
13 linkopts = [
14 "-Wl,--script=third_party/pico-sdk/src/rp2_common/pico_standard_link/memmap_default.ld",
15 ],
16 target_compatible_with = [
17 "@platforms//os:none",
18 "//tools/platforms/hardware:cortex_m0plus",
19 ],
20 deps = ["//third_party/pico-sdk"],
21)
22
23uf2_from_elf(
24 name = "blink",
25)