5.2 Code Optimization
To reduce power consumption, optimize the studio-based firmware for speed. The Atmel Studio7.0 IDE supports various levels of speed optimization. The highest level of speed optimization is possible with optimization level -O3.
Among the available GCC and IAR™ compiler tool-chains for AVR XMEGA devices, the IAR compiler provides the best code optimization compared to GCC. Hence, for power critical applications using IAR compiler is a more preferable option.
- Select highest optimization level for Speed (-O3)
- Use the IAR compiler tool-chain for critical power requirements