feat: defmt-over-RTT debug build + probe-rs flow

Add an opt-in `defmt` feature that swaps panic-reset for panic-probe,
links defmt-rtt, and enables hsmc's `trace-defmt` so chart transitions
print over RTT. Default builds are unchanged (still panic-reset, no
defmt overhead).

- Cargo.toml: `defmt` feature pulls defmt + defmt-rtt + panic-probe
  and forwards `trace-defmt` to hsmc; mirror-flag pattern matches
  the existing `embassy` feature.
- build.rs: link `defmt.x` only when the feature is on.
- src/main.rs: cfg-gate the panic handler swap, log boot, USB
  serial, kbd/mouse wake completion vs. deadline, and jiggle dx/dy.
- main.rs: watchdog.pause_on_debug(true) so probe-rs halts don't
  trip the 8 s reset.
- justfile: build-debug, debug, attach, probes recipes
  (release mode — debug builds overflow flash with defmt+panic-probe).
- mise.toml: add cargo:probe-rs-tools.
This commit is contained in:
2026-05-04 12:57:31 -06:00
parent d0d9c451aa
commit 8cb071b132
6 changed files with 197 additions and 7 deletions
+1
View File
@@ -7,6 +7,7 @@ just = "latest"
"cargo:cargo-watch" = "latest"
"cargo:cargo-bloat" = "latest"
"cargo:cargo-expand" = "latest"
"cargo:probe-rs-tools" = "latest"
[env]
CARGO_TARGET_DIR = "target"