Repository navigation
fix(arm): exclude STM32H7/Giga from interrupts-must-be-off gate - #2615
Conversation
) stm32h747xi_giga workflow has 44/0 fail/success on master, every recent run dying at: src/platforms/arm/compile_test.hpp:78:6: error: #error "STM32 platforms should have FASTLED_ALLOW_INTERRUPTS set to 0" Root cause: the gate at line 76 was #if defined(ARDUINO_ARCH_STM32) || defined(STM32F1) — 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 at 480 MHz and deliberately sets #define FASTLED_ALLOW_INTERRUPTS 1 in its led_sysdef_arm_giga.h. That choice is correct for H7: a 480 MHz clockless write has plenty of cycles to tolerate ISR latency, unlike STM32F1 at 72 MHz where any interrupt mid-write disrupts WS28xx timing. Fix: narrow the gate to exclude STM32H7 and Mbed-based STM32s: #if (defined(ARDUINO_ARCH_STM32) || defined(STM32F1)) \ && !defined(STM32H7xx) \ && !defined(FL_IS_STM32_MBED) `FL_IS_STM32_MBED` is already defined in is_stm32.h for Mbed STM32 boards; `STM32H7xx` is a stock CMSIS define. Both are reliably present at compile_test.hpp time. STM32F1 / STM32F4 builds remain gated (neither exclusion macro is defined for them) so the original safety net stays intact for the families where the rule actually applies. Local: bash test --cpp fl_gfx_rgbww passes. Fixes #2614. Refs #2596 (prior stm32h747xi_giga SPI.h fix — this is the next compile error that surfaced once that was unblocked).
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe compile-time gate enforcing ChangesSTM32 Interrupt Allowance Gate
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Summary
stm32h747xi_gigaworkflow has been 44/0 fail/success on master. Every recent run fails at:Root cause
The gate at line 76 was
— 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 at 480 MHz and deliberately setsFASTLED_ALLOW_INTERRUPTS = 1inled_sysdef_arm_giga.h:That choice is correct for H7: a 480 MHz clockless write has plenty of cycles to tolerate ISR latency, unlike STM32F1 at 72 MHz where any interrupt mid-write disrupts WS28xx timing. The compile-time gate was making a sweeping assumption that's true for STM32F1 / STM32F4 (STM32duino) but wrong for STM32H7 / Giga / Mbed-based STM32s.
Same shape applies to the
FASTLED_USE_PROGMEM != 0check immediately below — Giga already sets it to 0 (matches the gate today), but the same gate-too-broad concern stands.Fix
Narrow the gate to exclude STM32H7 and Mbed-based STM32s:
FL_IS_STM32_MBEDis defined insrc/platforms/arm/stm32/is_stm32.h:122-124forFL_IS_STM32 && ARDUINO_ARCH_MBED.STM32H7xxis a stock CMSIS define.STM32F1 / STM32F4 builds remain gated (neither exclusion macro is defined for them) so the original safety net stays intact for the families where the interrupts-off rule actually applies.
Test plan
bash test --cpp fl_gfx_rgbwwpasses (compile_test.hpp is compiled by host tests).stm32h747xi_gigaworkflow: should turn green on next master push that touchessrc/**.led_sysdefsalready setFASTLED_ALLOW_INTERRUPTS = 0).Related
stm32h747xi_gigafix (SPI.h guard). ThisFASTLED_ALLOW_INTERRUPTSerror is what surfaces next once fix(stm32): guard fastspi <SPI.h> include on FASTLED_ALL_PINS_HARDWARE_SPI #2596 unblocks the earlier compile step.Fixes #2614
Summary by CodeRabbit
Bug Fixes
Documentation