Repository navigation
Open
Description
DCMT and RLHT share board code by copying it, so every fix to the e-stop, watchdog, status LED or boot path has landed as a pair of PRs. This campaign:
- defines the shared behaviour in the BREADS standard;
- puts one implementation of it in
bread-slice-core; - moves both Slices onto it, with each move proven by host tests.
Decision and rationale: #2.
1. Standard (feastorg/bread-infra)
-
spec/firmware-layering.md: the layers (Slice firmware, core, contracts, CRUMBS, device libraries, standard), what may depend on what, the admission test for core, and how code moves into it. -
spec/slice/firmware.md: status LED states, e-stop sampling and boot behaviour, the watchdog latch, and serial console rules. Open points to settle in that PR:- e-stop polarity: the standard says an open chain means stop, while the firmware asserts on LOW with a pull-up;
- whether faults get their own LED colour;
- which outputs need defined levels from reset.
2. Library (new repo feastorg/bread-slice-core)
- Repo, MPL-2.0, and CI (host tests plus AVR builds for 328P and 4809): feat: add the e-stop, watchdog, status LED and parsing modules bread-slice-core#1.
- Registry publishing on tag. 0.1.0 was published by hand.
- v0.1.0 modules, each with host tests (feat: add the e-stop, watchdog, status LED and parsing modules bread-slice-core#1, released as v0.1.0):
- status LED (from refactor(firmware): drive the status LED without FastLED Slice_DCMT#55);
- e-stop sampling, debounce, count and boot wait;
- watchdog timer and latch;
- strict number parsing.
3. Migration (one PR per Slice, each passing that Slice's host tests unchanged)
- Add a host test suite that builds the real firmware against CRUMBS Slice_DCMT#58 Host test suite for DCMT. This gates the DCMT migration.
- test(firmware): add host tests that build the firmware against CRUMBS Slice_RLHT#56 Host test suite for RLHT. This gates the RLHT migration.
- refactor(firmware): move e-stop, watchdog and LED onto bread-slice-core Slice_DCMT#77 DCMT adopts
bread-slice-core, and its local copies go. refactor(firmware): drive the status LED without FastLED Slice_DCMT#55 is closed as replaced. - refactor(firmware): move e-stop, watchdog and LED onto bread-slice-core Slice_RLHT#57 RLHT adopts
bread-slice-core, and FastLED goes.
In both migrations test_status_led changed to read the core's LED frame in place of the FastLED stub; the other tests kept their checks. Neither migration has run on a board yet.
Related, tracked elsewhere
- Route serial and CRUMBS through one validated command path, behind host tests #3, the one-command-path epic: its strict parsing child is written in core; validate-and-apply stays per Slice.
- [Proposal] Define a common persistent-configuration contract for Slices bread-crumbs-contracts#61 (persistence): its record format and non-blocking writer become a core module once Route serial and CRUMBS through one validated command path, behind host tests #3's blockers clear.
- Automate PlatformIO dependency updates (Renovate?) #1 (Renovate): there will be a third shared library to keep pinned.
is_command_op()duplication: goes to CRUMBS as a has-handler query, not to core.- Safety epics Closed-loop modes can drive a motor further or faster than commanded Slice_DCMT#59 and Nothing bounds heater temperature but the setpoint and a working thermocouple Slice_RLHT#49 don't wait on this campaign.
Done when
- both specs are merged in bread-infra;
bread-slice-core0.1.x is published, with CI green on host tests and both AVR targets;- neither Slice contains its own copy of a core module;
- Where shared Slice board code lives (status LED driver first) #2 is closed.
Metadata
Metadata
Assignees
Labels
No labels
Activity
CameronBrooks11 commentedon Oct 21, 2026
One more requirement for the core's boot-wait module. Both Slices stamp the watchdog's last-receive time in
setupSlice(), then spend 1000 ms in the e-stop boot wait (DCMTmain.cpp:367-368and:233-235; RLHT:395-396and:229-231). A firmware built with*_WATCHDOG_BOOT_MSbelow about 1000, and with no bus traffic during boot, trips on its first loop pass, and the trip latches until cleared. The opt-in example uses 5000, so default builds are unaffected. The core should restamp the watchdog when the boot wait ends.refactor(firmware): move e-stop, watchdog and LED onto bread-slice-co…
test(firmware): add host tests that build the firmware against CRUMBS (…
refactor(firmware): move e-stop, watchdog and LED onto bread-slice-co…
docs(spec): add Slice firmware conventions and firmware layering (#18)