• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2025 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
15common:k_common --@rules_rust//rust/toolchain/channel=nightly
16common:k_common --@pigweed//pw_log/rust:pw_log_backend=//pw_kernel/subsys/console:pw_log_backend
17build:k_common --build_tag_filters=-do_not_build
18build:k_common -c opt
19test:k_common --test_tag_filters=-integration,-do_not_build,-do_not_run_test
20
21# Lint configuration
22# ==================
23common:k_lint --config=k_common
24
25# Enable clippy lints
26build:k_lint --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
27build:k_lint --output_groups=+clippy_checks
28
29# Enforce rustfmt formatting
30build:k_lint --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect
31build:k_lint --output_groups=+rustfmt_checks
32
33# Host target configuration
34# ===========================
35common:k_host --config=k_common
36
37# QEMU mps2-an505 target configuration
38# =======================================
39common:k_qemu_mps2_an505 --config=k_common
40build:k_qemu_mps2_an505 --platforms=//pw_kernel/target/qemu:mps2-an505
41run:k_qemu_mps2_an505 --run_under="@qemu//:qemu-system-arm \
42  -cpu cortex-m33 \
43  -machine mps2-an505 \
44  -nographic \
45  -semihosting-config enable=on,target=native \
46  -serial mon:stdio \
47  -kernel "
48test:k_qemu_mps2_an505 --run_under="@qemu//:qemu-system-arm \
49  -cpu cortex-m33 \
50  -machine mps2-an505 \
51  -nographic \
52  -semihosting-config enable=on,target=native \
53  -serial mon:stdio \
54  -kernel "
55
56# RP2350 target configuration
57# =======================================
58common:k_rp2350 --config=k_common
59build:k_rp2350 --platforms=//pw_kernel/target/rp:rp2350
60