Skip to content

revert(lpc): drop -std=gnu++17 overrides; PIO defaults now compile - #3331

Merged
zackees merged 1 commit into
masterfrom
fix/3329-lpc-digit-separators
Jun 20, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/3329-lpc-digit-separators

Conversation

@zackees

@zackees zackees commented Jun 20, 2026 •

Copy link
Copy Markdown
Member

Summary

PR #3332 added build_unflags = -std=gnu++11 -std=c++11 + build_flags = -std=gnu++17 to 5 LPC PIO envs as a workaround for the C++14 digit separators in m0clockless_c.h. That same PR also dropped those digit separators and added BareDigitSeparatorChecker to prevent regression, which means PIO's default -std=gnu++11 now compiles the LPC framework cleanly.

This PR removes the now-redundant gnu++17 overrides from:

  • env:lpc845brk (functional -DRELEASE / -DFASTLED_LPC_PWM_DMA=1 / -DFASTLED_AUTORESEARCH_LOW_MEMORY=1 flags preserved)
  • env:lpc845
  • env:lpc804
  • env:lpcxpresso845max
  • env:lpcxpresso804

env:lpc845brk_ieee754 extends env:lpc845brk and tracks automatically.

Per maintainer:

we should be able to keep the defaults again now that the fastled c++17 / 14 fix landed, it should compile with C++11

This also moots the "Part B" open question on #3329 about whether the gnu++17 default should live in zackees/platform-nxplpc-arduino's platform.json — the FastLED-side fix means neither side needs the override for our builds, leaving the platform-side decision purely to that maintainer's preference.

Verification

Backend Default -std= Result Flash RAM
PIO gnu++11 (default) ✅ SUCCESS in 49s 59996 / 65536 (91.5%) 5924 / 16384 (36.2%)
fbuild gnu++17 (config) ✅ SUCCESS in 41s 55140 / 65536 (84.1%) 9248 / 16384 (56.4%)

Commands run:

bash compile lpc845brk --examples AutoResearch --platformio    # PIO @ gnu++11
bash compile lpc845brk --examples AutoResearch                 # fbuild @ gnu++17

Test plan

  • PIO LPC compile under default C++11
  • fbuild LPC compile (no regression)
  • CI: cross-platform compile matrix
  • CI: bash test --cpp

Refs #3329, #3332.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 232efb91-357b-4f12-8408-5e066a7da647

📥 Commits

Reviewing files that changed from the base of the PR and between 91a11f6 and bf2dfba.

📒 Files selected for processing (1)
  • src/platforms/arm/common/m0clockless_c.h

📝 Walkthrough

Walkthrough

In ns_to_cycles within src/platforms/arm/common/m0clockless_c.h, the numeric literals 999'999'999ULL and 1'000'000'000ULL are replaced with 999999999ULL and 1000000000ULL, removing C++14 digit separators while keeping the conversion formula identical.

Changes

ns_to_cycles Literal Fix

Layer / File(s) Summary
Remove digit-separator literals
src/platforms/arm/common/m0clockless_c.h
Rounding constant and divisor in the nanoseconds-to-cycles return expression changed from digit-separated (999'999'999ULL, 1'000'000'000ULL) to plain (999999999ULL, 1000000000ULL), removing the C++14 dependency.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

Poem

🐇 A digit or two, with a tick in between,
The C++14 kind—where no C++11 has been!
I pulled out the commas, the apostrophes too,
999999999ULL shines bright and new.
The cycles still count, the formula's the same,
Just simpler to parse — a trivial claim! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing C++14 digit separators with plain literals to resolve a compilation issue that blocks LPC PIO bisection.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/3329-lpc-digit-separators

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 and usage tips.

…3329)

PR #3332 force-set `-std=gnu++17` on all 5 LPC PIO envs to work around
the C++14 digit separators that lived in m0clockless_c.h. That same PR
also dropped those digit separators (and added BareDigitSeparatorChecker
to prevent regression), so the flag override is no longer carrying its
weight — PIO's default `-std=gnu++11` is now sufficient for the LPC
framework.

Reverting the `build_unflags` + `-std=gnu++17` block from:
- env:lpc845brk     (functional `-DRELEASE`/`-DFASTLED_LPC_PWM_DMA=1`/
                     `-DFASTLED_AUTORESEARCH_LOW_MEMORY=1` flags preserved)
- env:lpc845
- env:lpc804
- env:lpcxpresso845max
- env:lpcxpresso804

`env:lpc845brk_ieee754` extends `env:lpc845brk` and tracks automatically.

Rationale (per maintainer):
> we should be able to keep the defaults again now that the fastled
> c++17 / 14 fix landed, it should compile with C++11

This restores parity with the platform's documented default standard
and shrinks the surface that the `zackees/platform-nxplpc-arduino`
maintainer has to consider when revisiting the platform.json default
(open question Part B from #3329 — now moot for FastLED-side builds).

Verification:
- bash compile lpc845brk --examples AutoResearch --platformio
    -> SUCCESS in 49s; Flash 59996/65536 (91.5%), RAM 5924/16384 (36.2%).
- bash compile lpc845brk --examples AutoResearch (fbuild backend)
    -> SUCCESS in 41s; Flash 55140 bytes, RAM 9248 bytes. No regression.

Closes the second-order cleanup tracked under #3329.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees force-pushed the fix/3329-lpc-digit-separators branch from bf2dfba to 6b17fb8 Compare June 20, 2026 10:32
@zackees
zackees merged commit 5d18212 into master Jun 20, 2026
5 of 7 checks passed
@zackees zackees changed the title fix(m0clockless): drop C++14 digit separators to unblock LPC PIO bisection (#3329) revert(lpc): drop -std=gnu++17 overrides; PIO defaults now compile Jun 20, 2026
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 20, 2026
@zackees
zackees deleted the fix/3329-lpc-digit-separators branch August 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant