This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Enabling link time optimisation leads to __main fault

I am using a bootloader on the STM32F207ZET controller at address 0x0800 0000, and the application is located at an offset of 16KB.

When I enable Link Time optimisation, control jumps to startup_stm32F207xx.s startup code, and calls SystemInit but results in BUS FAULT when branching to __main.

Disabling LTO makes it work again, meaning the implementation is correct.