Repository navigation
Description
Follow-up to #2849 (LPC11xx Cortex-M0 detection scaffold) and #2859 (LPC15xx Cortex-M3 detection scaffold). Surfaces an issue listed in #2845.
Problem
src/platforms/arm/lpc/fastpin_arm_lpc.h and src/platforms/arm/lpc/clockless_arm_lpc.h currently activate for any FL_IS_ARM_LPC. With #2849 and #2859 having added LPC11xx and LPC15xx detection (both of which set FL_IS_ARM_LPC), the LPC8xx-targeted GPIO controller layout (LPC_GPIO->SET[0]/CLR[0] at base 0xA0000000) and the LPC8xx-targeted clockless driver would silently compile for those families if any platform configuration eventually defines FL_LPC11 or FL_LPC15.
Concretely:
- LPC11xx (LPC1114, LPC1115, LPC11U24, LPC11U35) is Cortex-M0 (not M0+) with the legacy GPIO controller at
0x50000000and masked-access semantics (UM10398 §9, UM10462 §9). The LPC8xx FastPin template would compile but write to the wrong addresses. - LPC15xx is Cortex-M3 with a different GPIO peripheral layout entirely (UM11074 §11). The M0/M0+ clockless template is the wrong choice on M3.
This is a latent footgun, not currently triggered (no in-tree platform JSON defines FL_LPC11 / FL_LPC15 yet), but the family-level gate is wrong on its face and will trip on the first LPC11xx/15xx port attempt.
Acceptance criteria
-
fastpin_arm_lpc.h:_ARMPINtemplate guarded by#if defined(FL_LPC845) || defined(FL_LPC804)(LPC8xx-specific), not the family-levelFL_IS_ARM_LPC. -
clockless_arm_lpc.h:ClocklessControllertemplate guarded by the same LPC8xx-specific gate; the existingFL_LPC804 + FASTLED_LPC_PLUopt-out remains intact. -
fastled_arm_lpc.h: emit a clear#errorforFL_LPC11/FL_LPC15builds that points to this meta (meta: LPC dev roadmap — Stages 3 + 4 (port completion, family expansion) #2845) as the tracking issue for the follow-up driver wiring. -
is_arm.h: update the LPC family comment block (currently says "NXP LPC8xx (LPC845 / LPC804 Cortex-M0+)") to reflect that LPC8xx, LPC11xx, and LPC15xx are all detected viaFL_IS_ARM_LPC, with driver wiring scope documented separately. -
bash test --cpppasses — no regressions in LPC8xx unit-test surface area (which is the only LPC family with a driver today).
Out of scope (deliberately)
These are tracked in #2845 and remain follow-ups:
led_sysdefs_arm_lpc.hupdates (FL_IS_ARM_M0 for LPC11xx, FL_IS_ARM_M3 stub for LPC15xx, per-family F_CPU defaults, CMSIS device header includes). Editingled_sysdefs_*files trips theprotect_platform_headers.pyPreToolUse hook, which requires the maintainer's explicitFL_AGENT_ALLOW_PROTECTED_WRITE=1env-var override.- New
fastpin_arm_lpc11.h/clockless_arm_lpc11.hfor the LPC11xx legacy GPIO masked-access pattern. Per the meta: LPC dev roadmap — Stages 3 + 4 (port completion, family expansion) #2845 second comment: "patterns are non-trivial to verify without hardware - prefer the maintainer add these once a board is in hand." - Analogous LPC15xx M3 driver wiring.
References
- meta: LPC dev roadmap — Stages 3 + 4 (port completion, family expansion) #2845 (meta: LPC dev roadmap — Stages 3 + 4)
- feat(platform): LPC11xx (Cortex-M0) family detection scaffold (#2845) #2849 (LPC11xx detection scaffold)
- feat(platform): LPC15xx (Cortex-M3) family detection scaffold (#2845 Stage 4 item 2) #2859 (LPC15xx detection scaffold)
- NXP UM10398 (LPC111x/LPC11Cxx User Manual) — legacy GPIO at 0x50000000
- NXP UM10462 (LPC11U2x/3x User Manual) — legacy GPIO at 0x50000000
- NXP UM11074 (LPC15xx User Manual) — GPIO at 0xA0000000 with different register layout
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(platform/lpc): scope LPC8xx driver code to LPC8xx-only