Skip to content

broken build: stm32h747xi_giga — multiple STM32 cores detected (Mbed + CMSIS-imported STM32_MCU_SERIES) #2784

Closed

Description

@zackees

Summary

The stm32h747xi_giga workflow (Arduino GIGA R1, build_giga_r1.yml) is currently failing on master. Confirmed both locally with bash compile stm32h747xi and on the CI run at https://github.com/FastLED/FastLED/actions/runs/27003825571 (latest commit on master at time of filing).

This is the next group from the README badge sweep started in #2779 / #2780 (which closed the four AVR-family failures).

Failure

The error fires from src/platforms/arm/stm32/core_detection.h:138:

src/platforms/arm/stm32/core_detection.h:138:4: error:
  #error "Multiple STM32 Arduino cores detected - conflicting definitions.
          Check your build environment."

It also emits a F_CPU redefinition warning from src/platforms/arm/giga/led_sysdef_arm_giga.h:39 (#define F_CPU 480000000 redefining the value the toolchain already provided on the command line). The redefinition is a warning today but should be cleaned up in the same change.

Root cause

core_detection.h defines five per-core flags (_FL_STM32_HAS_STMDUINO, _FL_STM32_HAS_ZEPHYR, _FL_STM32_HAS_MBED, _FL_STM32_HAS_LIBMAPLE, _FL_STM32_HAS_PARTICLE) and validates _FL_STM32_CORE_COUNT <= 1. The legacy LibMaple flag fires on:

#if defined(__STM32F1__) || defined(__STM32F4__) || defined(STM32_MCU_SERIES)

On the GIGA's Mbed-STM32H7 toolchain, both ARDUINO_ARCH_MBED and STM32_MCU_SERIES are defined — the latter is pulled in by Mbed's CMSIS/HAL layer for hardware register configuration, not because LibMaple is in use. The count goes to 2 and the hard error fires.

The elif chain in the same file already resolves the ambiguity correctly (Mbed wins over LibMaple by priority order), but the count macros don't follow that priority — so the validation rejects builds the actual core selection accepts.

Fix

Gate the secondary-core flags (LibMaple, Particle) on absence of the modern primary cores (STM32duino, Mbed, Zephyr), matching the elif priority. Genuine misconfigurations (e.g. ARDUINO_ARCH_STM32 + ARDUINO_ARCH_MBED defined simultaneously) still get caught.

Same PR cleans up the F_CPU redefinition by guarding with #ifndef.

Acceptance criteria

  • bash compile stm32h747xi passes on master
  • CI build_giga_r1.yml goes green on master
  • No regressions on the other STM32-family compiles in bash compile --supported-boards (stm32f103c8, stm32f103cb, stm32f103tb, stm32f411ce, nucleo_f429zi, nucleo_f439zi)
  • The F_CPU redefinition warning is gone

Out of scope


Next badge group after #2780 (AVR watchdog). Filed via /loop README badge sweep.

Activity

  1. added a commit that references this issue on Jun 5, 2026
    5d27167
  2. moved this from Triage to Done in FastLED Trackeron Jun 5, 2026
  3. added a commit that references this issue on Jun 5, 2026
    ef21c5a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions