How to specify optimisation option in Makefile?

If you have a simple question and just want an answer.
mogren3000
Member++
Posts: 19
Joined: Tue Apr 29, 2014 8:12 am

How to specify optimisation option in Makefile?

Post by mogren3000 »

Have some problem with makefile optimization.
if i change the debug flag from -O0 to -O2,-O3. This should get me some other output on the results.

but i dont see anything. my mesaurement values are the same. How can this be? Am I the wrong place for code optimization.

One very dumb thing is that when i build and the binary file is made i run it once with the -O0 flag and after that i go in and change it to -O3. Build it again and
I get this error:

"The program file specified in the launch configuration does not exist"

for some reason it deletes the binary, i have tried to clean the projekt att rebuild it and also make a whole new project and
the same thing happens all the time.

User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

Please check which Configuration are you building for (Debug/Release). You can set the desired configuration active by navigating to (from xTIMEcomposer tool):

Project --> properties --> C/C++ Build.

Select the desired configuration you want to set. If you want to change the optimisation levels in Make file, simply add the following based on your active configuration type and optimisation level:

XCC_FLAGS_Debug = -O0 -g

XCC_FLAGS_Release = -O2 -g