blob: 859e70549fa2dd0d25e84f6bb310942332c732a4 [file] [log] [blame]
Chad Norvellf1a1faa2024-07-03 17:28:09 +00001# Copyright 2024 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
Ted Pudlik5d750f62024-07-29 23:53:03 +000015load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
Chad Norvell58dbd172024-07-17 16:09:33 +000016load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
prabhukrc169b0f2024-07-18 19:38:36 +000017load("@pigweed//pw_build:compatibility.bzl", "incompatible_with_mcu")
Chad Norvell58dbd172024-07-17 16:09:33 +000018
Anthony DiGirolamof90c6692024-07-13 22:13:34 +000019package(default_visibility = ["//visibility:public"])
20
Ted Pudlik5d750f62024-07-29 23:53:03 +000021copy_file(
22 name = "copy_clangd",
23 src = "@pigweed//pw_toolchain/host_clang:clangd",
24 out = "clangd",
25 allow_symlink = True,
26)
27
Chad Norvell58dbd172024-07-17 16:09:33 +000028refresh_compile_commands(
29 name = "refresh_compile_commands",
30 out_dir = ".compile_commands",
Alexei Frolov3827a592024-07-24 19:48:27 +000031 target_compatible_with = incompatible_with_mcu(),
Chad Norvell58dbd172024-07-17 16:09:33 +000032 target_groups = {
33 "host_simulator": [
34 "//apps/blinky:simulator_blinky",
Anthony DiGirolamo18d6a642024-07-18 22:41:48 +000035 "//apps/production:simulator",
Chad Norvell58dbd172024-07-17 16:09:33 +000036 "//modules/blinky:blinky_test",
37 "//modules/buttons:manager_test",
38 ],
39 "rp2040": [
40 "//apps/blinky:rp2040_blinky.elf",
Alexei Frolov3827a592024-07-24 19:48:27 +000041 "//apps/factory:rp2040.elf",
Anthony DiGirolamo18d6a642024-07-18 22:41:48 +000042 "//apps/production:rp2040.elf",
Keir Mierle39ebc9d2024-07-25 23:12:36 +000043 [
44 "//modules/blinky:blinky_test",
45 "--config=rp2040",
46 ],
47 [
48 "//modules/buttons:manager_test",
49 "--config=rp2040",
50 ],
51 [
52 "//modules/color_rotation:manager_test",
53 "--config=rp2040",
54 ],
55 [
56 "//modules/edge_detector:hysteresis_edge_detector_test",
57 "--config=rp2040",
58 ],
59 [
60 "//modules/lerp:lerp_test",
61 "--config=rp2040",
62 ],
63 [
64 "//modules/morse_code:encoder_test",
65 "--config=rp2040",
66 ],
Chad Norvell58dbd172024-07-17 16:09:33 +000067 ],
68 },
69)
70
Anthony DiGirolamof90c6692024-07-13 22:13:34 +000071filegroup(
72 name = "pw_console_config",
73 srcs = [
74 ".pw_console.yaml",
75 ],
76)