This document shows, how to set optimization level for whole project and how to edit single files with different optimization level.
As soon as the project is created, it has set optimization level to 0 by default. This means, compiler do neither size optimization nor speed optimization. Optimization level can be set for every project according to the project requirements.
1) Optimization level set
Right click the project and select project properties. Click C/C++ Build ->Settings->Standard S32DS C Compiler ->Optimization. You can see, optimization level is none -O0.
Click the arrow on the right side of the list and choose the required optimization level. There are five options you can choose. Details description of the options are included in S32DS reference manual.
Chosen optimization is used for all files in the project.
2) Change optimization level for single file in the project
If you want to change optimization level for single file and do no affect another files, select required file, right click on it and select properties. As you can see, there are limited possibilities to set the file itself.
Select required optimization level, click apply and close the window. Now, selected file has different options than the rest of the project.
Hope it helps.