Repository navigation
Description
TL;DR
bash autoresearch <board> is FastLED's end-to-end "build + flash + reset + monitor + bring-up RPC test" pipeline. The build and flash halves use fbuild; the bring-up test half is Python that lives only on the FastLED side. As a result:
- Any other firmware project that wants the same end-to-end sanity test has to reinvent the Python wrapper.
- The split makes the boundary between "fbuild's responsibility" and "FastLED's responsibility" hard to reason about — autoresearch dips into both freely.
- New board ports require parallel updates in two repos to wire up the bring-up flow.
This issue requests promoting the bring-up orchestrator to a first-class fbuild command: fbuild bringup <board> or fbuild autoresearch <board> (name TBD).
Why this matters
FastLED bash autoresearch lpc845brk today does:
- Build firmware → fbuild.
- Resolve VCOM port by VID:PID → FastLED
ci/util/port_utils.py. - Flash via pyocd → FastLED (shells out to pyocd CLI).
- Reset → FastLED (shells out to pyocd).
- Open monitor with DTR/RTS=True → FastLED
ci/util/pyserial_monitor.py. - Drain boot banner → FastLED
ci/autoresearch/phases.py. - Send JSON-RPC echo → FastLED.
- Validate 3-way
(remote_ok, log_ok, echo_ok)→ FastLED. - Report → FastLED.
Steps 2-9 should live in fbuild. The application-specific echo sentinel (4242) and the "what does pass mean" predicate can stay as plug-ins / callbacks from the caller; the orchestration machinery is generic.
Proposed shape
$ fbuild bringup lpc845brk --rpc-method echo --rpc-payload '[4242]' --expect-result 4242
🔨 Build: fbuild build lpc845brk → 53.85KB / 64KB
🔌 Port: VID:PID 16C0:0483 → COM20
📡 Flash: pyocd flash --target lpc845 → 60416 bytes / 3.10 kB/s
🔄 Reset: sw reset → resumed
👂 Monitor: COM20 @ 115200, DTR=True → 8s drain
📨 RPC: {"method":"echo","params":[4242]}
{"result":4242} ✓
✅ BRING-UP PASSED (3.7 s)
FastLED's bash autoresearch becomes a one-line shell that calls fbuild bringup with the right per-board defaults. Per-board defaults live in board JSON (echo method, sentinel, expected-result predicate).
Acceptance criteria
-
fbuild bringupsubcommand exists infbuild-cli. - Pluggable RPC method / payload / expected-result via CLI flags.
- Per-board defaults loaded from board JSON
bringup.{method, payload, expected_result}. - FastLED's
bash autoresearchmigrated to a thin wrapper. - Same output shape on success and failure (3-way
remote_ok/log_ok/echo_oktuple).
Refs
- FastLED/fbuild#686 —
serial_probeCLI. Bring-up uses the same primitives. - FastLED/fbuild#687 —
BoardFamily. Bring-up consults it for reset method. - FastLED/fbuild#691 — handoff timing. Bring-up consumes it.
- FastLED/FastLED#3339 — the LPC bring-up incident. Demonstrates how scattered the responsibility was; this issue consolidates it.
Filed from the audit fan-out on FastLED/FastLED#3339.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
feat(cli): fbuild bringup orchestrator scaffold (#697) (#711)
feat(serial): rpc_validate — typed JSON-RPC schema validator (#698) (#…