Page 1 of 1

FASTLED STM32 doesnt compile

Posted: Thu Feb 03, 2022 5:37 pm
by stefan
:idea: :idea: :idea: :arrow: Does anyone have solution for compiling FastLed (any version) library with official STM32 core? STM32F1 is used

It just flush tons of undeclared classes and function errors, like it doesn't recognize FastLED library at all

Re: FASTLED STM32 doesnt compile

Posted: Sun Feb 06, 2022 3:56 am
by ozcar
It is not obvious to me that FastLED supports stm32duino. The README (for 3.5.0) has no mention of STM32, although is does say that “Maple” may be supported in future (something of a strange thing to be saying in 2022).

However, release_notes does mention STM32, eg “improved support” for STM32 in release 3.3.3.

I tried to compile the blink example, and it spat out this:

"This platform isn't recognized by FastLED... yet. See comments in FastLED/led_sysdefs.h for options."

There are a whole bunch of tests in led_sysdefs.h that it falls through to generate that message, including this one:

Code: Select all

#elif defined(STM32F10X_MD) || defined(__STM32F1__) || defined(STM32F2XX)
I don’t know what platform/core those refer to (perhaps somebody else here can recognise them). For the official STM32 core, I believe it could check for ARDUINO_ARCH_STM32, but it is probably not as simple as just changing a couple of ifdefs.

If that ends up being too much like hard work, then depending on what you intend on doing there may be other possibilities. Pixel LEDs have been mentioned if a few threads here previously. The “Roger” STM32 core includes a WS2812B library, but that won’t work unchanged on the official core, as far as I know. When doing a test related to one of the threads here I managed to compile an Adafruit Neopixel library example (I can’t recall now if I actually connected any LEDs, but I do remember that the waveform generated looked reasonable).