Repository navigation
fix(lpc): derive AutoResearch WS2812 loopback from platform - #3209
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRetires the ChangesRetire FASTLED_LPC_RX_SCT_WS2812 and platform-derive the WS2812 loopback gate
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ci/autoresearch/phases.py`:
- Around line 1273-1276: The `--ws2812-loopback` flag check before calling
`_run_lpc_ws2812_loopback_tests` does not verify that the target environment is
specifically LPC845, allowing non-LPC845 platforms like lpcxpresso804 to reach
the function where the firmware has no RPC binding for ws2812SctTest, causing
late failures. Add a guard condition to validate the environment is LPC845
(check for FL_IS_ARM_LPC_845 or appropriate platform predicate) in the
conditional block that gates the call to `_run_lpc_ws2812_loopback_tests`,
ensuring the check fails fast. Apply the same fix at lines 1906-1907 where
similar logic exists.
In `@platformio.ini`:
- Line 170: Pin the platform-nxplpc-arduino repository URL from its floating
branch tip to a fixed reference (tag or commit hash) to ensure deterministic and
reproducible builds. Update all instances of the nxplpc platform URL in
platformio.ini (lines 170, 194, 199, 204, and 209 where the platform URL is
specified for LPC environments) and the _NXPLPC_PLATFORM variable in
ci/boards.py to use the same fixed ref instead of resolving from a floating
branch. This prevents upstream drift and makes both CI and non-CI builds
deterministic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a07b93d8-4604-47b8-8238-f6bb4191ee41
📒 Files selected for processing (7)
ci/autoresearch/args.pyci/autoresearch/phases.pyci/autoresearch/test_lpc_ws2812_loopback.pyci/boards.pyexamples/AutoResearch/AutoResearchLowMemory.hplatformio.inisrc/platforms/arm/lpc/led_sysdefs_arm_lpc.h
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ci/autoresearch/phases.py`:
- Around line 1267-1270: The `lpc845` environment is added to the
`bring_up_envs` set at line 1267 with a case-insensitive comparison (using
.lower()), but the build/deploy branch around line 940 performs a case-sensitive
check that excludes `lpc845`. Locate the build/deploy branch logic around line
940 that handles environment routing and update it to include `lpc845` or apply
the same case-insensitive comparison pattern (using .lower()) consistently with
line 1267. This ensures `lpc845` is routed through the correct deploy path
regardless of how it's cased in the final_environment variable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c1973e31-eefd-43ff-b8b5-dea702db8be9
📒 Files selected for processing (3)
ci/autoresearch/phases.pyci/boards.pyplatformio.ini
🚧 Files skipped from review as they are similar to previous changes (2)
- ci/boards.py
- platformio.ini
Summary
Fixes #3128.
Updates #3208.
Retires the user-facing
FASTLED_LPC_RX_SCT_WS2812opt-in. The LPC845 AutoResearch low-memory sketch now derives the WS2812 loopback surface fromFL_IS_ARM_LPC_845, auto-enables the SCT DMA capture path for that surface, and bindsws2812SctTestwithout a manual build flag.This also promotes two LPC buildability fixes needed to validate the cleanup from clean
master:ci/boards.pywith the concretezackees/platform-nxplpc-arduinoURL;LPC845.h/LPC804.hfrom FastLED's LPC sysdefs because the ArduinoCore-LPC8xx PlatformIO package exposes only the active variant include directory.Validation
rg -n "FASTLED_LPC_RX_SCT_WS2812" src examples ci platformio.inireturns no matches.bash compile lpc845brk --examples AutoResearch --backend platformionow resolves the LPC platform and compiles through to link; GCC 8.2.1 overflows by 2200 bytes, which is the known old-toolchain flash-size limit rather than a missing RPC gate..build/pio/lpc845brk/.fbuild/build/release/firmware.binat 63,984 bytes.pc = 0x0000d9f6,sp = 0x10003e78.echoreturnedREMOTE: {"id":1,"result":4242,"jsonrpc":"2.0"}ws2812SctTestreturnedREMOTE: {"id":2,"result":"0,0,1,3,0,0,3,0","jsonrpc":"2.0"}The WS2812 response proves the RPC is bound without the retired
FASTLED_LPC_RX_SCT_WS2812build flag. The nonzero mismatch payload is the existing SCT capture/loopback behavior tracked by the hardware bench meta, not a method-registration failure.Summary by CodeRabbit
New Features
Improvements
--ws2812-loopbackhelp text updated, and the option is now accepted only for supported LPC845-related environments with a clear failure message otherwise.Documentation