-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.toml
More file actions
45 lines (39 loc) · 2.08 KB
/
Copy pathconfig.toml
File metadata and controls
45 lines (39 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Cargo configuration for the Tyrne workspace.
#
# See docs/standards/infrastructure.md for the policy this file implements and
# docs/decisions/0006-workspace-layout.md for the crate structure it supports.
#
# Intentionally NO `[build] target = "..."`: host-runnable tests (unit tests,
# test-hal tests) use the default host triple; the kernel image is built with
# an explicit `--target aarch64-unknown-none` or via the `kernel-build` alias
# below.
# Per-target rustflags for the kernel build. Kept here, scoped to the bare-metal
# triple, so host tests are not affected by panic=abort or other kernel-specific
# codegen.
[target.aarch64-unknown-none]
rustflags = [
# Kernel panics abort; unwinding in kernel mode requires runtime support the
# kernel does not carry. See docs/standards/error-handling.md — Panic strategy.
"-C", "panic=abort",
# Frame pointers aid panic backtraces and debugger unwinding.
"-C", "force-frame-pointers=yes",
]
# `cargo run --target aarch64-unknown-none -p tyrne-bsp-qemu-virt` boots the
# built ELF under QEMU virt with a single Cortex-A72 core, 128 MiB RAM, and
# the serial multiplexed onto the terminal. See docs/guides/run-under-qemu.md.
runner = "qemu-system-aarch64 -M virt -cpu cortex-a72 -m 128M -smp 1 -nographic -serial mon:stdio -kernel"
# Convenience aliases.
[alias]
# Build the kernel image for the primary development BSP.
kernel-build = "build --target aarch64-unknown-none -p tyrne-bsp-qemu-virt"
# Run clippy against the kernel image with warnings as errors.
# No `--all-targets`: the BSP is no_main and has no test target to build.
kernel-clippy = "clippy --target aarch64-unknown-none -p tyrne-bsp-qemu-virt -- -D warnings"
# Boot the built image under QEMU (requires `cargo kernel-build` first).
kernel-run = "run --target aarch64-unknown-none -p tyrne-bsp-qemu-virt"
# Run host-side unit tests (uses workspace default-members, which excludes
# the bare-metal BSP). Run `cargo kernel-build` separately to exercise
# the aarch64 build.
host-test = "test"
# Run clippy on every host-buildable crate.
host-clippy = "clippy --all-targets -- -D warnings"