总的来说,在MPLAB X IDE下用J-LINK调试PIC32会有一些限制;推荐的做法还是使用Microchip自己的调试工具。
以下是帮助文档中,关于J-LINK相关部分的节选。
SEGGER J-Link Debug Probes
SEGGER J-Link debug probes bring JTAG development to MPLAB X IDE.
J-Link Debug Probes Supported
The following J-Link probe versions and types have been tested and are supported in MPLAB X IDE:
Version 9 and newer: J-Link BASE
The following J-Link probe versions and types should work in MPLAB X IDE:
Version 9 and newer: J-Link PLUS, J-Link EDU
Version 4 and newer: J-Link ULTRA+, J-Link PRO
To determine your probe version, look at the label on the back side of the probe, which describes the serial number and hardware version.
If you have an older version of J-Link debug probe, SEGGER offers a trade-in program which permits you to upgrade to the latest hardware version. SEGGER provides a discounted rate of the current list cost for the unit being traded in.
Supported Microchip Devices
To see a list of Microchip devices supported by the probe, go to: http://www.segger.com/jlink_supported_devices.html?m=Microchip
SEGGER J-Link Debug Probes : J-Link Microchip Adapter
J-Link Microchip Adapter
A adapter to use the J-Link probe with Microchip PIC32 devices is provided with a Segger J-Link probe purchased through Microchip. If you already own a supported Segger J-Link probe, you may purchase the adapter separately at:
Adapter configurations are shown in the figures below.
Figure: J-Link Microchip Adapter - 2-Wire JTAG
Figure: J-Link Microchip Adapter - 4-Wire JTAG
Available target interfaces
In general, there are three target interfaces available on PIC32 devices:
1. Debug via traditional 4-wire JTAG (IEEE1149.1)
2. Debug via Microchip proprietary 2-wire JTAG
3. Programming via Microchip proprietary 2-wire JTAG
(1) and (3) are supported by all PIC32 devices. (2) is supported by all later PIC32 devices, but not by some old ones. On such devices, debugging via 4-wire JTAG should be used. The following devices do not support full debugging via 2-wire JTAG:
• PIC32MX320 / 340 / 360 series devices
• PIC32MX420 / 440 / 460 series devices
• PIC32MX534 / 564 / 575 series devices
• PIC32MX664 / 675 / 695 series devices
• PIC32MX775 / 764 / 795 series devices
The J-Link PIC32 Adapter provides connectors for all commonly used headers for PIC32:
• 14-pin 0.1” connector for 4-wire JTAG
• RJ11 connector for 2-wire JTAG
• 6-pin PICkit connector (soldering option)
What is 2-wire JTAG?
2-wire JTAG is a proprietary debug interface defined by Microchip. Based on 4-wire JTAG device internally, using a 2-wire converter that multiplexes the TMS, TDI, TDO JTAG lines to a single data line to the outside and demultiplexes it to the inside. Requires a special conversion unit in the device. On older devices, this conversion unit was only activated in case the device was in the special 2-wire programming mode, but did not allow full debugging using the 2-wire protocol.