Repository navigation
feat(platform): LPC15xx (Cortex-M3) family detection scaffold (#2845 Stage 4 item 2) - #2859
Conversation
Stage 4 item 2 from #2845. Adds NXP LPC15xx family detection to is_lpc.h, mirroring the LPC11xx scaffold (#2849): - New FL_LPC15 macro keyed on __LPC15xx__, LPC15xx, and CMSIS-style CPU_LPC1517*/LPC1518*/LPC1519*/LPC1547*/LPC1548*/LPC1549* IDs. - FL_IS_ARM_LPC roll-up extended to include FL_LPC15 so the existing is_arm.h dispatch picks up LPC15xx as an ARM platform automatically. Critical architectural note (also in code comments): LPC15xx is Cortex-M3, not M0 / M0+. The M3 has a barrel shifter and the full Thumb-2 instruction set, so this family must NOT be gated on FL_IS_ARM_M0 or FL_IS_ARM_M0_PLUS — the M0 ASM template's load/store offset encoding restrictions do not apply. The follow-up clockless driver will target an M3-class path. This PR is intentionally header-detection-only: the family compiles to a stub on LPC15xx until the follow-up driver lands. Existing LPC8xx / LPC11xx builds are unaffected (FL_LPC845/FL_LPC804/FL_LPC11 detection unchanged). Refs #2845, #2836, #2831 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Lost in the diff? Review this PR in Change Stack to follow the change map from intent to exact ranges. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds compile-time detection for LPC15xx (Cortex-M3) microcontroller devices by introducing a new ChangesLPC15xx Platform Detection
Estimated Code Review Effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Tighten the family gates so `_ARMPIN` and the bit-banged `ClocklessController` in `src/platforms/arm/lpc/` activate only for LPC845 / LPC804 instead of any `FL_IS_ARM_LPC` build. With LPC11xx (Cortex-M0) and LPC15xx (Cortex-M3) detection now landing via FastLED#2849 and FastLED#2859, the family-level gate would silently compile LPC8xx-targeted GPIO controller layouts and M0+ ASM selection for chips that ship a different GPIO controller (legacy GPIO at 0x50000000 with masked-access semantics on LPC11xx per UM10398 / UM10462; GPIO per UM11074 on LPC15xx) and a different architecture (M0 not M0+ on LPC11xx; M3 on LPC15xx). Surface the gap with a clear `#error` in `fastled_arm_lpc.h` that points LPC11xx / LPC15xx builds at FastLED#2845 Stage 4 as the tracking issue for the follow-up driver wiring, and refresh the `is_arm.h` comment block so the LPC family roll-up reflects what's actually detected today. No behaviour change for in-tree LPC8xx builds (no platform configuration currently defines `FL_LPC11` / `FL_LPC15`); this is a latent-bug fix that keeps the next LPC family scaffolds from accidentally activating LPC8xx code paths. Closes FastLED#2865. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
Stage 4 item 2 from #2845. Mirrors the LPC11xx scaffold (#2849) for the LPC15xx (Cortex-M3) family. Pure header-detection scaffold — adds an
FL_LPC15macro and rolls it intoFL_IS_ARM_LPCso the existingis_arm.hdispatch picks LPC15xx up automatically. Driver wiring (led_sysdefs_arm_lpc15.h,fastpin_arm_lpc15.h, M3-class clockless) is a follow-up.Critical architectural note (also in the code comments)
LPC15xx is Cortex-M3, not M0 / M0+. The M3 has a barrel shifter and the full Thumb-2 instruction set, so this family must NOT be gated on
FL_IS_ARM_M0orFL_IS_ARM_M0_PLUS— the M0 ASM template's load/store offset encoding restrictions do not apply, and the follow-up clockless driver should target an M3-class path (tighter cycle counts than M0+ permits).Detected variants
Common MCUXpresso / CMSIS CPU_* identifiers plus bare-project
__LPC15xx__/LPC15xxdefines.Files
src/platforms/arm/lpc/is_lpc.hFL_LPC15block + roll-up extensionTest plan
bash lint --cpppasses (no new violations).Cross-references
🤖 Generated with Claude Code
Summary by CodeRabbit