Page 1 of 1

How to perform the code optimization of ARM compiler on keil μVision 5?

Posted: 31 May 2021, 16:13
by a_ziliu
Introduction:
Perform the code optimization can reduce code size and improve performance. Generally, it will be trade-off between reduce code size and improve performance.
1. During developing phase
To prevent the assembly code changed by compiler, do not select any optimize function during developing phase
2. After program developed and function is verified
Select optimized function for reducing the code size and improving
the performance
Scenario:
1. Verify the program without any optimization
2. Reduce the code size and improve the performance

Optimization goal Table:

Use KEIL μVision 5 as an example to demonstrate how to perform the optimization:
Option > Target > Select ARM Compiler: V6.12

Option > C/C++ (AC6) > Select Optimization

Rebuild