Click to expand full text
AN720
P RECISION 32™ O P T I MI Z A T I O N C ONSIDERATIONS FOR C ODE S I Z E AND S PEED
1. Introduction
The code size and execution speed of a 32-bit MCU project can vary greatly depending on the way the code is written, the toolchain libraries used, and the compiler and linker options. This document addresses how to determine what portions of code are taking extra space or time and ways to optimize for space or speed for different tool chains, including GCC redlib and newlib (Precision32 IDE) and Keil.
2. Key Points
The key topics of this document are:
How
to determine what portions of the project are taking the most space Ways to benchmark code execution speed Common strategies to reduce code size or improve execution speed Code startup time and ways to reduce it
3.