You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nrf52: supermini_nrf52840 fails to build — FastPin redefinition between PCA10056 default and TARGET_SUPERMINI_NRF52840 #2626
bash compile supermini_nrf52840 fails on master with:
.../platforms/arm/nrf52/fastpin_arm_nrf52_variants.h:1012:10: error: #error "Cannot define more than one board at a time"
.../platforms/arm/nrf52/fastpin_arm_nrf52_variants.h:34:26: error: redefinition of 'class fl::FastPin<0>'
.../platforms/arm/nrf52/fastpin_arm_nrf52_variants.h:34:26: error: redefinition of 'class fl::FastPin<1>'
... (one per pin)
SUPERMINI_NRF52840 in ci/boards.py reuses real_board_name="nrf52840_dk_adafruit" to inherit a working BSP. The Adafruit BSP for that board auto-defines ARDUINO_NRF52840_PCA10056, so the PCA10056 pin-map block in fastpin_arm_nrf52_variants.h runs first and defines fl::FastPin<0..>. Then the TARGET_SUPERMINI_NRF52840 block (added in #2422 / PR #2422) runs second and redefines the same templates — triggering both the #error "Cannot define more than one board" guard and the C++ redefinition diagnostics.
TARGET_NICE_NANO_V2 and TARGET_NRFMICRO ride the same nrf52840_dk_adafruit BSP, so the bug would also fire on those community variants the moment they're exercised.
Fix
Gate the ARDUINO_NRF52840_PCA10056 block to defer when any of those community TARGET_* overrides is in scope, so the explicit user-provided override wins over the BSP-supplied default. Single-file change to src/platforms/arm/nrf52/fastpin_arm_nrf52_variants.h.
Activity