Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It looks like FastLED isn't compatible with STM32F103C microcontroller #531

Closed
tutankhamen opened this issue Nov 29, 2017 · 16 comments
Closed

Comments

@tutankhamen
Copy link

It's weird because I can see

#elif defined(STM32F10X_MD)

in platform.h, but still getting:

fatal error: avr/io.h: No such file or directory

@stevstrong
Copy link

stevstrong commented Dec 7, 2017

You should use in your code
#elif defined (ARDUINO_ARCH_STM32F1)

@ajkeeton
Copy link

I tried that and now FastLED is searching for application.h which isn't included anywhere I've seen

@nk64
Copy link

nk64 commented Jan 2, 2018

I was able to get my Blue Pill (Generic STM32F103C Series) working with FastLED by following the instructions in this comment by @evq #142 (comment)

The main point for me was to manually merge in https://github.com/evq/FastLED/tree/stm32f103
which at the time boiled down to these 5 files:
"FastLED\platforms\arm\stm32\led_sysdefs_arm_stm32.h"
"FastLED\platforms\arm\stm32\clockless_arm_stm32.h"
"FastLED\platforms\arm\stm32\fastpin_arm_stm32.h"
"FastLED\led_sysdefs.h"
"FastLED\platforms.h"

I also did the code change to reduce the sketch size dramatically:
#142 (comment)

@ajkeeton
Copy link

Any interest in trying to get a pull request open? If not I might fork and try to get the ball rolling

@evq
Copy link

evq commented Jan 20, 2018

@ajkeeton Last time I offered to PR it didn't seem like there was interest. Maybe that's changed now that there's a larger community around the Blue Pill?

Please feel free to fork and attempt a PR, I'd love to see it merged and maintained!

I would suggest cherry-picking the following commit, there's a missing pin definition.
treeoftenere@8bea714

There's also this branch https://github.com/treeoftenere/FastLED/commits/tenere with parallel output. <3 @shlomozippel

@13rac1
Copy link

13rac1 commented Jan 25, 2018

👍 I'm using @evq 's branch with PlatformIO and a maple mini clone: https://github.com/eosrei/FastLED-STM32/commits/stm32f103

@kolyshkin
Copy link
Contributor

#568

@Fxlr8
Copy link

Fxlr8 commented Dec 8, 2018

@ajkeeton, I am facing the same issue with the application.h file missing even after #568. Have you solved it?

@AndKe
Copy link

AndKe commented Feb 19, 2019

Why is this issue closed ?
I got

/home/andre/Arduino/projects/libraries/FastLED/platforms/arm/stm32/led_sysdefs_arm_stm32.h:4:25: fatal error: application.h: No such file or directory
 #include <application.h>
                         ^
compilation terminated.

with blue pill & FastLED 3.2.6

@painthink
Copy link

avr/io.h: No such file or directory

@Hackswell
Copy link

You need to pick the proper board. It's probably Generic Black Pill STM32F103 or some such. Make sure you pull the newest FastLED because they included a lot of new stuff in a new release a few days ago.

@AndKe
Copy link

AndKe commented Dec 23, 2020

Happily, I just updated to 3.4.0 :)
Then I got:

home/andre/Arduino/projects/libraries/FastLED/src/led_sysdefs.h:53:2: error: #error "This platform isn't recognized by FastLED... yet.  See comments in FastLED/led_sysdefs.h for options."
   53 | #error "This platform isn't recognized by FastLED... yet.  See comments in FastLED/led_sysdefs.h for options."

In led_sysdefs.h I see

#elif defined(STM32F10X_MD) || defined(__STM32F1__)

Yet I cannot compile with CoreSTM32's "Generic 32F103C6" "BluePill F103C8" or "BlackPill F103C8"

The Chrismas grinch must have done that :(

@AndKe
Copy link

AndKe commented Dec 28, 2020

@focalintent - please reopen this issue.

@shlomozippel
Copy link
Contributor

@focalintent - please reopen this issue.

Sadly, he will not be reopening any more issues :(

As a bandaid - try adding || defined(STM32F103xE) or whatever appears in the product_line for the board you're using in CoreSTM32 boards.txt (https://github.com/stm32duino/Arduino_Core_STM32/blob/master/boards.txt)

@kriegsman
Copy link
Member

Would it be useful to open a fresh issue for this? Or should we continue it here?

@AndKe
Copy link

AndKe commented Dec 30, 2020

The bluepills I use have this define: build.product_line=STM32F103xB
So I changed led_sysdefs.h
#elif defined(STM32F10X_MD) || defined(STM32F1)
to
#elif defined(STM32F10X_MD) || defined(STM32F1) || defined(STM32F103xB)

this gave me another error:
FastLED/src/platforms/arm/stm32/led_sysdefs_arm_stm32.h:24:2: error: #error "Platform not supported"
24 | #error "Platform not supported"

so I changed in that file:
#elif defined (STM32F1)
to
#elif defined (STM32F1) || defined(STM32F103xB)

  • finally, I changed all references to STM32F1 to also accept STMF103xB like this:
$ grep -inr "__STM32F1__"
src/led_sysdefs.h:27:#elif defined(STM32F10X_MD) || defined(__STM32F1__) || defined(STM32F103xB)
src/platforms/arm/stm32/led_sysdefs_arm_stm32.h:16:#elif defined (__STM32F1__) || defined(STM32F103xB)
src/platforms/arm/stm32/fastpin_arm_stm32.h:63:#elif defined(__STM32F1__)  || defined(STM32F103xB)
src/platforms/arm/stm32/fastpin_arm_stm32.h:127:#if defined(__STM32F1__) || defined(STM32F103xB)
src/platforms/arm/stm32/fastpin_arm_stm32.h:170:#endif // __STM32F1__
src/platforms.h:27:#elif defined(STM32F10X_MD) || defined(__STM32F1__) || defined(STM32F103xB)
andre@loke:~/Arduino/projects/libraries/FastLED$ 

which only gave me this horror-show-error after initially promising almost-compilation:
https://gist.github.com/AndKe/60b7764042407f0b7dcc55986cc916d7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests