You can check this document for your question. https://software.intel.com/en-us/node/704731 ;
In general, the debug config can generate the symbol for further debug capability(halt, stepping..) and release config will optimize the application build with some compiler parameter.
I want looking for a more in-depth comparison. I have seen that there is a single makefile used for both build configurations. Where exactly are the optimisation parameters set? I saw that there is a build variable that is used in the makefile to separate debug and release outputs, but I could not find where this parameter is set.
Makefiles pass in parameters to the build process. As such there are 3 phases, pre-processor, compiler and linker. You can pass in params to all three phases from the makefile. It sounds like you wish to know more about the compilation phases, in particular the release vs debug.
A C++ compiler will make a pass over the source and create object files (translation units or .o or .obj files). When the compiler does this it pays attention to the optimsation level you have specified (with -O). In a make file you specify the optimization level with the -O optional param.
Looking at gcc's optimizational levels for example can be achieved by passing in a compiler option...
" You can invoke GCC with -Q --help=optimizers to find out the exact set of optimizations that are enabled at each level. "
Taken from this link :
I wont list all the -o options here, but level 1 for example (-o1), the compiler will have a load of flags turned on that will mean it optimises the final compiled code more, meaning it will run better (faster/less mem).
Optimizations however take away debug info (so debugging becomes more difficult), they also mean more compilation time (and memory when compiling), so release mode and debug mode are the two mostly used when developing. debug mode when developing, and release mode for production.
Debug mode turns off most compiler optimsations, so you can debug more easily, i.e. it keep symbolic info so you can see the stack trace (list of function calls), it keeps a map so you can add breakpoints to functions, and watch variables. But the code size (the size of the code in the executable or library) is bigger (lots of additional stuff for the debugger is added/kept).
Release mode is normally heavily optimized -O3, which mean the code runs faster and less size, but no debug info. It takes longer the more optimisations levels, as the compiler use more look ahead to optimise.
So you can experiment with different levels, depending on what you want. Most people stick with max optimised for release, and min for debug.
I was a little vague on my inquiry. I am looking for the release and debug configurations specific to Intel Systems Studio for Microcontrollers QMSI projects for the Intel Quark Se C1000.
Both build configurations invoke the same "make" command and use the same makefile. This makefile makes use of a "build" parameter to separate build outputs but not to add any particular flags, so I am inquiring at what moment is the build parameter passed to the makefile created by default and when are the optimisation levels set?