MPLAB
ICD 4 User's Guide
®
3.10
BREAKPOINTS AND STOPWATCH
Use breakpoints to halt code execution at specific lines in your code. Use the stopwatch
with breakpoints to time code execution.
•
Breakpoint Resources
•
Hardware or Software Breakpoint Selection
•
Breakpoint and Stopwatch Usage
3.10.1
In 16-bit devices, breakpoints, data captures, and runtime watches use the same
resources. Therefore, the available number of breakpoints is actually the available
number of combined breakpoints/triggers.
In 32-bit devices, breakpoints use different resources than data captures and runtime
watches. Therefore, the available number of breakpoints is independent of the
available number of triggers.
The number of hardware and software breakpoints available and/or used is displayed
in the Dashboard window (Window>Dashboard). See the MPLAB X IDE
documentation for more on this feature. Not all devices have software breakpoints.
For limitations on breakpoint operation, including the general number of hardware
breakpoints per device, and hardware breakpoint skidding amounts, see the online
Help file in MPLAB X IDE for the MPLAB ICD 4 In-Circuit Debugger limitations.
3.10.2
To select hardware or software breakpoints:
1. Select your project in the Projects window. Then, select File>Project Properties
or right click and select "Properties".
2. In the Project Properties dialog, select "ICD4" under "Categories".
3. Under "Option Categories," select "Debug Options".
4. Check "Use software breakpoints" to use software breakpoints. Uncheck to use
hardware breakpoints.
To help you decide which type of breakpoints to use (hardware or software), the
following table compares the features of each.
TABLE 3-2:
Number of breakpoints
Breakpoints written to*
Breakpoints applied to**
Time to set breakpoints
Breakpoint skidding
* Where information about the breakpoint is written in the device.
** What kind of device feature applies to the breakpoint. This is where the breakpoint is set.
DS50002596A-page 32
Breakpoint Resources
Hardware or Software Breakpoint Selection
Note:
Using software breakpoints for debugging impacts device endurance.
Therefore, it is recommended that devices used in this manner are not
be used as production parts.
HARDWARE VS. SOFTWARE BREAKPOINTS
Feature
Hardware Breakpoints
Limited
Internal Debug Registers
Program Memory/Data Memory
Minimal
Most devices. See the online Help,
Limitations section, for details.
Software Breakpoints
Unlimited
Flash Program Memory
Program Memory only
Dependent on oscillator
speed, time to program Flash
Memory, and page size
No
2017 Microchip Technology Inc.
Need help?
Do you have a question about the MPLAB ICD 4 and is the answer not in the manual?