Skip to content

meta: LPC dev roadmap — Stages 3 + 4 (port completion, family expansion) #2845

Closed

Description

@zackees

Meta tracking issue for the next two batches of LPC-port improvement after Stages 1 + 2a have shipped.

Where we are today

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

  1. Real SystemInit for LPC845 — FRO 30 MHz + PLL config + flash wait states (UM11029 section 4). Currently a no-op stub in fbuild/crates/fbuild-build/src/nxplpc/assets/startup_lpc845.S. Without this, the bit-bang timing macros that derive cycle counts from F_CPU=30000000UL are wrong.
  2. Real SystemInit for LPC804 — Leave at 15 MHz default unless PLL is needed for Stage 2b PLU clocking. Document the choice.
  3. 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).
  4. Per-chip mcu_config split in fbuild — get_nxplpc_config currently ignores the mcu arg and returns shared config. Split when Stage 2b/2c land flag divergence (PLU defines for LPC804, SCT_PWM_DMA for LPC845).
  5. Linker memory-layout verification on hardware — The .ld files cite NXP datasheet memory regions but were not flashed. Verify on a real board (LPCXpresso845 or similar) before flipping CI to required.
  6. AutoResearch.ino integration — Wire LPC845 USART0 into the existing examples/AutoResearch/AutoResearch.ino RPC harness so live-device testing follows the same pattern as ESP32 / Teensy targets. The CLAUDE.md examples policy points hardware testing through AutoResearch.
  7. fbuild CI flip — Drop continue-on-error: true from .github/workflows/build-lpc804.yml and build-lpc845.yml once a Stage 2a build is green end-to-end. Move workflows into the "required for release" group.
  8. validate_boards.py reconciliation — 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 for nxplpc platform. Decide: either (a) write a fbuild-native validator that exercises fbuild build lpc845, or (b) document the skip as intentional for non-PlatformIO platforms.

Stage 3 acceptance criteria

  • SystemInit for 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.py either covers lpc804/lpc845 natively or has a documented skip with rationale
  • fbuild workflows build-lpc804.yml and build-lpc845.yml drop continue-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

  1. 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 one nrf51 uses). Lower-effort port: most of Stage 2a applies — only is_lpc.h, led_sysdefs_arm_lpc11.h, fastpin_arm_lpc11.h differ. Justification: LPC11U24 / LPC11U35 ship on the original mbed LPC1768 ecosystem boards that are still in use.
  2. 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.h that uses M3 ASM, or fall through to the shared M3 template if one exists.
  3. APA102 / SK9822 SPI driver — LPC8xx and LPC15xx have hardware SPI peripherals. Add src/platforms/arm/lpc/spi_arm_lpc.h so users running clocked strips do not have to bit-bang SPI. Pattern: copy src/platforms/arm/kl26/clockless_block_arm_kl26.h SPI block or the STM32 SPI driver.
  4. 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.
  5. 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.)
  6. fl::set_* settings — If LPC users need clock-speed overrides or DMA-channel overrides, expose them through FastLED.setX() per the CLAUDE.md "Public Settings Pattern."

Stage 4 acceptance criteria

  • LPC11xx port lives in src/platforms/arm/lpc/ (or lpc11/) 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*.yml and build-lpc15*.yml CI 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

Activity

  1. zackees commented on Jun 6, 2026

    @zackees
    MemberAuthor

    Stages 2b + 2c + 3 + LPC11xx scaffold all landed

    All four /clud-pr sub-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 off continue-on-error.

    Merged PRs

    PR Repo Scope Files LOC
    fbuild#420 fbuild LPC8xx SystemInit + 44/48-entry vector tables + per-chip mcu_config split 3 +468/-46
    #2848 FastLED LPC804 PLU clockless driver (Stage 2b, closes #2841) 3 +415/-2
    #2849 FastLED LPC11xx (Cortex-M0) family detection scaffold 1 +32/-7
    #2850 FastLED LPC845 PWM+DMA-to-GPIO clockless driver (Stage 2c, closes #2842) 2 +601/-4

    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:

    • LPC845 FRO-to-30 MHz reconfiguration left as 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 from F_CPU=30000000UL) are 2.5x off until this is filled in.
    • Per-chip mcu_config split is in place; cargo test -p fbuild-build --lib nxplpc (12 tests) all green.

    LPC804 PLU driver (#2848):

    • 6 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.
    • LUT graph: LUT0 = !CNT1 (T0H), LUT1 = !(CNT0 & CNT1) (T1H), LUT2 = bit mux. Cited UM11065 §12.6.1–12.6.4 inline.

    LPC845 PWM+DMA driver (#2850):

    • 10 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.)
    • Design: SCT 16-bit unified counter @ 30 MHz tick = 33.33 ns; 3 DMA channels (SET on rising edge, CLR-conditional for "0" at T0_FALL, CLR-conditional for "1" at T1_FALL); chunked streaming (default FASTLED_LPC_PWM_DMA_CHUNK_BITS=64) so a 144-LED encode fits in 16 KB SRAM.
    • CMSIS shim structs guarded so <LPC845.h> typedefs win when the SDK header is present.

    LPC11xx detection scaffold (#2849):

    • Adds FL_LPC11 macro keyed on __LPC11xx__ / CPU_LPC1114* / CPU_LPC1115* / CPU_LPC11U24* / CPU_LPC11U35*. Cortex-M0 (NOT M0+), so FL_IS_ARM_M0_PLUS does NOT apply.
    • Follow-up needed: led_sysdefs_arm_lpc.h (introduce FL_IS_ARM_M0 gate, F_CPU=48000000UL default), fastpin_arm_lpc11.h, clockless_arm_lpc11.h (uses m0clockless_asm.h M0 path, matches nRF51). Blocked at the scaffold stage by the protect_platform_headers.py hook.

    Stage 3 / Stage 4 items still outstanding

    These remain open in this meta issue:

    • LPC845 hardware blink validation — fundamental gate before flipping fbuild CI to required
    • LPC845 FRO 30 MHz programming — fill the TODO(2845) in startup_lpc845.S::SystemInit
    • Linker memory-layout verification on hardware — .ld files cite datasheet but are unflashed
    • AutoResearch.ino RPC harness integration — wire LPC845 USART0 into the existing harness
    • validate_boards.py reconciliation — decide between fbuild-native validator vs. documented skip
    • fbuild CI flip — drop continue-on-error: true from build-lpc{804,845}.yml
    • LPC11xx clockless driver — led_sysdefs_arm_lpc.h + fastpin_arm_lpc11.h + clockless_arm_lpc11.h
    • LPC15xx port (Cortex-M3)
    • APA102 / SK9822 SPI driver for LPC family
    • Multi-strip parallel output on LPC845 SCT+DMA
    • PlatformIO upstream board donation (optional)

    Suggested next move

    1. Get an LPCXpresso845 board to anyone who can flash it
    2. Validate the bit-bang driver outputs WS2812 from examples/Blink/Blink.ino
    3. If timing is wrong, fill the FRO 30 MHz TODO(2845) and retest
    4. Once hardware-green, flip continue-on-error: false in fbuild CI
    5. Then iterate on PLU (feat(platform): LPC804 PLU clockless driver (Stage 2b of #2836) #2841/feat(platform): LPC804 PLU clockless driver (#2841) #2848) and PWM+DMA (feat(platform): LPC845 PWM+DMA-to-GPIO clockless driver (Stage 2c of #2836) #2842/feat(platform): LPC845 PWM+DMA-to-GPIO clockless driver (#2842) #2850) drivers with scope traces
  2. zackees commented on Jun 6, 2026

    @zackees
    MemberAuthor

    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:

    # Item Where Status
    1 Real SystemInit for LPC845 (FRO 30 MHz + PLL + flash wait states) fbuild repo Code-doable in fbuild; needs scope verification on hardware
    2 Real SystemInit for LPC804 fbuild repo Code-doable in fbuild; document decision
    3 Vector table expansion fbuild repo Code-doable as drivers need IRQs
    4 Per-chip mcu_config split fbuild repo Code-doable
    5 Linker memory-layout verification on hardware hardware Hardware-only
    6 AutoResearch.ino USART0 integration FastLED Code-doable but pointless without (5) + a working flashed board to talk to
    7 fbuild CI flip (continue-on-error: true -> required) fbuild repo + (5) Gated on (5)
    8 validate_boards.py reconciliation fbuild repo Code-doable

    Items 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

    # Item Status
    1 LPC11xx Cortex-M0 port Scaffold shipped in #2849 (family detection in is_lpc.h). Full driver wiring (led_sysdefs, fastpin, M0 clockless) is a follow-up.
    2 LPC15xx Cortex-M3 port Scaffold shipped in #2859 (family detection in is_lpc.h). Driver wiring follow-up.
    3 APA102 / SK9822 SPI driver for LPC Code-doable; needs LPC8xx SPI peripheral register-level knowledge (UM11029 section 12). Best done by someone who can verify on a logic analyzer.
    4 Multi-strip parallel output via Stage 2c PWM+DMA Code-doable; depends on Stage 2c (#2842, merged). Complex, requires careful DMA tuning.
    5 PlatformIO upstream donation Not blocking; community-cycle work.
    6 fl::set_* settings Only if needed.

    What 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:

    1. Lands fbuild Stage 3 PRs (items 1-4 + 8) in the fbuild repo.
    2. Flashes and scope-verifies LPC845 with the real SystemInit clock (item 5).
    3. Flips CI from continue-on-error: true to required (item 7).
    4. Either closes meta: LPC dev roadmap — Stages 3 + 4 (port completion, family expansion) #2845 declaring Stage 3 done and Stage 4 a follow-up roadmap, or splits Stage 4 into its own meta.

    Marking my code-only contributions complete; the hardware + fbuild repo work remains for the maintainer.

  3. added a commit that references this issue on Jun 6, 2026
  4. zackees commented on Jun 6, 2026

    @zackees
    MemberAuthor

    /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:

    • Item 4.1 (LPC11Uxx clockless) — FL_LPC11 split into FL_LPC11_USB (modern GPIO, supported) + FL_LPC11_LEGACY (legacy GPIO, #error until a separate fastpin lands). LPC11U24 / LPC11U35 reuse the LPC8xx fastpin + C++ clockless driver unchanged because UM10462 §9 confirms the same modern GPIO controller layout.
    • Item 4.2 (LPC15xx clockless) — Same approach; UM11074 confirms LPC15xx ships the same modern GPIO controller. CPU class widens to FL_IS_ARM_M3 in led_sysdefs_arm_lpc.h.
    • Item 4.3 (APA102 / SK9822 / WS2801 hardware SPI for LPC8xx) — New spi_arm_lpc.h per UM11029 §"SPI". Master, MSB-first, mode 0, 8-bit; SPI0 default, SPI1 routable via pSPIX template arg.

    Explicit deferrals (not in scope for one /clud-pr):

    • Stage 3 (entire stage, 8 items) — The meta itself explicitly says "Hardware required — this stage cannot be completed by AI agents alone." SystemInit, scope-measured WS2812 blink, AutoResearch UART, fbuild CI flip — these need an LPCXpresso845 + scope. Code-only changes here would be unverifiable and risky.
    • Item 4.1 legacy LPC11xx (LPC1110/1112/1114/1115) — Needs its own fastpin targeting the legacy GPIO at 0x50000000 with 12-bit masked-access semantics (UM10398 §12). The #error makes the unsupported case loud rather than silently mis-encoding.
    • Item 4.4 (multi-strip parallel) — Meta gates on Stage 2c PWM+DMA hardware validation per the issue body.
    • Item 4.5 (PlatformIO upstream donation) — Not a FastLED-repo deliverable.
    • Item 4.6 (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:

    • A dedicated "LPC port hardware bring-up" issue carrying the Stage 3 acceptance criteria, owned by whoever has the LPCXpresso845
    • A standalone "legacy LPC11xx fastpin" issue for the 1114/1115 path
    • A "LPC multi-strip parallel output" follow-on tied to Stage 2c hardware verification

    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.

  5. zackees commented on Jun 6, 2026

    @zackees
    MemberAuthor

    /clud-pr — final disposition

    What PR #2872 ships

    All FastLED-repo work that can land in a single AI-driven PR without hardware:

    • Stage 4.1 (LPC11Uxx clockless) — split FL_LPC11 into FL_LPC11_USB (supported) + FL_LPC11_LEGACY (#error), reuse the LPC8xx fastpin + C++ clockless because UM10462 §9 confirms identical GPIO controller layout.
    • Stage 4.2 (LPC15xx clockless) — same approach; UM11074 confirms the same modern GPIO controller. Widen the gate, set FL_IS_ARM_M3 in led_sysdefs.
    • Stage 4.3 (APA102 / SK9822 / WS2801 hardware SPI for LPC8xx) — new spi_arm_lpc.h per UM11029 §"SPI".
    • Documentation — new "Implementation map" section in the LPC README enumerating each of the 14 items in this meta with its owner repo and current status.

    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.md so future maintainers and AI sessions don't have to rediscover it:

    Repo Item count Detail
    FastLED (this repo) 8 4.1, 4.1-legacy, 4.2, 4.3, 4.4, 4.6, plus the FastLED-side of 3.6 (AutoResearch.ino) and the legacy-LPC11 fastpin follow-on
    FastLED/fbuild (sibling repo) 5 3.1 SystemInit LPC845, 3.2 SystemInit LPC804, 3.3 vector table, 3.4 mcu_config split, 3.7 CI workflow flip, 3.8 validate_boards.py
    PlatformIO upstream 1 4.5 board JSON donation — platform-nxplpc does not exist; would be a brand-new PlatformIO platform

    The 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:

    • 3 ship in feat(platform/lpc): complete Stage 4 wiring for LPC11Uxx + LPC15xx + APA102 SPI on LPC8xx (#2845) #2872 (4.1 USB, 4.2, 4.3)
    • 3 are hardware-gated per the meta itself:
      • 3.5 "verify on a real board (LPCXpresso845 or similar) before flipping CI to required"
      • 3.6 AutoResearch UART integration — possible to draft code but unverifiable without hardware, and cycle counts need 3.1 (real SystemInit) to be meaningful
      • 4.4 multi-strip parallel — the meta gates this on Stage 2c PWM+DMA hardware validation
    • 1 is a follow-on (4.1-legacy: LPC1110/1112/1114/1115 need a separate fastpin against the 0x50000000 legacy GPIO controller; the #error makes the unsupported case loud)
    • 1 has no concrete user requirement (4.6 fl::set_* settings — the existing build-time F_CPU define 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:

    1. FastLED issue: "LPC1110/1112/1114/1115 legacy-GPIO clockless driver" — a focused FastLED-repo issue with the legacy fastpin_arm_lpc11_legacy.h as its deliverable.
    2. FastLED issue: "LPC port hardware bring-up" — Stage 3.5, 3.6, and any 3.x follow-on that depends on hardware. Owner = whoever has the LPCXpresso845.
    3. fbuild repo issue: "LPC SystemInit + vector table + mcu_config + CI flip" — the 5 fbuild-repo items as one issue against FastLED/fbuild.
    4. PlatformIO issue (optional): "platform-nxplpc upstream 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.

  6. added a commit that references this issue on Jun 6, 2026
  7. moved this from Triage to Done in FastLED Trackeron Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions