Repository navigation
Closed
Description
/home/andre/Arduino/arduino-1.8.10/arduino-builder -dump-prefs -logger=machine -hardware /home/andre/Arduino/arduino-1.8.10/hardware -hardware /home/andre/.arduino15/packages -hardware /home/andre/Arduino/projects/hardware -tools /home/andre/Arduino/arduino-1.8.10/tools-builder -tools /home/andre/Arduino/arduino-1.8.10/hardware/tools/avr -tools /home/andre/.arduino15/packages -built-in-libraries /home/andre/Arduino/arduino-1.8.10/libraries -libraries /home/andre/Arduino/projects/libraries -fqbn=STM32:stm32:GenF1:pnum=BLUEPILL_F103C8,upload_method=swdMethod,xserial=generic,usb=CDCgen,xusb=FS,opt=osstd,rtlib=nano -vid-pid=0483_5740 -ide-version=10810 -build-path /tmp/arduino -warnings=default -build-cache /tmp/arduino_cache_212059 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.STM32Tools.path=/home/andre/.arduino15/packages/STM32/tools/STM32Tools/1.3.1 -prefs=runtime.tools.STM32Tools-1.3.1.path=/home/andre/.arduino15/packages/STM32/tools/STM32Tools/1.3.1 -prefs=runtime.tools.CMSIS.path=/home/andre/.arduino15/packages/STM32/tools/CMSIS/5.5.1 -prefs=runtime.tools.CMSIS-5.5.1.path=/home/andre/.arduino15/packages/STM32/tools/CMSIS/5.5.1 -prefs=runtime.tools.arm-none-eabi-gcc.path=/home/andre/.arduino15/packages/STM32/tools/arm-none-eabi-gcc/8.2.1-1.7 -prefs=runtime.tools.arm-none-eabi-gcc-8.2.1-1.7.path=/home/andre/.arduino15/packages/STM32/tools/arm-none-eabi-gcc/8.2.1-1.7 -verbose /home/andre/Arduino/projects/libraries/FastLED/examples/ColorPalette/ColorPalette.ino
..................
I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/variants/PILL_F103XX /tmp/arduino/sketch/ColorPalette.ino.cpp -o /dev/null
Alternatives for FastLED.h: [[email protected]]
ResolveLibrary(FastLED.h)
-> candidates: [[email protected]]
/home/andre/.arduino15/packages/STM32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb @/tmp/arduino/sketch/build_opt.h -c -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -I/home/andre/Arduino/projects/libraries/FastLED/examples/ColorPalette -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/cores/arduino/avr -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/cores/arduino/stm32 -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/cores/arduino/stm32/LL -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/cores/arduino/stm32/usb -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/cores/arduino/stm32/usb/hid -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/cores/arduino/stm32/usb/cdc -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/system/Drivers/STM32F1xx_HAL_Driver/Inc -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/system/Drivers/STM32F1xx_HAL_Driver/Src -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/system/STM32F1xx -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src -w -x c++ -E -CC -DSTM32F1xx -DARDUINO=10810 -DARDUINO_BLUEPILL_F103C8 -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"BLUEPILL_F103C8\"" -DSTM32F103xB -DUSBCON -DUSBD_VID=0x0483 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"BLUEPILL_F103C8\"" -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DHAL_UART_MODULE_ENABLED -I/home/andre/.arduino15/packages/STM32/tools/CMSIS/5.5.1/CMSIS/Core/Include/ -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/system/Drivers/CMSIS/Device/ST/STM32F1xx/Include/ -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/system/Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/ -I/home/andre/.arduino15/packages/STM32/tools/CMSIS/5.5.1/CMSIS/DSP/Include -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/cores/arduino -I/home/andre/.arduino15/packages/STM32/hardware/stm32/1.7.0/variants/PILL_F103XX -I/home/andre/Arduino/projects/libraries/FastLED /tmp/arduino/sketch/ColorPalette.ino.cpp -o /dev/null
In file included from /home/andre/Arduino/projects/libraries/FastLED/led_sysdefs.h:37,Alternatives for avr/io.h: []
ResolveLibrary(avr/io.h)
-> candidates: []
from /home/andre/Arduino/projects/libraries/FastLED/FastLED.h:41,
Multiple libraries were found for "FastLED.h"
Used: /home/andre/Arduino/projects/libraries/FastLED
from /home/andre/Arduino/projects/libraries/FastLED/examples/ColorPalette/ColorPalette.ino:1:
/home/andre/Arduino/projects/libraries/FastLED/platforms/avr/led_sysdefs_avr.h:12:10: fatal error: avr/io.h: No such file or directory
#include <avr/io.h>
^~~~~~~~~~
compilation terminated.
Using library FastLED at version 3.3.2 in folder: /home/andre/Arduino/projects/libraries/FastLED
exit status 1
Error compiling for board Generic STM32F1 series.
Reacted by hrmny
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Failure to compile on STM32-Core (the official STM board library) avr/io.h: No such file or directory[/-][+]Failure to compile on STM32-Core because it is looking for avr/io.h[/+]ForsakenHarmony commentedon Jan 5, 2020
Having the same problem, board is a nucleo-64 stm32l476rgt6
matthewblackler commentedon Jan 26, 2020
Same problem. Any ideas?
AndKe commentedon Jan 26, 2020
If only one competent developer would look into this...
kriegsman commentedon Jan 28, 2020
So if you look at led_sysdefs.h on like 27, you'll see place where it tests for the STM32 platform.
https://github.com/FastLED/FastLED/blob/master/led_sysdefs.h#L27
I bet that if you add the correct constant as a third option to line 27, it'll select STM32 instead of AVR, and then we'll be past this problem.
Anyone want to give it a try? I don't know what the right constant is for "STM32-Core", but perhaps someone with this kind of a board can help out here?
AndKe commentedon Jan 28, 2020
@kriegsman I have it all hooked up, how can I help/find the right constant?
kriegsman commentedon Jan 28, 2020
Well, I just looked at the long 'compile' commands that you posted (thank you!) and it looks like one of them contains this:
-DSTM32F1xxand also-DSTM32F103xB, so maybe we're looking for__STM32F1xx__, or__STM32F103xB__. Or maybe a generic__STM32F1__?So try adding one of those on line 27 in led_sysdefs.h, and see if one of those let's it compile -- and if it compiles, does it work?
(You could probably do it with "STM32F1xx" without the underscores, but I'm looking for the underscore version that works, I believe, to include back into the library.)
Thanks for the help!
AndKe commentedon Jan 29, 2020
it got further with
#elif defined(STM32F10X_MD) || defined(STM32F1) || defined(STM32F103xB) || defined(STM32F1xx) || defined(STM32F103xB)
so one of them was good :)
Now there is a lot of errors about "SystemCoreClock" and a few others.
https://gist.github.com/AndKe/e5ff2958eb38c110ef0075f1f3e89f20
AndKe commentedon Jan 30, 2020
@kriegsman Please see above, what would be the next thing to try?
kriegsman commentedon Jan 30, 2020
Thanks for the help, and the verbose output (above).
Questions you could help with: first, see if you can figure out which of those codes made the compilation succeed further? I.e., was it
__STM32F1xx__or__STD32F103xB__? And second, what is the exact name of the 'board' that you are selecting in the Arduino IDE Tools menu? (And while I'm asking... what board is this, and where did you get it?)kriegsman commentedon Jan 30, 2020
Also, see if you can find out what the value of F_CPU is on your platform. It looks like maybe it's not defined to be an actual specific constant value for some reason? (but it probably needs to be, for FastLED to get the cycle timing right)
kriegsman commentedon Jan 30, 2020
Ah yes, my esteemed colleagues @focalintent and @GianniDPC our had already tracked this down and was discussing it over in #872 which arose from an issue in the Arduino STM32 support itself, possibly now corrected? stm32duino/Arduino_Core_STM32#613
So it looks like we're all chasing the same issues here.
AndKe commentedon Jan 30, 2020
@kriegsman
defined(STM32F103xB) did the trick.
The Board "Generic STM32F1 series"
the "board part number" is "BluePill103C8"
The actual hardware is one of the many "BluePill" boards on ebay.
F_CPU may not be defined, but should be 72Mhz (can I set it somewhere?)
As for "possibly now corrected" the stm32duino/Arduino_Core_STM32#613 fix was merged for 1.7.0 milestone, now I am on 1.8.0 release, and experiencing the problem.. so ... no.
kriegsman commentedon Jan 30, 2020
Thank you for the info about
__STM32F103xB__and the board info.You're right that the upstream "fix" doesn't completely solve the problem by itself but I believe that it is now solvable, which it was not before. I'll look into it, but basically I think we need to figure out where and how to
#undefand then re-#defineF_CPU(to 72000000).Hackswell commentedon Apr 22, 2020
from fastspi_bitbang.h
#define MIN_DELAY ((NS(35)>3) ? (NS(35) - 3) : 1)Then in fastled_delay.h:
And finally in: STM32/hardware/stm32/1.8.0/cores/arduino/stm32/stm32_def.h:
#define F_CPU SystemCoreClockWhich SystemCoreClock is a function, not a constant. CAN this be hard-coded safely, or is the proper usage for STM32 to use the SystemCoreClock() function? The clock of the STM32 can be changed, correct? So, might need to be put into a function rather than a macro, no? Could the value be set once in a static variable in the function after SystemCoreClock() is called, then just return the cached value?
Edit: Can we somehow use HSE_VALUE for STM32F4xx boards instead, mayhaps? It's a constant.
sallevan commentedon Apr 22, 2020
No and no.
No, it can not be hard-coded safely: @focalintent wrote some time ago that we will hard-code it, but software that uses FastLED should not attempt to change core frequency.
This is because of how FastLED has been written.
No, we can not use non-constant F_CPU definition because FastLED relies on compile-time calculations involving that constant (specifically, template instantiation).
Yes, this is correct.
Hackswell commentedon Apr 22, 2020
Understood!
Then on STM32F4, F_CPU should just be set to HSI_VALUE instead, no?
from system_stm32f4xx.c:
Hackswell commentedon Apr 23, 2020
Has anyone reviewed GianniDPC's pull requests? It seems like they've made good progress on the STM32F1xx line of FastLED. If their pull requests are sufficient, I'd like to piggy-back my work off theirs. Maybe pull the requests into a STM32 branch?
GianniDPC commentedon May 5, 2020
It's been some time. But it was working with my PR's. I'm using it on one of BluePills right now to drive a WS2812 led strip.
Can you try cherry picking commits from my PR?
AndKe commentedon Jul 26, 2020
@GianniDPC
It is a while since, now I get (with FastLED 3.3.3):
please point me to the related PR's, if any .
docs: point fbuild deploy refs at #595 (the shipped LpcDeployer), not #…