Skip to content

feat(packages): bump ArduinoCore-LPC8xx to 1179200 (adds LPC804 DMA0 block) - #916

Merged
zackees merged 1 commit into
mainfrom
fix/lpc8xx-framework-1179200
Jul 1, 2026
Merged

feat(packages): bump ArduinoCore-LPC8xx to 1179200 (adds LPC804 DMA0 block)#916
zackees merged 1 commit into
mainfrom
fix/lpc8xx-framework-1179200

Conversation

@zackees

@zackees zackees commented Jul 1, 2026

Copy link
Copy Markdown
Member

Problem

FastLED/framework-arduino-lpc8xx#35 added `DMA_Type` + `DMA0` peripheral declarations to `variants/lpc804/LPC804.h`. The 50d76e0 commit currently pinned in `arduino_core_lpc8xx.rs` only had the LPC845 DMA block, so downstream drivers referencing the standard `DMA0` / `DMA_Type` symbols on LPC804 failed at compile time — most recently observed while widening FastLED's `spi_arm_lpc_dma.h` gate to support LPC804 (FastLED#3499, part of FastLED#3453 Phase 1).

Fix

Bump the pinned commit + version + archive SHA256:

Field Before After
`ACLPC_COMMIT` `50d76e0d…` `1179200a…`
`ACLPC_VERSION` `0.2.0+g50d76e0` `0.2.1+g1179200`
`ACLPC_CHECKSUM` `e64f0cb8…` `6b87823e…`

The DMA struct in the new commit is byte-identical to LPC845's — same silicon block, same register offsets, same COMMON / CHANNEL nested layout. Only the channel count differs: `CHANNEL[4]` per NXP UM11065 §12 instead of `CHANNEL[25]`.

Verification

New archive SHA256 verified locally:

```
$ curl -sL "https://github.com/FastLED/framework-arduino-lpc8xx/archive/1179200a301a517b49d056a1803abed67973bb64.tar.gz" | sha256sum
6b87823e8db65e61fc052c3a482ff5e547898bdf2a6ee2a8197b4955c5aa3baf
```

Refs

🤖 Generated with Claude Code

FastLED/framework-arduino-lpc8xx#35 adds `DMA_Type` +
`DMA0` peripheral declarations to `variants/lpc804/LPC804.h`. The
initial CMSIS PAL that shipped with the 50d76e0 commit only had the
LPC845 DMA block, so downstream drivers referencing the standard
`DMA0` / `DMA_Type` symbols on LPC804 failed at compile time — most
recently observed while widening FastLED's `spi_arm_lpc_dma.h` gate
to support LPC804 (FastLED#3499, part of FastLED#3453 Phase 1).

Bump the pinned commit + version + archive SHA256:

  ACLPC_COMMIT   50d76e0d… → 1179200a…
  ACLPC_VERSION  0.2.0+g50d76e0 → 0.2.1+g1179200
  ACLPC_CHECKSUM e64f0cb8… → 6b87823e…

The DMA struct in the new commit is byte-identical to LPC845's — same
silicon block, same register offsets, same COMMON/CHANNEL nested
layout. Only the channel count differs: `CHANNEL[4]` per NXP UM11065
§12 instead of `CHANNEL[25]`.

## Refs

- FastLED/framework-arduino-lpc8xx#35 (source commit).
- FastLED#3499 (LPC804 SPI DMA vendor-header prereq — this unblocks it).
- FastLED#3453 Phase 1 (LPC async DMA drivers meta).
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@zackees, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2a3d8d5a-39b3-4c08-9422-b2a0cba2f771

📥 Commits

Reviewing files that changed from the base of the PR and between d08622b and 6939aa7.

📒 Files selected for processing (1)
  • crates/fbuild-packages/src/library/arduino_core_lpc8xx.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/lpc8xx-framework-1179200

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees merged commit f43acc3 into main Jul 1, 2026
86 of 93 checks passed
@zackees
zackees deleted the fix/lpc8xx-framework-1179200 branch July 1, 2026 09:43
zackees added a commit to FastLED/FastLED that referenced this pull request Jul 1, 2026
)

FastLED-side companion to FastLED/framework-arduino-lpc8xx#35 (adds
`DMA_Type` + `DMA0` to LPC804's vendor CMSIS PAL, merged as
`1179200a30`) and FastLED/fbuild#916 (bumps `ACLPC_COMMIT` to that
SHA, merged as `f43acc3d82`).

## Changes

- Widen gate from `FL_IS_ARM_LPC_845` to
  `(FL_IS_ARM_LPC_845 || FL_IS_ARM_LPC_804)`.
- Add per-chip `FASTLED_LPC_SPI_DMA_CHANNEL` default:
    - LPC845: 4 (SPI0_TX per UM11029 Table 80) — unchanged.
    - LPC804: 0 (SPI0_TX per UM11065 §12.4 DMA trigger source table).
- Clear `#error` diagnostic if a user opts into `FASTLED_LPC_SPI_DMA`
  on LPC804 while the toolchain is still on the pre-#35 vendor PAL —
  points at the fbuild release requirement rather than cascading into
  a wall of `'DMA0' was not declared` errors.
- Update class + file docstring to reflect dual-chip support.

## Compile matrix

- `bash compile lpc804 --examples Blink` → ✅ succeeds (default, no
  SPI DMA opt-in, unaffected by the gate widening).
- `bash compile lpc845 --examples AutoResearch --defines
  "FASTLED_LPC_SPI_DMA=1"` → ✅ succeeds.
- `bash compile lpc804 --examples Blink --defines
  "FASTLED_LPC_SPI_DMA=1"` → ❌ fails with the new #error until a
  fbuild release picks up #916. Expected — the diagnostic message
  tells the user exactly what they need.

## Host tests

`bash test --cpp` → 344/344 passed. C++ lint → clean.

## Closes/refs

- Closes the FastLED-side scope of #3499 (LPC804 vendor-header
  prereq). The remaining acceptance criterion — "Compile LPC804 with
  `-DFASTLED_LPC_SPI_DMA=1` succeeds" — flips green automatically the
  moment fbuild ships a release with #916.
- Refs #3453 Phase 1 (LPC async DMA drivers meta) and #2845 Stage 4
  (LPC family expansion).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
zackees added a commit to FastLED/framework-arduino-lpc8xx that referenced this pull request Jul 1, 2026
Reverts #35. The original PR added a fabricated `DMA_Type` struct +
`DMA0` pointer + `DMA_BASE_ADDRS` / `DMA_BASE_PTRS` arrays to
`variants/lpc804/LPC804.h`, claiming to match a real peripheral at
0x50008000. That claim was empirically wrong — LPC804 silicon has no
DMA peripheral.

## Empirical evidence

NXP's own official CMSIS PAL from mcux-sdk:

- `devices/LPC804/LPC804.h` — **zero** `DMA_Type` typedef, **zero**
  `DMA0_BASE` macro. Only `CRC_BASE = 0x50000000` in the 0x5000_xxxx
  AHB range; **0x50008000 is a reserved slot**.
- `devices/LPC804/LPC804_features.h` — no `FSL_FEATURE_SOC_DMA_COUNT`.
  Compare LPC845's file which has `FSL_FEATURE_SOC_DMA_COUNT = 1` +
  `FSL_FEATURE_DMA_NUMBER_OF_CHANNELS = 25`.
- `devices/LPC804/drivers/` — no `fsl_inputmux_connections.h`. LPC845
  has it — INPUTMUX exists to route peripheral requests to DMA
  channels, and no DMA means no INPUTMUX.
- UM11065 — 3 DMA references total, all copy-paste leftovers in
  ADC/DAC/CAPT/I2C/SPI comment blocks. No dedicated DMA chapter.

## Diagnosis + guardrail

Diagnosed by @phatpaul in FastLED/FastLED#3499 comment 4855252061 with a
UM11065 grep + memory-map inspection. FastLED-side revert cascade in
FastLED/FastLED#3513. FastLED#3499 closed as INVALID.

Preventive guardrail added: FastLED/FastLED PR #3506 / #3507
(`agents/docs/peripheral-existence.md`). Agents must now grep vendor
CMSIS + features flags + drivers/ for the peripheral before writing
any code that names its typedef. All four "absent" → HALT.

Refs: FastLED/FastLED#3513, FastLED/FastLED#3499, FastLED/fbuild#916
(the fbuild pin bump that pulled this phantom typedef in, also needs
reverting).
zackees added a commit that referenced this pull request Jul 1, 2026
 follow-up) (#918)

Bumps `ACLPC_COMMIT` past `FastLED/framework-arduino-lpc8xx#35` (the
phantom LPC804 `DMA_Type` addition) to the revert HEAD
`8836a9bb08c77273758776aa3e8a233e97ff97cf`, which is the tip of `main`
after `FastLED/framework-arduino-lpc8xx#36` (revert) merged.

Also updates the `ACLPC_CHECKSUM` to the SHA256 of the archive tarball
GitHub currently serves for the new SHA:
`e74c2226873ccf5676096b8e28c8a9acc4af39894c7fc651ea320628a69281ec`
(verified via `curl … | sha256sum`).

Cleans the stale doc comment that used to justify the bump to 1179200
with the phantom-peripheral rationale.

## Why the revert

LPC804 silicon has no DMA peripheral. NXP's own `mcux-sdk` sources
confirm:
- `devices/LPC804/LPC804.h` — zero `DMA_Type` typedef, zero `DMA0_BASE`
- `devices/LPC804/LPC804_features.h` — no `FSL_FEATURE_SOC_DMA_COUNT`
- `devices/LPC804/drivers/` — no `fsl_inputmux_connections.h`
- UM11065 — 3 DMA hits total, all copy-paste leftovers, no DMA chapter

0x50008000 is a reserved AHB slot on LPC804.

Diagnosed by @phatpaul in FastLED/FastLED#3499 comment 4855252061.
FastLED-side revert cascade: FastLED/FastLED#3513. FastLED#3499 closed
as INVALID.

Preventive guardrail: FastLED/FastLED#3506 / #3507
(`agents/docs/peripheral-existence.md`) — agents must now grep vendor
CMSIS + features flag + drivers/ before writing any driver code that
names a `<Peripheral>_Type` typedef. All four "absent" → halt.

Refs: FastLED/framework-arduino-lpc8xx#36 (upstream revert),
FastLED/FastLED#3513, FastLED/FastLED#3499, FastLED/FastLED#3517
(meta issue Phase D).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant