Skip to content

feat(nrf52): add SuperMini, nice!nano, nRFMicro nRF52840 variants (#2422) - #2445

Merged
zackees merged 2 commits into
masterfrom
feat/nrf52840-supermini-promicro-2422
May 10, 2026
Merged

zackees merged 2 commits into
masterfrom
feat/nrf52840-supermini-promicro-2422

Conversation

@zackees

@zackees zackees commented May 10, 2026 •

Copy link
Copy Markdown
Member

Closes #2422

Summary

Resolves the #warning "Unknown nRF52840 variant" reported in #2422 by adding explicit FastPin variant blocks for three community nRF52840 boards exposed by the pdcook/nRFMicro-Arduino-Core BSP:

  • TARGET_SUPERMINI_NRF52840 → SuperMini nRF52840
  • TARGET_NICE_NANO_V2 → nice!nano v2 (ProMicro-pin-compatible footprint, covers the ProMicro nRF52840 mentioned in the issue)
  • TARGET_NRFMICRO → nRFMicro

Pin tables in src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h are taken directly from each upstream variant.h. NFC pins (P0.09 / P0.10) and onboard control pins (user LED, EXT_VCC 3V3 enable) are declared with _FL_DEF_INVALID_PIN so they are not silently accepted as FastLED output pins without explicit BSP-side reconfiguration.

Also added three ci/boards.py entries (supermini_nrf52840, nice_nano_nrf52840, nrfmicro_nrf52840) so that bash compile <board> exercises the new variant blocks via -DTARGET_*. They reuse the nrf52840_dk_adafruit underlying board because no first-party PlatformIO board package exists for these community variants.

Test plan

  • bash lint --cpp — passes
  • bash compile supermini_nrf52840 --examples Blink — build is invoked correctly with the right defines (TARGET_SUPERMINI_NRF52840); compilation fails inside the Adafruit BSP cores/nRF5/utility/debug.cpp (ARDUINO_BSP_VERSION macro — pre-existing BSP issue, unrelated to FastLED)
  • Hardware verification by board owners (the original reporter and other community users) — pin tables are derived from the upstream variant.h, so they should be correct, but a real-hardware sanity check is welcome

Summary by CodeRabbit

  • New Features

    • Added support for three nRF52840 community board variants: Supermini nRF52840, Nice Nano nRF52840 (ProMicro-compatible), and nRFmicro nRF52840. Each includes complete pin mappings and configuration.
  • Build & CI

    • Configured automated build pipelines and CI workflows for the new board variants.
  • Documentation

    • Updated build status references.

Review Change Stack

)

The community-maintained pdcook/nRFMicro-Arduino-Core BSP exposes three
nRF52840 variants that previously fell through FastLED's "Unknown
nRF52840 variant" fallback and emitted a noisy #warning.  Add explicit
variant blocks gated on the BSP-defined TARGET_* macros:

  * TARGET_SUPERMINI_NRF52840 -> SuperMini nRF52840
  * TARGET_NICE_NANO_V2       -> nice!nano v2 (ProMicro-pin-compatible)
  * TARGET_NRFMICRO           -> nRFMicro

Pin tables are taken from each variant.h in the upstream BSP.  NFC pins
(P0.09 / P0.10) and onboard control pins (USR LED, EXT_VCC enable) are
marked _FL_DEF_INVALID_PIN since they are not safe defaults for FastLED
output without additional configuration.

Also add ci/boards.py entries (supermini_nrf52840, nice_nano_nrf52840,
nrfmicro_nrf52840) so `bash compile <board>` exercises the new variant
blocks via -DTARGET_*.  These reuse the nrf52840_dk_adafruit underlying
board because no first-party PlatformIO board package exists for these
community variants.

Resolves #2422

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented May 10, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR adds support for three community-designed nRF52840 board variants: SuperMini, Nice!Nano V2, and nRFMicro. New board configurations are registered in the CI build matrix, and corresponding FastPin mappings define the pinout for each variant, replacing the previous generic fallback for unrecognized nRF52840 devices.

Changes

nRF52840 Board Variants

Layer / File(s) Summary
Board Configuration
ci/boards.py
Three new Board instances (SUPERMINI_NRF52840, NICE_NANO_NRF52840, NRFMICRO_NRF52840) configure the Adafruit nRF52840 BSP with target-specific macros (TARGET_SUPERMINI_NRF52840, TARGET_NICE_NANO_V2, TARGET_NRFMICRO), framework settings, and compile test disabling.
Pin Mappings
src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h
Three new board target sections define fl::FastPin<> specializations with ProMicro-compatible or nRFMicro-compatible pinouts, marking unsafe pins (NFC, onboard control, VBAT sense) as invalid for FastLED output.
Cleanup
src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h
Removes the NRF52840_XXAA "unknown variant" fallback block that previously provided default pin mappings for unrecognized nRF52840 configurations.
CI Workflow
.github/workflows/build_nrf52840_supermini.yml
Adds a reusable GitHub Actions workflow that triggers on master for selected paths and calls the shared build_template.yml with supermini_nrf52840 all.
Docs
README.md
Replaces one NRF52 badge line with an equivalent line (no change to links/badges).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

  • #warning "Unknown nRF52840 variant" #2422: Resolves the "#warning Unknown nRF52840 variant" by adding explicit board variant support for SuperMini, Nice!Nano V2, and nRFMicro, and removing the generic fallback.

Poem

🐰 Three boards hop into the light,
SuperMini, Nice!Nano, nRFMicro bright!
Pins now mapped with careful care,
No more warnings in the air. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly summarizes the main change: adding support for three nRF52840 board variants (SuperMini, nice!nano, nRFMicro), which directly addresses the issue of unknown nRF52840 variants.
Linked Issues check ✅ Passed The PR fully addresses issue #2422 by adding variant support to fastpin_arm_nrf52_variants.h with correct pin mappings, defining TARGET_* macros, marking NFC/control pins as invalid, and adding CI boards for compilation testing.
Out of Scope Changes check ✅ Passed All changes are scoped to the linked issue: board definitions in ci/boards.py, pin mappings in fastpin_arm_nrf52_variants.h, CI workflow for build verification, and README badge update—all directly supporting the variant support objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/nrf52840-supermini-promicro-2422

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.

Wire the new supermini_nrf52840 board into a dedicated GitHub Actions
workflow modeled on build_nrf52840_dk.yml so that the new TARGET_*
variant blocks are exercised on every relevant push.  Add the matching
badge to the NRF52 row of the README build matrix.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/build_nrf52840_supermini.yml:
- Line 5: The cancel-in-progress condition uses github.event_name ==
'pull_request' but this workflow is triggered only on push, so update the
condition to match the actual trigger: either add pull_request to the workflow
triggers under on: or change the condition to github.event_name == 'push' (or to
a logical expression that covers both, e.g., github.event_name == 'push' ||
github.event_name == 'pull_request') so that cancel-in-progress behaves as
intended; locate the existing cancel-in-progress line and the on: push
declaration to make the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e6a114e6-90a1-4cdc-814b-b298d93731b1

📥 Commits

Reviewing files that changed from the base of the PR and between 1a62b13 and aeec43f.

📒 Files selected for processing (2)
  • .github/workflows/build_nrf52840_supermini.yml
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

cancel-in-progress condition is currently ineffective

github.event_name == 'pull_request' will never be true in this workflow because only push is configured under on:. This means stale runs won’t be canceled for repeated pushes on the same ref.

Suggested fix
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}
-  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+  cancel-in-progress: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
cancel-in-progress: true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build_nrf52840_supermini.yml at line 5, The
cancel-in-progress condition uses github.event_name == 'pull_request' but this
workflow is triggered only on push, so update the condition to match the actual
trigger: either add pull_request to the workflow triggers under on: or change
the condition to github.event_name == 'push' (or to a logical expression that
covers both, e.g., github.event_name == 'push' || github.event_name ==
'pull_request') so that cancel-in-progress behaves as intended; locate the
existing cancel-in-progress line and the on: push declaration to make the
change.

@zackees
zackees merged commit 135ec0d into master May 10, 2026
7 checks passed
zackees added a commit to FastLED/fbuild that referenced this pull request May 10, 2026
…oards (#225)

Mirrors FastLED PR FastLED/FastLED#2445 by extending fbuild's regression
matrix to cover the three pdcook/nRFMicro-Arduino-Core community boards.
Each test platform reuses the nrf52840_dk_adafruit PlatformIO board (no
first-party board package exists for these community variants) and sets
the matching -DTARGET_* build flag so the FastLED variant code path is
exercised in CI. Adds three workflows and Nordic NRF52 README badges.

Closes #224

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees deleted the feat/nrf52840-supermini-promicro-2422 branch May 30, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#warning "Unknown nRF52840 variant"

1 participant