[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"
