SpenceKonde/DxCore

Is there a way to change the optimization options for the compiler?

ProxyPlayerHD opened this issue · 3 comments

Because the chips have a lot of flash, being able to squeeze out a bit more speed at the cost of some flash seem worth it.
And i could've sworn the Tools menu in the IDE had options to change the Compiler flags (-Os, -O3, etc) but i can't find them.

looking into the boards.txt file i can see the options there but they're commented out. why? did changing the flags break something?

Closing. No plans to change, we tried options to change optimization, and it didn't work.

The compiler couldn't optimize it's way out of a wet paper bag anyway though so you aren't missing much. Really when you get to the point that you care about the optimization level.... you're usually past the point where the compiler is smart enough to help. GCC is brilliant, clever, and incredibly stubborn, and as intended, it converts code into an intermediate and equivalent internal form (which is why almost all attempts to give the compiler a push in the right direction are doomed to failure). This representation eventually gets passed off to the avr- half of avr-gcc, which proceeds to do a poor job of rendering it as avr machine code.

yea ok, fair enough.
i was mainly just wondering why it was removed, and i got my answer... because it breaks stuff.