SpenceKonde / megaTinyCore

Arduino core for the tinyAVR 0/1/2-series - Ones's digit 2,4,5,7 (pincount, 8,14,20,24), tens digit 0, 1, or 2 (featureset), preceded by flash in kb. Library maintainers: porting help available!
Other
542 stars 140 forks source link

Menu with optimization level #1038

Closed michpro closed 7 months ago

michpro commented 7 months ago

It would be nice if it was possible to set the optimization level from the menu (-Os, -O0..03, -Og, -flto).

SpenceKonde commented 7 months ago

This was tried and removed after discovering that nothing compiled without -Os if the sketch used serial inany way, because it doesn't like the trick I used to reduce thhe overhead for serial on some parts by over 80% (in terms of flash), and I do a similar ting with pin interupts. Greatly reduces duplicated code, but O2/O3 duiplicatedmy assembly and causes label collsions