Repository navigation
Add NXP LPC8xx (LPC845, LPC804) PlatformIO envs #13
Description
Problem
FastLED now ships first-class support for NXP's LPC8xx Cortex-M0+ family (specifically the LPC845 and LPC804), but PlatformIO-Starter has no envs targeting those parts. Anyone wanting to drive WS2812/APA102 strips from a sub-$2 ARM micro has to figure out the platform package, the per-board IDs, and the chip-specific build flags themselves — and the platform package isn't even in the PlatformIO upstream registry.
What FastLED actually supports (as of master, 2026-06-20)
From src/platforms/arm/lpc/is_lpc.h:
| Family | Core | FastLED guard | Parts |
|---|---|---|---|
| LPC845 | Cortex-M0+ @ 24 MHz | FL_IS_ARM_LPC_845 |
LPC845M301JBD48/JBD64/JHI33/JHI48 |
| LPC804 | Cortex-M0+ @ 15 MHz | FL_IS_ARM_LPC_804 |
LPC804M101JDH20/JDH24/JHI33 |
Driver model:
- WS2812-class clockless: bit-banged via
clockless_arm_lpc.h(uses the M0 C implementationm0clockless_c.h). - LPC845-specific fast path:
clockless_arm_lpc_pwm_dma.h— SCT + 3-channel DMA-to-GPIO, opt-in with-DFASTLED_LPC_PWM_DMA=1. - LPC804-specific fast path:
clockless_arm_lpc_plu.h— uses the Programmable Logic Unit (26-LUT fabric) because the part only runs at 15 MHz; opt-in with-DFASTLED_LPC_PLU. - Clocked (APA102/SK9822/WS2801): hardware SPI via
spi_arm_lpc.h.
The broader LPC8xx parts the user might assume work (LPC810/811/812/822/824/844/83x/834x) are NOT supported. Only LPC845 and LPC804.
What to add
Mirror the five lpc* envs from FastLED's own platformio.ini (https://raw.githubusercontent.com/FastLED/FastLED/master/platformio.ini), stripping FastLED-internal flags (FASTLED_AUTORESEARCH_*) that don't belong in a starter:
[env:lpc845brk]
; NXP LPC845-BRK breakout — recommended starting point for LPC845.
; Includes the FASTLED_LPC_PWM_DMA fast path (SCT + DMA-to-GPIO).
platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda
board = lpc845brk
framework = arduino
build_flags =
-DFASTLED_LPC_PWM_DMA=1
lib_deps = FastLED
[env:lpc845]
; Bare LPC845M301 — no dev-kit-specific pin mapping.
platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda
board = lpc845
framework = arduino
lib_deps = FastLED
[env:lpcxpresso845max]
; LPCXpresso845MAX development board.
platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda
board = lpcxpresso845max
framework = arduino
lib_deps = FastLED
[env:lpc804]
; Bare LPC804M101. 15 MHz core — bit-bang clockless does NOT meet WS2812
; timing; opt in to the PLU (Programmable Logic Unit) fast path with
; -DFASTLED_LPC_PLU if you intend to drive WS2812-class LEDs.
platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda
board = lpc804
framework = arduino
lib_deps = FastLED
[env:lpcxpresso804]
; LPCXpresso804 development board. Same 15 MHz caveat as [env:lpc804].
platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda
board = lpcxpresso804
framework = arduino
lib_deps = FastLEDEach as a separate file under platforms/ to match the existing convention.
Quirks worth calling out in the env comments
- Non-registry platform. The upstream
platformio/platform-nxplpcpackage has no LPC8xx boards and no Arduino framework. We use thezackees/platform-nxplpc-arduinofork, which adds the Arduino framework binding viaArduinoCore-LPC8xx. Pin to the exact SHA FastLED uses to avoid surprises. - Tiny memory. LPC845 = 16 KB SRAM / 64 KB Flash. LPC804 = 4 KB SRAM / 32 KB Flash. FastLED has shipped explicit size-reduction work for these parts; expect tight fits.
- LPC804 timing. At 15 MHz the bit-bang clockless driver cannot meet WS2812 timing. Comment in the env should point users at
-DFASTLED_LPC_PLU.
Boards explicitly NOT to add (yet)
- LPC11U24/U35 (
FL_IS_ARM_LPC_11_USB), LPC15xx (FL_IS_ARM_LPC_15), LPC11 legacy (FL_IS_ARM_LPC_11_LEGACY). These are supported by FastLED'sarm/lpc/platform tree, but they're outside the LPC8xx scope of this issue — file a follow-up issue if/when wanted. - LPC810/811/812/822/824/844/83x/834x. Not supported by FastLED; do NOT add envs.
Refs
- FastLED LPC platform tree:
src/platforms/arm/lpc/(is_lpc.h,clockless_arm_lpc.h,clockless_arm_lpc_pwm_dma.h,clockless_arm_lpc_plu.h,led_sysdefs_arm_lpc.h,README.md) - FastLED
platformio.inireference envs: https://raw.githubusercontent.com/FastLED/FastLED/master/platformio.ini - Platform fork: https://github.com/zackees/platform-nxplpc-arduino (pinned SHA
2ee527ae80de98e9105329a7260edb003289dfda) - Upstream
platformio/platform-nxplpc: https://registry.platformio.org/platforms/platformio/nxplpc — LPC8xx and Arduino NOT included, do not point users here
Filed via Claude Code research; the platform SHA and per-board IDs above were copied verbatim from FastLED master at the time of writing. Edit on GitHub if any of those defaults need adjusting before implementation.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
feat(platforms): add NXP LPC8xx envs (LPC845, LPC804) (#14)