Repository navigation
Description
Motivation
examples/AutoResearchLpc/AutoResearchLpc.ino exists today as a flash-budget workaround for the LPC845-BRK (64 KB flash). The root cause is fl::json's floating-point soft-FP bloat tracked by #3002 — once that's fully out of the JSON-RPC hot path, the main examples/AutoResearch/AutoResearch.ino sketch will fit on Low-memory targets too, and the LPC-specific sketch becomes pure duplication.
#3002 is partially in flight (some FP ops have already been pulled out). Once it lands fully, we should retire AutoResearchLpc.ino so we don't permanently maintain two bring-up sketches that drift apart.
Proposal
-
Add a low-memory mode to
examples/AutoResearch/AutoResearch.inobehind a compile flag (e.g.FASTLED_AUTORESEARCH_LOW_MEMORY=1) that conditionally compiles only the bring-up-critical RPC surface:echo— JSON-RPC round-tripFL_WARN_LIT— literal-only warn pipeline- WWDT arm + feed
pinToggleRx(FastLED feat(lpc): RX backend for LPC8xx via SCT input-capture — two-phase rollout #3021 Phase 1)ws2812SctTest(FastLED feat(lpc): RX backend for LPC8xx via SCT input-capture — two-phase rollout #3021 Phase 2, when DMA upgrade lands)probePair(if useful — currently lives on a sibling branch)
…and excludes the heavy LED-protocol matrix (RMT/PARLIO/SPI/LCD/ObjectFLED/FlexIO/etc.) that no Low-memory MCU has the peripherals for anyway.
-
Auto-set the flag for Low-memory targets. Detect via
FL_PLATFORM_HAS_TINY_MEMORY(the canonical macro from refactor(system): introduce FL_PLATFORM_HAS_*_MEMORY canonical names (closes #3000) #3019) and default-enable the low-memory mode when the target is below some threshold (≤ 128 KB flash, ≤ 16 KB SRAM — captures LPC8xx, ATmega328, ATtiny85, …). -
Update fbuild's
nxplpcorchestrator to point atAutoResearch.inoinstead ofAutoResearchLpc.ino, with the low-memory flag set. -
Delete
examples/AutoResearchLpc/in the same PR, along with its@filter board: lpc845brkdirective in the example discovery pipeline. -
Update
ci/autoresearch/phases.pyso the LPC bring-up dispatch uses the unified sketch — the_run_bring_up_tests,_run_lpc_pin_toggle_rx_tests, and (post-feat(lpc): RX backend for LPC8xx via SCT input-capture — two-phase rollout #3021 Phase 2)_run_lpc_ws2812_loopback_testspaths all stay the same since the RPC contract is identical.
Prerequisite
#3002 must be fully landed first — the LPC845 sketch must fit <FastLED.h> + fl::Remote + fl::Watchdog + the bring-up RPCs in 64 KB before the duplication can be removed.
Out of scope
- Reworking the RPC contract of either sketch (they're already aligned — the LPC sketch is a strict subset).
- Adding new platform support — this is a pure consolidation/cleanup.
References
examples/AutoResearchLpc/AutoResearchLpc.ino— the sketch to retireexamples/AutoResearch/AutoResearch.ino— the target merge destination- fl::json: replace double with templated fixed-point variant to drop libgcc soft-FP bloat on embedded #3002 — fl::json soft-FP cleanup (blocker)
- refactor(system): introduce FL_PLATFORM_HAS_*_MEMORY canonical names (closes #3000) #3019 —
FL_PLATFORM_HAS_*_MEMORYcanonical naming (provides the detection macro for the auto-enable) - feat(lpc): RX backend for LPC8xx via SCT input-capture — two-phase rollout #3021 — LPC SCT-RX (currently uses the LPC-specific sketch; will inherit the consolidation)
Filed via Claude Code agent ([email protected]).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(autoresearch): retire AutoResearchLpc.ino, fold into AutoResearc…
chore(platformio/lpc845brk): document build flags + default-on SCT+DM…