Compiling for debug
3.1.3
STM32CubeIDE
In project Properties->Settings->Tool Settings->MCU GCC Compiler->Optimization
gcc also provides the -Og option:
-Og enables optimizations that do not interfere with debugging. It offers a reasonable level
of optimization while maintaining fast compilation and a good debugging experience.
3.2
Debugging information
Debugging information is generated by the compiler together with the machine code. It is a
representation of the relationship between the executable program and the original source
code. This information is encoded into a pre-defined format and stored alongside the
machine code.
Debugging information is mandatory to set breakpoint or get the content of a variable.
This chapter presents the location of the Debugging Information related option in IAR
Systems
36/118
Figure 20. STM32CubeIDE optimization level setting
®
®
, Keil
, and STM32CubeIDE.
AN4989 Rev 3
AN4989
Need help?
Do you have a question about the STM32 and is the answer not in the manual?