From 612fa79650aab1929f853db265a113626208ceae Mon Sep 17 00:00:00 2001 From: zackees Date: Fri, 19 Jun 2026 23:07:41 -0700 Subject: [PATCH] feat(platforms): add NXP LPC8xx envs (LPC845, LPC804) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add five PlatformIO envs for the NXP Cortex-M0+ parts FastLED's src/platforms/arm/lpc/ tree now supports: - lpc845brk — LPC845-BRK breakout, with -DFASTLED_LPC_PWM_DMA=1 opting into the SCT + 3-channel DMA-to-GPIO fast path (clockless_arm_lpc_pwm_dma.h) - lpc845 — bare LPC845M301 (bit-bang clockless by default) - lpcxpresso845max — LPCXpresso845MAX dev board - lpc804 — bare LPC804M101, with a commented-out -DFASTLED_LPC_PLU hint (mandatory for WS2812 timing at the part's 15 MHz core clock) - lpcxpresso804 — LPCXpresso804 dev board, same caveat as lpc804 All five use the zackees/platform-nxplpc-arduino fork (upstream platformio/platform-nxplpc has no LPC8xx boards and no Arduino framework). The platform SHA is pinned to match FastLED master's own platformio.ini at the time of writing. Each ini has a header comment noting the part's RAM/Flash budget, the chip-specific fast-path build flag, and the non-registry platform source so future maintainers don't get tripped up. Boards intentionally NOT added: LPC11U24/U35, LPC11 legacy, LPC15xx (supported by FastLED but out of scope for the LPC8xx issue), and the unsupported LPC810/811/812/822/824/844/83x/834x. Closes #13 Co-Authored-By: Claude Opus 4.7 (1M context) --- platforms/platformio.lpc804.ini | 26 +++++++++++++++++++++++ platforms/platformio.lpc845.ini | 21 ++++++++++++++++++ platforms/platformio.lpc845brk.ini | 24 +++++++++++++++++++++ platforms/platformio.lpcxpresso804.ini | 25 ++++++++++++++++++++++ platforms/platformio.lpcxpresso845max.ini | 20 +++++++++++++++++ 5 files changed, 116 insertions(+) create mode 100644 platforms/platformio.lpc804.ini create mode 100644 platforms/platformio.lpc845.ini create mode 100644 platforms/platformio.lpc845brk.ini create mode 100644 platforms/platformio.lpcxpresso804.ini create mode 100644 platforms/platformio.lpcxpresso845max.ini diff --git a/platforms/platformio.lpc804.ini b/platforms/platformio.lpc804.ini new file mode 100644 index 0000000..71b8931 --- /dev/null +++ b/platforms/platformio.lpc804.ini @@ -0,0 +1,26 @@ +; PlatformIO Project Configuration File +; +; Bare NXP LPC804M101 (no dev-kit-specific pin mapping). +; Cortex-M0+ @ 15 MHz, 4 KB SRAM / 32 KB Flash. +; +; IMPORTANT: at 15 MHz the bit-bang clockless driver does NOT meet WS2812 +; protocol timing. To drive WS2812-class LEDs from an LPC804 you must opt +; into the PLU (Programmable Logic Unit) fast path +; (clockless_arm_lpc_plu.h) by uncommenting -DFASTLED_LPC_PLU below. The +; PLU synthesizes the bitstream in the chip's 26-LUT hardware fabric. +; +; The platform package is NOT in the upstream PlatformIO registry. We use +; the zackees/platform-nxplpc-arduino fork (adds the Arduino framework +; binding via ArduinoCore-LPC8xx). The SHA below is pinned to match +; FastLED master's own platformio.ini. + +[env:lpc804] +platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda +board = lpc804 +framework = arduino + +build_flags = + ; -DFASTLED_LPC_PLU ; uncomment for WS2812-class LED output + +lib_deps = + FastLED diff --git a/platforms/platformio.lpc845.ini b/platforms/platformio.lpc845.ini new file mode 100644 index 0000000..3c07091 --- /dev/null +++ b/platforms/platformio.lpc845.ini @@ -0,0 +1,21 @@ +; PlatformIO Project Configuration File +; +; Bare NXP LPC845M301 (no dev-kit-specific pin mapping). +; Cortex-M0+ @ 24 MHz, 16 KB SRAM / 64 KB Flash. +; +; FastLED uses the bit-bang clockless driver (clockless_arm_lpc.h / +; m0clockless_c.h) by default. For the SCT+DMA fast path see the +; lpc845brk env (-DFASTLED_LPC_PWM_DMA=1). +; +; The platform package is NOT in the upstream PlatformIO registry. We use +; the zackees/platform-nxplpc-arduino fork (adds the Arduino framework +; binding via ArduinoCore-LPC8xx). The SHA below is pinned to match +; FastLED master's own platformio.ini. + +[env:lpc845] +platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda +board = lpc845 +framework = arduino + +lib_deps = + FastLED diff --git a/platforms/platformio.lpc845brk.ini b/platforms/platformio.lpc845brk.ini new file mode 100644 index 0000000..23d0c15 --- /dev/null +++ b/platforms/platformio.lpc845brk.ini @@ -0,0 +1,24 @@ +; PlatformIO Project Configuration File +; +; NXP LPC845-BRK breakout — recommended starting point for LPC845. +; Cortex-M0+ @ 24 MHz, 16 KB SRAM / 64 KB Flash. +; +; This env opts into the FastLED LPC845 fast path +; (clockless_arm_lpc_pwm_dma.h — SCT + 3-channel DMA-to-GPIO). Drop the +; FASTLED_LPC_PWM_DMA flag if you'd rather use the plain bit-bang driver. +; +; The platform package is NOT in the upstream PlatformIO registry. We use +; the zackees/platform-nxplpc-arduino fork (adds the Arduino framework +; binding via ArduinoCore-LPC8xx). The SHA below is pinned to match +; FastLED master's own platformio.ini. + +[env:lpc845brk] +platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda +board = lpc845brk +framework = arduino + +build_flags = + -DFASTLED_LPC_PWM_DMA=1 + +lib_deps = + FastLED diff --git a/platforms/platformio.lpcxpresso804.ini b/platforms/platformio.lpcxpresso804.ini new file mode 100644 index 0000000..f48d670 --- /dev/null +++ b/platforms/platformio.lpcxpresso804.ini @@ -0,0 +1,25 @@ +; PlatformIO Project Configuration File +; +; NXP LPCXpresso804 development board (LPC804-based). +; Cortex-M0+ @ 15 MHz, 4 KB SRAM / 32 KB Flash. +; +; IMPORTANT: same 15 MHz constraint as [env:lpc804]. To drive WS2812-class +; LEDs you must opt into the PLU fast path (clockless_arm_lpc_plu.h) by +; uncommenting -DFASTLED_LPC_PLU below — the plain bit-bang driver cannot +; meet WS2812 timing at this clock speed. +; +; The platform package is NOT in the upstream PlatformIO registry. We use +; the zackees/platform-nxplpc-arduino fork (adds the Arduino framework +; binding via ArduinoCore-LPC8xx). The SHA below is pinned to match +; FastLED master's own platformio.ini. + +[env:lpcxpresso804] +platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda +board = lpcxpresso804 +framework = arduino + +build_flags = + ; -DFASTLED_LPC_PLU ; uncomment for WS2812-class LED output + +lib_deps = + FastLED diff --git a/platforms/platformio.lpcxpresso845max.ini b/platforms/platformio.lpcxpresso845max.ini new file mode 100644 index 0000000..4b78f85 --- /dev/null +++ b/platforms/platformio.lpcxpresso845max.ini @@ -0,0 +1,20 @@ +; PlatformIO Project Configuration File +; +; NXP LPCXpresso845MAX development board (LPC845-based). +; Cortex-M0+ @ 24 MHz, 16 KB SRAM / 64 KB Flash. +; +; FastLED uses the bit-bang clockless driver by default on this env. +; To opt into the SCT+DMA fast path add: -DFASTLED_LPC_PWM_DMA=1 +; +; The platform package is NOT in the upstream PlatformIO registry. We use +; the zackees/platform-nxplpc-arduino fork (adds the Arduino framework +; binding via ArduinoCore-LPC8xx). The SHA below is pinned to match +; FastLED master's own platformio.ini. + +[env:lpcxpresso845max] +platform = https://github.com/zackees/platform-nxplpc-arduino.git#2ee527ae80de98e9105329a7260edb003289dfda +board = lpcxpresso845max +framework = arduino + +lib_deps = + FastLED