metronome/rust/pm-kit/.cargo/config.toml
Me Here 8f4264f4d2 pm-kit: defmt+probe-rs diagnostics + flip-link toolchain
Adopt proper embedded tooling for the blank-screen debug (user has a Pi Debug Probe):
- flip-link linker (baked into pm-rust:2): stack overflow faults cleanly instead of
  silently corrupting .bss/.data (the SPI buffer -> black screen class of bug).
- defmt + defmt-rtt + panic-probe: firmware logs boot/heap-free/display/parse/loop
  heartbeat over RTT; panics print message+location. .cargo runner = probe-rs run.
- Restore the full live metronome (from 08b0940) as the instrumented target.
- deploy + serve pm-kit.elf (probe-rs decodes defmt strings from the ELF).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 08:30:35 -05:00

17 lines
609 B
TOML

[build]
target = "thumbv8m.main-none-eabihf"
[target.thumbv8m.main-none-eabihf]
# flip-link: places the stack BELOW the statics so a stack overflow hits a guard region
# and faults cleanly instead of silently corrupting .bss/.data (e.g. the SPI buffer → black screen).
linker = "flip-link"
# `cargo run` flashes over the Raspberry Pi Debug Probe and streams defmt logs/panics via RTT.
runner = "probe-rs run --chip RP235x"
rustflags = [
"-C", "link-arg=--nmagic",
"-C", "link-arg=-Tlink.x",
"-C", "link-arg=-Tdefmt.x", # defmt's linker section for log-string interning
]
[env]
DEFMT_LOG = "debug"