If you need more breakpoints than the microcontroller’s debug hardware offers follow the steps below.
1. Disable breakpoints that are not currently in use. Open Debug menu / Breakpoints / Hardware Breakpoints dialog.
The Hardware Breakpoints dialog might differ with individual microcontroller families.
2. Select Hardware menu / Use Software Breakpoints. Once the option Use Software Breakpoints is checked, every new breakpoint will automatically be implemented as a software breakpoint.
Types of brekpoints:
Remember the difference between software and hardware breakpoints:
Hardware Breakpoints (HW)
Breakpoints that are already provided by the CPU’s hardware debug circuitry. The number of hardware breakpoints is limited per device. Sometimes the associated registers are also shared with other debug hardware-based features.
Software Breakpoints (SW)
Used to work around limitations in the number of hardware breakpoints. The debugger uses dedicated software breakpoint instructions to implement them. This instruction is written over the original instruction at the desired breakpoint address. When execution is continued from such a location the original instruction is reinserted into the program flow before proceeding.
You can check which type of breakpoint is used by opening the Execution Breakpoint dialog. SW in the address field means that a software breakpoint is in use, HW stands for hardware breakpoint.
- Click Debug menu / Breakpoints or
- Breakpoints button from main toolbar
offers an enhanced view of the conditional breakpoints, as well as shortcuts for faster manipulation of all the breakpoints in the project.