| # Copyright 2024 The Pigweed Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| # use this file except in compliance with the License. You may obtain a copy of |
| # the License at |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| # License for the specific language governing permissions and limitations under |
| # the License. |
| |
| load("@bazel_skylib//rules:copy_file.bzl", "copy_file") |
| load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands") |
| load("@pigweed//pw_build:compatibility.bzl", "incompatible_with_mcu") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| copy_file( |
| name = "copy_clangd", |
| src = "@pigweed//pw_toolchain/host_clang:clangd", |
| out = "clangd", |
| allow_symlink = True, |
| ) |
| |
| refresh_compile_commands( |
| name = "refresh_compile_commands", |
| out_dir = ".compile_commands", |
| target_compatible_with = incompatible_with_mcu(), |
| target_groups = { |
| "host_simulator": [ |
| "//apps/blinky:simulator_blinky", |
| "//apps/production:simulator", |
| "//modules/blinky:blinky_test", |
| "//modules/buttons:manager_test", |
| ], |
| "rp2040": [ |
| "//apps/blinky:rp2040_blinky.elf", |
| "//apps/factory:rp2040.elf", |
| "//apps/production:rp2040.elf", |
| [ |
| "//modules/blinky:blinky_test", |
| "--config=rp2040", |
| ], |
| [ |
| "//modules/buttons:manager_test", |
| "--config=rp2040", |
| ], |
| [ |
| "//modules/color_rotation:manager_test", |
| "--config=rp2040", |
| ], |
| [ |
| "//modules/edge_detector:hysteresis_edge_detector_test", |
| "--config=rp2040", |
| ], |
| [ |
| "//modules/lerp:lerp_test", |
| "--config=rp2040", |
| ], |
| [ |
| "//modules/morse_code:encoder_test", |
| "--config=rp2040", |
| ], |
| ], |
| }, |
| ) |
| |
| filegroup( |
| name = "pw_console_config", |
| srcs = [ |
| ".pw_console.yaml", |
| ], |
| ) |