Repository navigation
feat(autoresearch): retire AutoResearchLpc.ino, fold into AutoResearch.ino low-memory mode (closes #3030) - #3041
Conversation
…h.ino low-memory mode (closes #3030) Phase 2 of FastLED #3022 (integer-only IEEE 754 codec, PR #3038) freed up enough flash on LPC845-BRK that the soft-FP cascade no longer blocks the main AutoResearch sketch. Per #3030 we consolidate so we do not maintain two bring-up harnesses that drift apart. Layout: * `examples/AutoResearch/AutoResearchLowMemory.h` -- new header that holds the JSON-RPC echo + SCT-RX bring-up surface inherited from the retired LPC sketch (echo, pinToggleRx, ws2812SctTest). Same RPC contract; CSV column order preserved so the Python orchestrator (test_lpc_pin_toggle_rx and test_lpc_ws2812_loopback) keeps working as-is. * `examples/AutoResearch/AutoResearch.ino` -- gated at the top with `FASTLED_AUTORESEARCH_LOW_MEMORY`. Auto-defines to 1 when `FL_PLATFORM_HAS_LARGE_MEMORY == 0` (covers LPC8xx + classic Low-tier parts per FastLED #3000). In low-memory mode the main body is short-circuited and we just call `autoResearchLowMemorySetup()` / `autoResearchLowMemoryLoop()`. * `examples/AutoResearchLpc/` -- deleted. The board filter for `lpc845brk` / `lpcxpresso845max` / `lpcxpresso804` moves onto the consolidated `AutoResearch.ino`'s `@filter` directive. * `ci/autoresearch/phases.py` -- removes the bring-up-env sketch dispatch; always points at `examples/AutoResearch/`. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR consolidates the standalone ChangesAutoResearch Low-Memory Consolidation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…sign-off checklist (closes #2880) (#3042) Stage 3.6 of #2845 is no longer hardware-gated -- PR #3041 retired AutoResearchLpc.ino into the main AutoResearch.ino low-memory mode (auto-engaged on LPC8xx via FL_PLATFORM_HAS_LARGE_MEMORY == 0). The JSON-RPC contract (echo / pinToggleRx / ws2812SctTest) is identical to what the standalone sketch shipped. Stage 3.5 (linker memory-layout verification on real silicon) still needs hardware sign-off, but every code-side prerequisite has shipped and the no-soft-FP invariant from #3038 puts the LPC845 flash budget back inside 64 KB. Adds a five-bullet sign-off checklist a community maintainer can walk to close out #2880 with field evidence. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
… sketch retirement) (#3043) Phase 3 of FastLED #3035 (decoder consolidation across the four EdgeTime-based RX backends + AutoResearchLpc.ino retirement) is now shipped end-to-end: * #3037 split the shared 4-phase WS2812 decoder into `src/fl/channels/rx/decode_ws2812.{h,cpp.hpp}` so the LPC SCT-RX and native paths share one implementation. * #3041 folded `examples/AutoResearchLpc/AutoResearchLpc.ino` into the main `examples/AutoResearch/AutoResearch.ino` low-memory mode (auto-engaged on FL_PLATFORM_HAS_LARGE_MEMORY == 0). * The `ci/autoresearch/phases.py` orchestrator dispatch updated to point at the unified sketch as part of #3041. What remains in #3035 are Phases 1, 2a, 2b -- the hardware bench validation work that needs real LPC845-BRK silicon + scope. That hardware sign-off is shared with the #2880 checklist now in `src/platforms/arm/lpc/README.md`. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
… driver header (#3044) #2879 asked for multi-strip parallel WS2812 output on LPC845 via shared SCT timebase + DMA. The issue is gated on Stage 2c (v1 single-strip DMA path) hardware verification (#2880 sign-off), but the design space is bounded and well-understood. This commit lands the extension sketch directly inside `clockless_arm_lpc_pwm_dma.h` so the follow-up PR can drop straight in once the bench is open -- no rediscovery cost. Five concrete items captured: 1. LANE_COUNT template parameter, default 1 (v1 ABI preserved). 2. DMA channel sharing -- same 3 channels, descriptor chain per lane. 3. Encode pass O(LANE_COUNT * leds), DMA time unchanged. 4. Pin constraints unchanged from v1 (GPIO port 0 only). 5. Test harness lands in examples/AutoResearch/AutoResearch.ino low-memory mode (post FastLED #3041 consolidation) next to the existing `ws2812SctTest` RPC. Architectural template references already in the prior comment (RP2040 PIO, Teensy 4.x FlexIO). Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
…mory.h (#3041 follow-up) (#3047) PR #3041 retired AutoResearchLpc.ino into a header on the AutoResearch side, but the LPC sketch's patterns (Serial.begin, deep platform include, function-local static fl::Remote) tripped the example-side lint: * ExampleSerialChecker -- `Serial.begin(115200)` -> `fl::serial_begin(115200)` so the HWCDC-safe wrapper from #2669 (setTxTimeoutMs=0 + guarded flush + host-presence skip) is what runs on the LPC845 USART link instead of the raw HardwareSerial path. * PlatformIncludesChecker -- the `#include "platforms/arm/lpc/is_lpc.h"` is intentional (the RX SCT driver only exists on real LPC builds; the example DLL host-stub still has to compile this header). Suppressed inline with `// ok platform headers - LPC RX driver gate`. * StaticInHeaderChecker -- `static fl::Remote remote(...)` inside `autoResearchLowMemorySetup()` lifts to a single shared instance via the inline-ODR rule, which is the intended behavior. Suppressed with the canonical `// okay static in header` marker the checker recognises. `bash lint --cpp` is clean after this commit. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
…A driver (#3057) Three updates to the env:lpc845brk block: 1. Replaces the stale `examples/AutoResearchLpc/` dispatch comment with the consolidated `examples/AutoResearch/` (low-memory mode auto- engages on LPC8xx via FL_PLATFORM_HAS_LARGE_MEMORY == 0; FastLED #3030 / #3041). 2. Expands the build_flags comment block to document each flag's role: `-DRELEASE` (FL_DBG no-op), `-DFASTLED_LPC_PWM_DMA=1` (hardware SCT+DMA driver), `-DFASTLED_LPC_RX_SCT_WS2812=1` (commented-out loopback RPC binding; pulls <FastLED.h> and currently exceeds the 64 KB flash budget by ~7.5 KB without further reduction work). 3. Default-enables the hardware-accelerated SCT+DMA WS2812 driver (`-DFASTLED_LPC_PWM_DMA=1`) plus the low-memory autoresearch mode (`-DFASTLED_AUTORESEARCH_LOW_MEMORY=1`). The bit-bang driver is still available with `build_unflags = -DFASTLED_LPC_PWM_DMA=1` per the LPC README's "Optional feature defines" section. This makes the canonical LPC845-BRK target exercise the hardware driver path that most users will want for production WS2812 output. The previously parked `feat/lpc845-sct-dma-dev-unblock` developer branch carried this change alongside a `[tool.uv.sources]` local fbuild override that is no longer needed (PyPI 2.2.28 has the LPC delegation). Splitting the developer override out lets the env config land on master while the override is dropped. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Summary
Closes #3030. PR #3038 (integer-only IEEE 754 codec, FastLED #3022 phase 2) freed up enough flash on LPC845-BRK that the soft-FP cascade no longer blocks the main
AutoResearch.ino. Consolidate the two harnesses so we do not maintain duplicate bring-up sketches that drift apart.Changes
examples/AutoResearch/AutoResearchLowMemory.h— the LPC bring-up RPC surface (echo,pinToggleRx,ws2812SctTest) extracted from the retired sketch. Same JSON-RPC contract; CSV column order preserved soci/autoresearch/test_lpc_pin_toggle_rx.pyandtest_lpc_ws2812_loopback.pykeep working unchanged.examples/AutoResearch/AutoResearch.ino— gated at the top withFASTLED_AUTORESEARCH_LOW_MEMORY; auto-defines to 1 whenFL_PLATFORM_HAS_LARGE_MEMORY == 0(covers LPC8xx + classic Low-tier parts per FastLED Rename SKETCH_HAS_*_MEMORY macros to FL_PLATFORM_HAS_*_MEMORY #3000). Low-memory mode short-circuits the heavy LED-protocol matrix and just callsautoResearchLowMemorySetup()/autoResearchLowMemoryLoop(). Addedlpc845brk,lpcxpresso845max,lpcxpresso804to the@filter require: board:directive; droppedexclude: memory: low.examples/AutoResearchLpc/AutoResearchLpc.ino— deleted.ci/autoresearch/phases.py— removed the bring-up-env sketch dispatch; always points atexamples/AutoResearch/.Test plan
bash autoresearch lpc845brk --bring-upcompiles + flashes + reportsechoround-trip OK on a real LPC845-BRK (hardware verification deferred per hardware: bring up LPC845 + WS2812 + AutoResearch UART (Stages 3.5, 3.6 from #2845) #2880).bash autoresearch esp32s3 --allstill works (large-memory path unchanged behind the gate).🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores