In the Nios® II Software Build Tools (SBT) for Eclipse, optimize level setting from the GUI is done on a per-project basis for applications and BSPs, and it is not possible to change the optimize level on a per-file basis.
However, by using #pragma, you can set the optimization level per function.
#pragma GCC optimize ("O0")Add the above line before the function for which you want to change the optimization level, and write the desired optimization level in parentheses after "optimize".
Note that the optimization level can only be changed on a per-function basis, so adding the above description to a function will result in an error.
--------------------
Category: Nios® II
Tool: Nios® II EDS
Device: -