Repository navigation
Description
Meta tracking issue for the next two batches of LPC-port improvement after Stages 1 + 2a have shipped.
Where we are today
- Stage 1 shipped — fbuild bare-metal support for LPC804 + LPC845 (feat(platform): LPC804 + LPC845 bare-metal targets (Stage 1 of FastLED/FastLED#2836) fbuild#419, released as fbuild v2.2.18 on PyPI + GitHub).
- Stage 2a shipped — FastLED
src/platforms/arm/lpc/headers + bit-banged M0+ C++ clockless driver (feat(platform): LPC845 bit-bang clockless driver (Stage 2a of #2836) #2837, merged into master atebd87917). - Stage 2b tracked — LPC804 PLU clockless driver (feat(platform): LPC804 PLU clockless driver (Stage 2b of #2836) #2841).
- Stage 2c tracked — LPC845 SCT/PWM+DMA-to-GPIO clockless driver (feat(platform): LPC845 PWM+DMA-to-GPIO clockless driver (Stage 2c of #2836) #2842).
What we do not have yet: a board has actually run FastLED-output LEDs. Stage 1 ships a SystemInit stub that leaves LPC845 at the 12 MHz default IRC even though the board JSON advertises 30 MHz. Until that is fixed, the bit-bang cycle counts are off by 2.5x.
This issue groups what is next into two coherent batches so each can be reviewed and merged as a unit.
Stage 3 — Port completion (make it actually run on hardware)
Goal: take LPC845 from "headers exist, CI is continue-on-error: true" to "blinks WS2812 from a real LPC845 board via examples/Blink/Blink.ino, and fbuild CI is required."
Scope
- Real
SystemInitfor LPC845 — FRO 30 MHz + PLL config + flash wait states (UM11029 section 4). Currently a no-op stub infbuild/crates/fbuild-build/src/nxplpc/assets/startup_lpc845.S. Without this, the bit-bang timing macros that derive cycle counts fromF_CPU=30000000ULare wrong. - Real
SystemInitfor LPC804 — Leave at 15 MHz default unless PLL is needed for Stage 2b PLU clocking. Document the choice. - Vector table expansion — Current vectors ship the ARMv6-M 16-entry system minimum. Add peripheral IRQs as drivers need them (DMA-end IRQ for Stage 2c, SCT match IRQ for Stage 2c, USART RX for AutoResearch).
- Per-chip mcu_config split in fbuild —
get_nxplpc_configcurrently ignores themcuarg and returns shared config. Split when Stage 2b/2c land flag divergence (PLU defines for LPC804, SCT_PWM_DMA for LPC845). - Linker memory-layout verification on hardware — The
.ldfiles cite NXP datasheet memory regions but were not flashed. Verify on a real board (LPCXpresso845 or similar) before flipping CI to required. - AutoResearch.ino integration — Wire LPC845 USART0 into the existing
examples/AutoResearch/AutoResearch.inoRPC harness so live-device testing follows the same pattern as ESP32 / Teensy targets. The CLAUDE.md examples policy points hardware testing through AutoResearch. - fbuild CI flip — Drop
continue-on-error: truefrom.github/workflows/build-lpc804.ymlandbuild-lpc845.ymlonce a Stage 2a build is green end-to-end. Move workflows into the "required for release" group. validate_boards.pyreconciliation — Acceptance criterion from meta: port FastLED to NXP LPC8xx (LPC804 + LPC845) — two-stage plan #2836 said "include both boards." The current implementation skips them because there is no PlatformIO source fornxplpcplatform. Decide: either (a) write a fbuild-native validator that exercisesfbuild build lpc845, or (b) document the skip as intentional for non-PlatformIO platforms.
Stage 3 acceptance criteria
-
SystemInitfor LPC845 brings core clock to 30 MHz with correct flash wait states; verified by toggling a GPIO at a known rate and scope-measuring - WS2812 output verified on a real LPC845 board running
examples/Blink/Blink.ino(scope trace + LED visible) - AutoResearch.ino RPC harness brings up LPC845 over UART;
bash autoresearch lpc845 --simd(or equivalent) returns measurements -
validate_boards.pyeither coverslpc804/lpc845natively or has a documented skip with rationale - fbuild workflows
build-lpc804.ymlandbuild-lpc845.ymldropcontinue-on-error: true - At least one Stage 2 driver variant from {2a bit-bang, 2b PLU, 2c PWM+DMA} ships hardware-verified per chip
- LPC port added to FastLED platform support matrix doc
Stage 3 decisions
- Priority: P2 — until this lands, the Stage 1 + 2a merge is paper-only; CI green does not mean LEDs light up.
- Hardware required — this stage cannot be completed by AI agents alone. Needs maintainer / @phatpaul / community member with an LPCXpresso845 (or LPC824 Lite / LPC845 Breakout Board) and a scope.
- Order within Stage 3: SystemInit first (everything downstream depends on correct
F_CPU), then hardware blink, then AutoResearch, then CI flip.
Stage 4 — Family expansion + LED ecosystem coverage
Goal: broaden LPC support beyond LPC8xx and bring the LPC port to feature-parity with mature ports (Teensy LC / RP2040) by adding SPI strip support and multi-strip parallel output.
Scope
- LPC11xx port — Cortex-M0 family, popular hobbyist target with Arduino-IDE-compatible board packages (e.g. LPC1114 / LPC1115 from FRDM and breakout vendors). Reuses the M0 ASM template (
src/platforms/arm/common/m0clockless_asm.h, the same onenrf51uses). Lower-effort port: most of Stage 2a applies — onlyis_lpc.h,led_sysdefs_arm_lpc11.h,fastpin_arm_lpc11.hdiffer. Justification: LPC11U24 / LPC11U35 ship on the original mbed LPC1768 ecosystem boards that are still in use. - LPC15xx port — Cortex-M3, more capable, has SCT + PLU on some variants. M3 has barrel shifter, allows tighter clockless loops without the M0+ encoding constraints flagged in feat(platform): LPC845 bit-bang clockless driver (Stage 2a of #2836) #2837 PR description. Path: add a new
src/platforms/arm/lpc/clockless_arm_lpc15.hthat uses M3 ASM, or fall through to the shared M3 template if one exists. - APA102 / SK9822 SPI driver — LPC8xx and LPC15xx have hardware SPI peripherals. Add
src/platforms/arm/lpc/spi_arm_lpc.hso users running clocked strips do not have to bit-bang SPI. Pattern: copysrc/platforms/arm/kl26/clockless_block_arm_kl26.hSPI block or the STM32 SPI driver. - Multi-strip parallel output — LPC845 SCT can drive multiple match outputs concurrently. Combined with DMA-to-GPIO (Stage 2c foundation), one DMA stream can update multiple WS2812 chains synchronously. Architectural template: how the RP2040 PIO driver fans out across PIO state machines, or how the Teensy 4.x FlexIO driver runs parallel lanes.
- PlatformIO upstream donation — Once fbuild support is mature, donate the LPC8xx board JSON + linker scripts to the PlatformIO board-package community so users not on fbuild can build FastLED for these chips. (Not a hard requirement; nice-to-have for visibility.)
fl::set_*settings — If LPC users need clock-speed overrides or DMA-channel overrides, expose them throughFastLED.setX()per the CLAUDE.md "Public Settings Pattern."
Stage 4 acceptance criteria
- LPC11xx port lives in
src/platforms/arm/lpc/(orlpc11/) with M0 ASM-templated clockless driver - LPC15xx port exists with M3-class clockless driver
- APA102 SPI driver works on at least one LPC variant (LPC845 SPI0 verified)
- Multi-strip parallel output demonstrated on LPC845 (at least 2 strips synchronously from one DMA setup)
-
build-lpc11*.ymlandbuild-lpc15*.ymlCI workflows exist in fbuild and pass - At least one of LPC8xx or LPC15xx donated to upstream PlatformIO board catalogue (or rationale for not doing so documented)
Stage 4 decisions
- Priority: P3 — Stage 3 is a precondition; without a hardware-verified base port, expansion is premature.
- Order within Stage 4: LPC11xx first (highest community demand, simplest port), then APA102 SPI (orthogonal, high user value), then LPC15xx, then multi-strip (most novel, highest risk).
- PlatformIO donation gated on community interest — Do not invest the upstream review cycles unless users on non-fbuild toolchains are blocked.
- Multi-strip is a Stage 2c follow-on — Stage 2c (feat(platform): LPC845 PWM+DMA-to-GPIO clockless driver (Stage 2c of #2836) #2842) needs to land first for the PWM+DMA infrastructure to exist; multi-strip is a configuration extension on top.
Out of scope (deliberately)
- ESP32 / Teensy regressions from LPC patterns — Do not try to retrofit any LPC-discovered optimization onto other ports in this batch.
- PlatformIO replacement vs. coexistence — The fbuild-vs-PIO story is its own roadmap, tracked separately in FastLED/fbuild.
- Non-NXP M0+ family — Renesas, SiLabs, etc. have their own porting issues. This roadmap stays inside NXP LPC.
References
- Meta: meta: port FastLED to NXP LPC8xx (LPC804 + LPC845) — two-stage plan #2836 (Stages 1 + 2 plan)
- Origin discussion: Porting to LPC8xx #2831 (LPC8xx feasibility, datasheets, PLU/PWM references)
- Stage 1 (merged): feat(platform): LPC804 + LPC845 bare-metal targets (Stage 1 of FastLED/FastLED#2836) fbuild#419 — fbuild v2.2.18
- Stage 2a (merged): feat(platform): LPC845 bit-bang clockless driver (Stage 2a of #2836) #2837 — bit-bang clockless driver
- Stage 2b (open): feat(platform): LPC804 PLU clockless driver (Stage 2b of #2836) #2841 — LPC804 PLU driver
- Stage 2c (open): feat(platform): LPC845 PWM+DMA-to-GPIO clockless driver (Stage 2c of #2836) #2842 — LPC845 PWM+DMA driver
- NXP UM11029 (LPC84x User Manual) — SystemInit, SCT, DMA register references
- NXP UM11065 (LPC80x User Manual) — PLU register references
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(platform): real SystemInit for LPC804/845 + vector tables + per-…
feat(platform): LPC11xx (Cortex-M0) family detection scaffold (#2845) (…
zackees commentedon Jun 6, 2026
Stages 2b + 2c + 3 + LPC11xx scaffold all landed
All four
/clud-prsub-agent PRs squash-merged to main / master with admin override (per the "if builds are red let them be red" + "just merge it" directive). Hardware validation remains the gating step before any LPC build workflow flips offcontinue-on-error.Merged PRs
PR #2850 had to be rebased on master after #2848 landed (both modify
src/platforms/arm/lpc/fastled_arm_lpc.h); conflict resolved by nesting the LPC804 PLU include inside the bit-bang fallback branch so both opt-in paths coexist cleanly.Documented TODOs (not blocking merge, surfaced for hardware bring-up)
fbuild SystemInit / vector tables:
TODO(2845)— the FROOSCCTRL bit layout in UM11029 §4 needs device-on-hand validation; agent refused to fabricate magic constants. Current effective clock stays at 12 MHz IRC default, which means the FastLED bit-bang timing constants (derived fromF_CPU=30000000UL) are 2.5x off until this is filled in.cargo test -p fbuild-build --lib nxplpc(12 tests) all green.LPC804 PLU driver (#2848):
TODO(2841)markers covering: PLU base address cross-check vs CMSIS, SYSCON PLU clock bit, SCT/MRT timing source for PLU_IN1/IN2, SWM pin-assign helper, truth-table regeneration unit test,sendByte()NOP padding calibration.!CNT1(T0H), LUT1 =!(CNT0 & CNT1)(T1H), LUT2 = bit mux. Cited UM11065 §12.6.1–12.6.4 inline.LPC845 PWM+DMA driver (#2850):
TODO(2842)markers all keyed to UM11029 bit-position cross-checks (SYSAHBCLKCTRL0 §4.6.13, EVx_CTRL §16.6.21, DMAREQ0 §16.6.18, DMA CFG.HWTRIGEN §17.6.2, DMA-INMUX §17.6.1, etc.)FASTLED_LPC_PWM_DMA_CHUNK_BITS=64) so a 144-LED encode fits in 16 KB SRAM.<LPC845.h>typedefs win when the SDK header is present.LPC11xx detection scaffold (#2849):
FL_LPC11macro keyed on__LPC11xx__/CPU_LPC1114*/CPU_LPC1115*/CPU_LPC11U24*/CPU_LPC11U35*. Cortex-M0 (NOT M0+), soFL_IS_ARM_M0_PLUSdoes NOT apply.led_sysdefs_arm_lpc.h(introduceFL_IS_ARM_M0gate,F_CPU=48000000ULdefault),fastpin_arm_lpc11.h,clockless_arm_lpc11.h(usesm0clockless_asm.hM0 path, matches nRF51). Blocked at the scaffold stage by theprotect_platform_headers.pyhook.Stage 3 / Stage 4 items still outstanding
These remain open in this meta issue:
TODO(2845)instartup_lpc845.S::SystemInit.ldfiles cite datasheet but are unflashedvalidate_boards.pyreconciliation — decide between fbuild-native validator vs. documented skipcontinue-on-error: truefrombuild-lpc{804,845}.ymlled_sysdefs_arm_lpc.h+fastpin_arm_lpc11.h+clockless_arm_lpc11.hSuggested next move
examples/Blink/Blink.inoTODO(2845)and retestcontinue-on-error: falsein fbuild CIzackees commentedon Jun 6, 2026
Status update — code-only progress, hardware items pending
Closed #2836 because all of its Stages 1 + 2 code-only checkboxes shipped (Stage 1 via fbuild v2.2.18, Stage 2a via #2837, Stage 2b via #2848, Stage 2c via #2850).
Stage 3 — code-only progress vs. hardware-blocked
This stage's #2845 body explicitly states: "Hardware required — this stage cannot be completed by AI agents alone. Needs maintainer / @phatpaul / community member with an LPCXpresso845 (or LPC824 Lite / LPC845 Breakout Board) and a scope."
Marking what is and isn't shippable from a coding session without hardware:
SystemInitfor LPC845 (FRO 30 MHz + PLL + flash wait states)SystemInitfor LPC804continue-on-error: true-> required)validate_boards.pyreconciliationItems 1-4 + 8 are real code work in FastLED/fbuild, which is outside this repo's PR surface and outside what I can ship from a FastLED-repo session.
Stage 4 — what's shipped + what's tractable code-only
is_lpc.h). Full driver wiring (led_sysdefs,fastpin, M0 clockless) is a follow-up.is_lpc.h). Driver wiring follow-up.fl::set_*settingsWhat I can reasonably ship from this session
Recommendation for closing this meta
Items 5 + 7 (Stage 3) and items 3-6 (Stage 4) are not in scope for a code-only AI session. The natural close-out for #2845 is when the maintainer:
SystemInitclock (item 5).continue-on-error: trueto required (item 7).Marking my code-only contributions complete; the hardware + fbuild repo work remains for the maintainer.
Merge pull request #2859 from FastLED/feat/lpc15-detection-scaffold
feat(platform): LPC15xx (Cortex-M3) family detection scaffold
feat(platform/lpc): scope LPC8xx driver code to LPC8xx-only
feat(platform/lpc): wire LPC11Uxx + LPC15xx clockless drivers via sha…
zackees commentedon Jun 6, 2026
/clud-pr — Stage 4 items 1, 2, 3 shipped in PR #2872
Single combined PR landing the AI-shippable scope of this meta.
In #2872:
FL_LPC11split intoFL_LPC11_USB(modern GPIO, supported) +FL_LPC11_LEGACY(legacy GPIO,#erroruntil a separate fastpin lands). LPC11U24 / LPC11U35 reuse the LPC8xx fastpin + C++ clockless driver unchanged because UM10462 §9 confirms the same modern GPIO controller layout.FL_IS_ARM_M3inled_sysdefs_arm_lpc.h.spi_arm_lpc.hper UM11029 §"SPI". Master, MSB-first, mode 0, 8-bit; SPI0 default, SPI1 routable viapSPIXtemplate arg.Explicit deferrals (not in scope for one /clud-pr):
#errormakes the unsupported case loud rather than silently mis-encoding.fl::set_*settings) — Design-pending; no concrete user requirement yet.Recommendation
Once #2872 lands, close this meta and re-open the remaining work as standalone issues sized to their actual scope:
The meta as currently scoped mixes code-shippable items (4.1 / 4.2 / 4.3 — done) with hardware-gated items (all of Stage 3, 4.4) at incompatible scales. Splitting after the AI-shippable subset lands keeps each follow-on focused.
docs(platform/lpc): add cross-repo implementation map for #2845 roadmap
zackees commentedon Jun 6, 2026
/clud-pr — final disposition
What PR #2872 ships
All FastLED-repo work that can land in a single AI-driven PR without hardware:
FL_LPC11intoFL_LPC11_USB(supported) +FL_LPC11_LEGACY(#error), reuse the LPC8xx fastpin + C++ clockless because UM10462 §9 confirms identical GPIO controller layout.FL_IS_ARM_M3inled_sysdefs.spi_arm_lpc.hper UM11029 §"SPI".Why this PR cannot "finish" the meta
This meta covers 14 items across three repositories. The breakdown — now committed verbatim into
src/platforms/arm/lpc/README.mdso future maintainers and AI sessions don't have to rediscover it:platform-nxplpcdoes not exist; would be a brand-new PlatformIO platformThe 5 fbuild-repo items physically cannot land in a FastLED PR. The PlatformIO item is owned by a third party. That leaves 8 FastLED items, of which:
#errormakes the unsupported case loud)fl::set_*settings — the existing build-timeF_CPUdefine already covers the documented use case)The meta itself states verbatim: "Hardware required — this stage cannot be completed by AI agents alone. Needs maintainer / @phatpaul / community member with an LPCXpresso845 (or LPC824 Lite / LPC845 Breakout Board) and a scope."
Recommendation
After PR #2872 lands, split this meta into the issues that actually own the work:
fastpin_arm_lpc11_legacy.has its deliverable.FastLED/fbuild.platform-nxplpcupstream donation" — only worth opening once there is community demand from non-fbuild users.Closing the current meta and re-filing as four focused issues makes the work track its actual ownership, replaces the meta's misleading "14 unchecked checkboxes" surface with four issues that each have a real definition of done, and reduces the cognitive load on contributors picking up the work.
feat(platform/lpc): complete Stage 4 wiring for LPC11Uxx + LPC15xx + …
docs(platform/lpc): add family README
fix(platform/lpc): address CodeRabbit follow-ups on #2872 (#2876)
docs(platform/lpc): close meta #2845, add CI badges + per-repo follow…
chore(deps): bump fbuild 2.2.17 -> 2.2.18 (#2882)
feat(nxplpc): real USART0 HardwareSerial + 24 MHz F_CPU board config
docs(lpc): mark AutoResearch UART integration shipped + add hardware …
feat(platform/lpc): LPC11xx legacy clockless driver -- 0x50000000 mas…
feat(channels): add LPC DefaultBus<> specializations (#3450 B4) (#3451)
feat(lpc): widen spi_arm_lpc_dma.h gate to include LPC804 (#3499) (#3500