Closed sallevan closed 4 years ago
-flto is almost broken in the arm gcc for a long time, its not core related
@stas2z is right. LTO option is available but if you get error then simply do not use it. It seems in your case issue is related to the arduino cache but could not help on this too.
Objective Link-time optimisation, or LTO for short, is the crucial feature for embedded programming. Specifically, even simple Fourier transform using CMSIS_DSP libraries can easily overflow flash ROM for STM32F1xx line of microcontrollers.
To Reproduce The easiest way to test if LTO works or not is to use empty sketch (without any libraries included and with empty setup() and loop() functions), thanks to USB subsystem already exists in Arduino core for STM32.
Steps to reproduce the behavior:
Expected behavior You clearly should see "ST Microelectronics Virtual COM Port" in Device Manager again -- but you won't. After Windows USB subsystem times out, you will see Windows message "USB device not recognised".
Desktop:
Board:
Additional context
I have tried to modify boards.txt file adding
-fuse-linker-plugin
to GCC command line next to-flto
, but it doesn't help.