metronome/rust
Me Here 768ec0021f pm-grid: name the drive PM_G-1 + read set lists from it (on-device FAT)
On boot (before USB setup, so the flash write cannot disrupt enumeration) the
device mounts the Mass Storage FAT volume and uses it:
- fatfs 0.4 (git rev c4b88477; 0.3.6 needs core_io for no_std) via a read-only
  FlashIo over the .filesystem region (reads flash through a black_box ptr).
- If the root-dir volume label is not "PM_G-1" (e.g. a leftover CircuitPython
  volume), write an embedded blank PM_G-1 FAT12 template (src/fat_template.bin =
  first 7 sectors of mkfs.fat -F12 -S4096 -n PM_G-1; sets both BPB + root-dir
  VOLUME_ID label) -> the drive now shows as PM_G-1.
- Read programs.json (LFN) and a tolerant scanner (parse_setlists) turns it into
  user set lists appended to the built-ins. Drop programs.json on the drive,
  reboot, your grooves appear (B-hold cycles set lists).

Set lists are now a runtime Vec<SetList>{title,items} (built-ins -> owned +
drive); refactored load/next_track/next_setlist/goto_target/prepare_next/sel.

Validated off-bench: a host probe ran fatfs against a real mkfs 4096-sector image
(label + programs.json read confirmed) before flashing.

WRITE-from-device (practice log / settings) is still deferred (the read path is
in; needs a write-back FlashIo).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 07:29:30 -05:00
..
assets/bravura Add untracked notation deliverables (build/compile depend on these) 2026-06-02 13:46:45 -05:00
glyphgen Add untracked notation deliverables (build/compile depend on these) 2026-06-02 13:46:45 -05:00
pm-grid pm-grid: name the drive PM_G-1 + read set lists from it (on-device FAT) 2026-06-04 07:29:30 -05:00
pm-kit Preserve notation + grammar feature work (verified complete + green) 2026-06-02 13:45:26 -05:00
pm-ui Add untracked notation deliverables (build/compile depend on these) 2026-06-02 13:46:45 -05:00
track-format Preserve notation + grammar feature work (verified complete + green) 2026-06-02 13:45:26 -05:00
uisim Preserve notation + grammar feature work (verified complete + green) 2026-06-02 13:45:26 -05:00
.gitignore Add untracked notation deliverables (build/compile depend on these) 2026-06-02 13:46:45 -05:00
Cargo.toml Add pm-grid: Rust firmware for the Pico Scroll Pack (RP2040) 2026-06-03 07:22:48 -05:00
Containerfile Add pm-grid: Rust firmware for the Pico Scroll Pack (RP2040) 2026-06-03 07:22:48 -05:00
probe-flash.md rust: probe-flash.md — flash+defmt via Pi Debug Probe in a Silverblue toolbox 2026-06-01 08:49:02 -05:00
README.md Rust port Stage 1: track-format codec crate (passes the golden vectors) 2026-05-31 18:36:59 -05:00
run.sh pm-kit: defmt+probe-rs diagnostics + flip-link toolchain 2026-06-01 08:30:35 -05:00

Rust port — track-format crate (Stage 1)

Pure parse/serialize codec for the track DSL, validated against the shared golden vectors (tests/fixtures/track-format.json) — the third implementation alongside engine.js and app.py. See docs/rust-port.md for the staged plan.

All tooling runs in a container (per the develop-in-container rule):

./rust/run.sh            # cargo test — runs the conformance + idempotency suite
./rust/run.sh cargo build
./rust/run.sh bash       # interactive shell in the crate