Optimization Levels of the Compiler#
You can tell the compiler to use different levels of optimization.
UltraZohm default for R5 is -O2
UltraZohm default for A53 is -O3
It is recommended to keep these options as they are.
Warning
If the compiler optimization is changed for debugging to -O1 or -O0, the timing of the program, interaction between processors as well as the PL changes. This might hide race conditions, prevent the bug that is searched from triggering, or increase the run time of the ISR over the allowed timing budget.
Step-by-step#
Open the project properties
![../../../_images/include_math_lib1.png](../../../_images/include_math_lib1.png)
Change the optimization level by following the steps:
C/C++ build -> Settings
ARM R5 gcc compiler -> Optimization
Optimization Level -> pull down menu to chose the desired level
Apply and Close
![../../../_images/gcc_optimization_level.png](../../../_images/gcc_optimization_level.png)