devanlai / dapboot

DFU Bootloader for STM32 chips
Other
337 stars 111 forks source link

Use link-time-optimization in the build. #22

Closed dmsc closed 4 years ago

dmsc commented 4 years ago

Using gcc-arm-none-eabi-9-2019-q4-major this gives a bootloader binary about 900 bytes smaller.

The resulting binary was tested on a blue-pill board: entering the bootloader, reading flash and writing flash all worked ok.

devanlai commented 4 years ago

This looks good to me - I could never figure out how to get LTO working with locm3. I tested it on my bluepill board and an STLink/v2 clone and it seems to work fine on both.