Repository navigation
feat(nrf52): add SuperMini, nice!nano, nRFMicro nRF52840 variants (#2422) - #2445
Conversation
) 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]>
📝 WalkthroughWalkthroughThis 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. ChangesnRF52840 Board Variants
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
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 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 |
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]>
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
.github/workflows/build_nrf52840_supermini.ymlREADME.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' }} |
There was a problem hiding this comment.
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.
| 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.
…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]>
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 nRF52840TARGET_NICE_NANO_V2→ nice!nano v2 (ProMicro-pin-compatible footprint, covers the ProMicro nRF52840 mentioned in the issue)TARGET_NRFMICRO→ nRFMicroPin tables in
src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.hare taken directly from each upstreamvariant.h. NFC pins (P0.09 / P0.10) and onboard control pins (user LED, EXT_VCC 3V3 enable) are declared with_FL_DEF_INVALID_PINso they are not silently accepted as FastLED output pins without explicit BSP-side reconfiguration.Also added three
ci/boards.pyentries (supermini_nrf52840,nice_nano_nrf52840,nrfmicro_nrf52840) so thatbash compile <board>exercises the new variant blocks via-DTARGET_*. They reuse thenrf52840_dk_adafruitunderlying board because no first-party PlatformIO board package exists for these community variants.Test plan
bash lint --cpp— passesbash compile supermini_nrf52840 --examples Blink— build is invoked correctly with the right defines (TARGET_SUPERMINI_NRF52840); compilation fails inside the Adafruit BSPcores/nRF5/utility/debug.cpp(ARDUINO_BSP_VERSIONmacro — pre-existing BSP issue, unrelated to FastLED)variant.h, so they should be correct, but a real-hardware sanity check is welcomeSummary by CodeRabbit
New Features
Build & CI
Documentation