opendps icon indicating copy to clipboard operation
opendps copied to clipboard

Change default build to O2

Open JackNewman12 opened this issue 5 years ago • 5 comments

This works for me and it makes the UI feel a little snappier (could be placebo, not sure if the UI is firmware or screen hardware limited).

If I have a large number of local changes or custom images I find the firmware won't fit in memory with O3. I've made it O2 for now to save any future headaches from new features.

JackNewman12 avatar Sep 29 '19 08:09 JackNewman12

That's interesting. The optimisation level is currently set here. I wonder if this is taking precedence over it It would be great to use O3, hopefully they get round to fixing the flto bug

Xenoamor avatar Sep 29 '19 20:09 Xenoamor

Good catch. Can't believe I didn't check that makefile. The -O2 I added gets appended after -Os in libopencm3.rules.mk

From the GCC manpage:

If you use multiple -O options, with or without level numbers, the last such option is the one that is effective.

I will move my changes when I get home.

JackNewman12 avatar Sep 30 '19 07:09 JackNewman12

If you move them then dpsboot will be compiled with it as well. It might make more sense where it currently is

Xenoamor avatar Sep 30 '19 09:09 Xenoamor

As soon as you move your changes @JackNewman12 I will merge this.

kanflo avatar Oct 10 '19 19:10 kanflo

We'll want to keep the bootloader as -Os I think. Give us the most FLASH we can for the application. The application as -O3 makes sense though if we can afford it

Xenoamor avatar Oct 10 '19 20:10 Xenoamor