AN4989
3
Compiling for debug
This chapter reviews the various options for debug-friendly compiling solutions.
3.1
Optimization
Compiler are usually configured by default to optimize performance and/or code size. In
most cases, this reduces or even prevents program debugging.
The most common symptoms resulting from code optimization are:
•
Problem to set or reach a breakpoint. Some lines are not accessible.
•
Impossibility to evaluate a variable (watch feature).
•
Inconsistency while stepping (what I get, is not what I see).
Therefore, for efficient debugging it is recommended to modify the code optimization option.
AN4989 Rev 3
Compiling for debug
33/118
117
Need help?
Do you have a question about the STM32 and is the answer not in the manual?