ATMEL UC3 32 Bit Processors and GCC Compiler Optimization
We have been working on some 32 bit applications here in the lab using the ATMEL 32 Bit UC3 Processors. The AVR GCC compiler has various optimization levels and there is a lot of information on the web about what the various levels do and what we should be using (or at least opinions as to what we should be using).
Being an engineer - I like actual data, so I took one of ATMELS rather large DSP applications that has a LCD GUI and I ran it through all the optimization levels just to see what the code size improvement is.
Well, there you have it. For this big application (200k of Flash Used!) the results of the best to no optimization is just under 10% reduction in size, I did not try to measure execution speed as the -O0 code seemed to run the GUI just fine.
The AVR32-SIZE is the actual flash memory usage. Just for comparison I also plotted the raw HEX file size. As can be seen the % decrease in the HEX file tracks the actual reduction in the flash memory usage very well.
All the optimizations have some issues: In debugging or in the way the code may or may not actually work, so it is best to study some of the options first before you commit to actual plans.
The code was compiled in AVR Studio 6 that was current on 6Jun12.
Steve Hageman
www.AnalogHome.com
No comments:
Post a Comment