Repository navigation
Description
Symptom
stm32h747xi_giga workflow has 44 failures / 0 successes on master and every recent main push fails with:
src/platforms/arm/compile_test.hpp:78:6: error:
#error "STM32 platforms should have FASTLED_ALLOW_INTERRUPTS set to 0"
78 | #error "STM32 platforms should have FASTLED_ALLOW_INTERRUPTS set to 0"
| ^~~~~
Reproducible: every recent stm32h747xi_giga workflow run on master.
Root cause
src/platforms/arm/compile_test.hpp lines 76-81:
#if defined(ARDUINO_ARCH_STM32) || defined(STM32F1)
#if FASTLED_ALLOW_INTERRUPTS != 0
#error "STM32 platforms should have FASTLED_ALLOW_INTERRUPTS set to 0"
#endif
#if FASTLED_USE_PROGMEM != 0
#error "STM32 platforms should have FASTLED_USE_PROGMEM set to 0"
#endif
#endifThe check is too broad. It fires for any platform that defines ARDUINO_ARCH_STM32 — which includes the Arduino Giga R1 (STM32H747XI). Giga runs on the Arduino Mbed core with the H7's much higher clock (480 MHz), and its led_sysdef_arm_giga.h deliberately sets FASTLED_ALLOW_INTERRUPTS = 1:
// Default to allowing interrupts
#ifndef FASTLED_ALLOW_INTERRUPTS
#define FASTLED_ALLOW_INTERRUPTS 1
#endifThat choice is correct for H7: at 480 MHz a clockless write has plenty of cycles to tolerate ISR latency, unlike STM32F1 at 72 MHz where any interrupt mid-write disrupts the WS28xx timing. The compile-time gate makes a sweeping assumption that's true for STM32F1 / STM32F4 but wrong for STM32H7 / Giga / Mbed-based STM32s.
Same shape applies to the FASTLED_USE_PROGMEM != 0 check immediately below — Giga sets it to 0 already (matches the gate), but the same gate-too-broad concern stands.
Proposed fix
Narrow the gate to exclude H7 / Mbed-based STM32s:
-#if defined(ARDUINO_ARCH_STM32) || defined(STM32F1)
+#if (defined(ARDUINO_ARCH_STM32) || defined(STM32F1)) \
+ && !defined(STM32H7xx) \
+ && !defined(FL_IS_STM32_MBED)
#if FASTLED_ALLOW_INTERRUPTS != 0
#error "STM32 platforms should have FASTLED_ALLOW_INTERRUPTS set to 0"
#endifFL_IS_STM32_MBED is already defined in src/platforms/arm/stm32/is_stm32.h for Mbed-based STM32 boards. STM32H7xx is a stock CMSIS define.
Test plan
- After the fix,
stm32h747xi_gigaworkflow goes green on the next push that touchessrc/**(the workflow's path filter). - STM32F1 / STM32F4 builds remain green (still gated, because they don't define either of the exclusion macros).
- Local:
bash compile stm32h747xi_giga --examples Blinksucceeds.
Related
- fix(stm32): guard fastspi <SPI.h> include on FASTLED_ALL_PINS_HARDWARE_SPI #2596 — fixed the prior SPI.h error on the same workflow. This
FASTLED_ALLOW_INTERRUPTSerror is what surfaces next.
Activity
fix(arm): exclude STM32H7/Giga from "interrupts must be off" gate (Fa…