Complete the Simple Programming Example
Before experimenting with debugging, ensure your system is properly configured by following the steps in the Simple Programming Example tutorial. Once you have confirmed that your system is working, then proceed through the following steps. The same source project is used for all tutorials.
Confirm Debugging License
All versions of the J-Link Debug Probe support full programming of the PIC32, but some versions of the probe require additional licensing for debugging. Those devices that do not already include the license (such as the J-Link BASE probe) will temporarily grant you a license. Each time you terminate a session and start a new one, you will have to request the license again.
Confirm Software Breakpoints are Enabled
Because the J-Link Debug Probe is able to place software breakpoints into RAM, breakpoints are extremely fast and there is no danger of wearing out the flash memory as would be the case with conventional flash based software breakpoints. For these reasons, Software Breakpoints are automatically enabled when the J-Link is chosen as the programmer/debugger tool. To confirm this, check that the project dashboard shows Unlimited BP (S/W): Enabled as shown in the figure below:
Set Breakpoints, Build Debug Project
Build the debug version of the project by clicking on the Build Debug Session icon, then set several breakpoints by clicking on the left margin as shown below:
Run and Confirm
Run and confirm that execution stops at each breakpoint by observing the location of the cursor, and the behavior of the LEDs.
Using the SEGGER J-Link as a debugger is that simple. You will notice that if you are using the 4-wire interface that the entire system is noticeably faster than any other programmer/debugger. 2-wire is slower due to the JTAG emulation, so it is recommended that you use 4-wire whenever possible. The only other consideration is that you may need to upgrade your J-Link Debug Probe by acquiring a permanent debugging license through SEGGER's link to *** Additional Software ***.