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>
17 lines
609 B
TOML
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"
|