User manual

In-circuit debugging UM0036
228/385 Doc ID 7705 Rev 11
Figure 163. Setting the option byte values
Note: After changing an option byte setting that is not compatible with ICD, the original setting is
no longer visible in the Value field. Only settings that are compatible with ICD can be viewed
and selected. You will have to use a programming tool if you need to change option byte
settings to an ICD-incompatible setting.
7.2 Using breakpoints
When doing in-circuit debugging with STVD, you can use advanced breakpoints (see
Section 7.2.3: Setting advanced breakpoints), in addition to simple instruction breakpoints.
Advanced breakpoints stop the application when the conditions that you specify are met
whereas instruction breakpoints simply stop the application when it reaches a specified line
of code.
Breakpoints are generated in two ways:
Software breakpoints rely on trap instructions to create instruction breakpoints with
ICC, and on a dedicated instruction with SWIM
Hardware breakpoints rely on the MCU’s debug module(s) for instruction and
advanced breakpoints
The number of instruction or advanced breakpoints allowed at the same time depends upon
the type of microcontroller you are emulating, the number of debug modules it has and the
type of memory used (see Example).
7.2.1 Software breakpoints
By default, when you set an instruction breakpoint, STVD uses software breakpoints. An
unlimited number of software breakpoints can be used in address ranges corresponding to
memory that is writable byte-by-byte (such as RAM and XFlash memory).
However, software breakpoints cannot be used in memory areas that are not writable byte-
by-byte (such as HDFlash, XFlash sector 0 and ROM memory areas). Therefore, instruction
breakpoints in those memory areas rely on the MCU’s debug modules and hardware
breakpoint technology.