This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

linker optimization flag -flto not working

Hi all, I'm working on sdk11.0.0 signed bootloader and I made change in it. Due to these changes bootloader size increased and not fit in the memory allocated to the bootloader for these I added linker optimization flag "-flto" as shown in below

image description

now the size is decreased and fitted in memory allocated to bootloader and it working fine on nrf51 but when I tested on nrf52 dfu failed in middle. Is their any problem using -flto with bootloader in sdk11.0.0. Can anyone help me?

Thanks in advance

Parents
  • There is no bootloader with signing in SDK v11.0.0, so I'm assuming that you've ported it from SDK v10.0.0? I also assume that you already have the optimize for size flag , i.e. -Os set? None of the examples in our SDK are compiled with LTO, so its not been verified by release testing that the examples function properly with this flag set. However, as far as I know there should not be any issues by compiling our examples with LTO.

Reply
  • There is no bootloader with signing in SDK v11.0.0, so I'm assuming that you've ported it from SDK v10.0.0? I also assume that you already have the optimize for size flag , i.e. -Os set? None of the examples in our SDK are compiled with LTO, so its not been verified by release testing that the examples function properly with this flag set. However, as far as I know there should not be any issues by compiling our examples with LTO.

Children
No Data
Related