Repository navigation
Description
Goal
Find the commit (in FastLED, fbuild, or zackees/ArduinoCore-LPC8xx) that broke LPC845-BRK JSON-RPC echo, by bisection.
What we know
Last known-working baseline: 2026-06-13 ~17:40 PT -- FastLED commit 0968d55f28 (feat(autoresearch): wire LPC845-BRK bring-up harness into bash autoresearch). Its body claims direct verification:
"the three hardware capabilities (Serial.println, FastLED log pipeline, JSON-RPC echo) all work in isolation on the device -- proven by the JSON-RPC round-trip
TX params:[4242] -> RX result:4242plus FL_DBG emissionsrc/fl/remote/remote.cpp.hpp(151): Stored request ID for echoreaching COM10"
Current broken state: 2026-06-19 / 20 -- direct PowerShell [System.IO.Ports.SerialPort]::Open('COM20') returns 0 bytes in 6 seconds after a clean pyocd reset. The device transmits nothing.
Investigation plan
Phase 1: Confirm FastLED-side refactors did not regress the RPC dispatch path
Test ESP32-C6 (board already attached on COM9):
```bash
bash autoresearch esp32c6
```
- If echo round-trips -> FastLED's RPC refactor (perf(fl::function): Option B refactor -- single SBO + invoker + manager (#3235 Tier 1B, -9.2 KB Teensy 4) #3238, perf(rpc): non-template RuntimeRpcBinding dispatch on low-memory (#3246 Tier 1A) #3258, refactor(math): move JSON soft-FP bit-codec into fl/math/ + fl::number scaffold #3294) is sound across platforms. Bug is LPC-specific, almost certainly in
zackees/ArduinoCore-LPC8xx. Skip to Phase 2. - If echo fails on ESP32-C6 too -> regression is in FastLED's cross-platform RPC layer. Bisect
masterof FastLED instead. Suspect window: `0968d55f28..HEAD` on FastLED.
Phase 2: Bisect the LPC Arduino-core
The framework is referenced by URL only (no pinned commit) in zackees/platform-nxplpc-arduino's platform.json:
```json
"framework-arduino-lpc8xx": {
"type": "framework",
"optional": true,
"version": "https://github.com/zackees/ArduinoCore-LPC8xx.git"
}
```
So whatever commit was on the default branch at fetch time is what got cached. The currently-cached commit is 195a2eddd31eba8472ceaffa6a1a1902f72439ae (from ~/.fbuild/prod/cache/platforms/zackees-ArduinoCore-LPC8xx/2cdca7de542bef71/0.1.0+g195a2ed/).
To bisect, add a platform_packages override to [env:lpc845brk] in platformio.ini:
```ini
platform_packages =
framework-arduino-lpc8xx@https://github.com/zackees/ArduinoCore-LPC8xx.git#
```
Sanity check that bisection works: fbuild's cache key uses <commit-sha> -- a fresh path under ~/.fbuild/prod/cache/platforms/zackees-ArduinoCore-LPC8xx/<hash>/<version>+g<short-sha>/ must appear on each bisect step. If fbuild reuses the OLD cached subdir despite a new commit pin, the bisect produces false results.
```bash
Before each bisect step:
ls ~/.fbuild/prod/cache/platforms/zackees-ArduinoCore-LPC8xx/
Should show a new dir per commit. If not, file a follow-up bug against fbuild.
```
Arduino-core LPC8xx commits since the working baseline (descending by datestamp)
| Commit | Date (UTC) | Title | Bisect bucket |
|---|---|---|---|
da8f2b8b42bed0d89f5e3f9d680a1832b5b4fa98 |
2026-06-20 00:37 | fix(startup): override HardFault_Handler with sync-emit + reboot (#31) | This session; safe -- only fault handler |
195a2eddd31eba8472ceaffa6a1a1902f72439ae |
2026-06-13 22:23 | perf(linker): pack libgcc __aeabi_fdiv into pre-CRP gap (0xC0..0x2FC) (#29) | HIGHEST SUSPICION -- linker-script change touching CRP region |
867089d10c14994d1748a7eaba6731542cbb8201 |
2026-06-13 22:07 | fix(linker): discard .ARM.exidx -- M0+ does not unwind (#28) | High -- linker section change |
ec72e00584b30a124aae3022894ece4e8b9d6dc8 |
2026-06-13 21:57 | perf(Wire,SPI): convert globals to trivial proxy + function-local-static impl (#27) | High -- static-init order change |
c9cbc054d2ddf675a9c1806ce20e08d3fa215e36 |
2026-06-13 21:26 | perf(lpc8xx): collapse operator delete variants to a single free thunk (#26) | Low |
77b20dfc9bf247cb9669e5d288aae298859b6d05 |
2026-06-13 21:22 | fix(lpc8xx): drop unsigned long operator new overloads (32-bit ABI) (#25) | Low |
33212f005889effb63ceb491d3ff234e1b9a728e |
2026-06-13 21:17 | fix(lpc845): complete bring-up gaps (operator new, .ARM.exidx, heap base, F_CPU) (#24) | HIGH -- touches F_CPU; could mis-set USART BRG |
3ec71c5498c21d17033cc8c4a48daf84e4b2733b |
2026-06-13 14:53 | Merge pull request #22 from zackees/fix/lpc845-serial-clock-pins | -- |
4560e6c41dd2c49e8b27aeed77d3abc5098eb488 |
2026-06-13 14:49 | fix(lpc845): correct SYSCON map, USART0 func clock, FRO_DIRECT, VCOM pins | Baseline (working) |
a00864bbce48194b9c8d0b81d9f7ce5d5a48abc6 |
2026-06-12 18:37 | Builds and runs without hardfault (#20) | Baseline (working) |
Bisect order (binary search the 7 commits between #24 inclusive and HEAD)
Mid-point first. Commits in window: #24, #25, #26, #27, #28, #29, #31 (linear).
- Pin to Tweak "yellow" (and "aqua") HSV colors #27 (
ec72e00584) -- midpoint.- If echo round-trips -> bug is in SAM D20 Support #28 or FastLED with avr/sleep.h #29 (linker changes).
- If echo fails -> bug is in Compiling error on ATmega32u2 #24, Flora support (8MHz ATmega32U4) #25, LPD8806 low-bit handling #26, or Tweak "yellow" (and "aqua") HSV colors #27 (early gap-fix changes).
- Continue binary-narrowing per result.
- When narrowed to a single commit -> revert in a fresh Arduino-core PR, re-test, file fix on the LPC side.
Top-3 priors (if budget runs out before binary search completes)
- FastLED with avr/sleep.h #29
195a2eddd3(pre-CRP linker pack) -- riskiest; revert this first. - Tweak "yellow" (and "aqua") HSV colors #27
ec72e00584(Wire/SPI globals -> function-local-static) -- changes static-init order; could leaveSerialun-initialized when bring-up references it. - SAM D20 Support #28
867089d10c(discard .ARM.exidx) -- if any LPC8xx code accidentally references the discarded section, link order shifts and the vector table or HardFault handler could end up at the wrong address.
Refs
- [BLOCKER] LPC845-BRK AutoResearch bring-up echo returns empty RX (suspected HardFault) — blocks #3102 #3300 -- bring-up echo silence (this issue's root cause investigation).
- [BUG-LPC] Serial.println / fl::println silent on LPC845-BRK -- Serial.print works fine (blocks #3300) #3313 -- LPC
Serial.printlnworkaround (fixed in PR fix(platforms/lpc): work around Serial.println silent-drop on LPC8xx (closes #3313) #3314; not the root cause). zackees/ArduinoCore-LPC8xx#31-- HardFault override (merged; not the root cause).0968d55f28-- last verifiably-working FastLED commit for LPC bring-up.
Filed from /clud-fix session continuing #3208 meta. ESP32-C6 sanity check + bisection in flight.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(lpc): unblock LPC PIO build — drop C++14 digit separators + force…
fix(lpc): unblock LPC PIO build — drop C++14 digit separators + force…
feat(nxplpc): honor platform_packages override for ArduinoCore-LPC8xx (…
feat(packages): hoist platform_packages override into PackageBase
feat(packages): hoist platform_packages override into PackageBase (#683)
zackees commentedon Jun 20, 2026
Update — bisection axis is wrong; real bug is FastLED-side and platform-agnostic
After running the PIO-side bisection on this branch (
bisect/3325-aclpc), the findings invalidate this issue's framing. The ArduinoCore-LPC8xx commit window is not the regression axis. Documenting here so the next person doesn't repeat the work.What the bisection actually showed
Pinned
framework-arduino-lpc8xxto two endpoints of the suspect window, viaplatform_packagesin bothci/boards.py(forbash compile) and rootplatformio.ini(forbash autoresearch):4560e6c41d(baseline, "working" per this issue's table)5d18212873Method not found: echo❌da8f2b8b42(HEAD = #31)5d18212873Method not found: echo❌Both endpoints fail identically. No commit in the ACLPC window is the variable.
Why we previously thought the device was silent
The "0 bytes in 6 seconds after a clean pyocd reset" in the original report was a PowerShell
[System.IO.Ports.SerialPort]::Open()methodology bug. The LPC11U35 USB-VCOM bridge requiresDtrEnable=true+RtsEnable=trueto gate data through. Without those properties set, the host sees zero bytes even though the LPC845 is transmitting normally.bash autoresearch(viaci/util/serial_interface.py:_pyserial_dtr_reset) sets these correctly — only the ad-hoc probes were broken.With DTR/RTS enabled the LPC845-BRK has been responding the whole time. Sample output from the baseline ACLPC pin:
This is the same error envelope ESP32-C6 returns. Both platforms exhibit the bug identically.
Where the bug actually lives
autoResearchLowMemorySetup()(examples/AutoResearch/AutoResearchLowMemory.h:158) callsremote.bind("echo", lambda).src/fl/remote/rpc/rpc.cpp.hpp:118-122) callsmRegistry.find(methodName)and misses.mRegistryisfl::unordered_map<fl::string, RpcEntry>— a real hash map, not fixed-capacity. The bind path looks structurally correct on source review. Reason for the runtime miss is not yet isolated.Top FastLED-side suspects (in
git log 0968d55f28..masteragainstsrc/fl/remote/):581bb2a202—perf(rpc): non-template RuntimeRpcBinding dispatch on low-memory targets (#3246 / #3258)— straight revert blocked by downstream commits modifyingruntime_rpc_binding.{h,cpp.hpp}.1aa1e6a345—refactor(rpc): rename envelope markers __async/__skip → ackOnly/noEnqueue (#3228).e18aa2bbdf—perf(rpc): gate rpc.discover + revert SBO bump to fix LowMemory build regression (#3081).da59e86e24—Migrate logging macros to printf style (#3190).Bonus bug en passant — LPC845-BRK runs in LARGE_MEMORY mode
~/.platformio/packages/framework-arduino-lpc8xx/variants/lpc845brk/variant.honly definesVARIANT_BOARD_LPC845BRK 1. It does not defineLPC845/__LPC845__/LPC845M301, which is whatsrc/platforms/arm/lpc/is_lpc.h:28-30keysFL_IS_ARM_LPC_845off of. Detection silently fails →FL_IS_ARM_LPCundefined →FL_PLATFORM_HAS_LARGE_MEMORY = 1on a 16KB-SRAM part. The TypedInvoker path (~2.1 KB/sig) is active instead of the RuntimeRpcBinding path. Tracking separately — likely fixed upstream inzackees/ArduinoCore-LPC8xx's variant headers.This means LPC has been running the LARGE_MEMORY code path (same as ESP32-C6) which is consistent with both platforms showing the identical error.
Recommended next steps
Remote::bindregistration not visible toRpc::handledispatch — both LARGE_MEMORY platforms (LPC, ESP32-C6) fail identical." I'll add a host unit test (tests/fl/remote/test_echo_bind_dispatch.cpp) that mirrors the AutoResearch bind+dispatch path — if it fails on host, we have a fast reproducer.LPC845M301(or equivalent canonical macro) tovariants/lpc845brk/variant.h, restoringFL_IS_ARM_LPC_845→ LowMemory mode → ~2 KB flash savings.Branch
bisect/3325-aclpchas the diagnostic edits reverted; it can be deleted once this comment is acknowledged.cc'ing for awareness in case anyone is mid-bisect on the ACLPC axis — please pause and read this thread first.
fix(autoresearch/lpc): assert DTR=True + VID:PID port detection (#3300)…