J-Link - Microchip PIC32 Support
J-Link fully supports super-fast, direct debugging via JTAG on Microchip PIC32 devices.
Supported Devices
Support for the traditional 4-wire JTAG interface is included, as well as support for the Microchip proprietary 2-wire ICSP® interface.For J-Link, an adapter is available which supports both, the 14-pin 0.1" header and the RJ11 connector. PIC32 support is included in all current J-Link probes (J-Link BASE, PLUS, ULTRA+, PRO and EDU) and can be used without purchasing any additional license. J-Link supports debugging and flashing of all PIC32 devices. For a detailed list of supported devices, please click here.
Three Target Interfaces
In general, there are three target interfaces available on PIC32 devices:
Interface No. 1
Debug via traditional 4-wire JTAG (IEEE1149.1): Supported by all PIC32 devices
Interface No. 2
Debug via Microchip proprietary 2-wire ICSP®: Does only allow proper debugging since the device is in a special programming mode where using the external oscillator as clock source, is not supported, making it useless for real debugging.
Interface No. 3
Programming via Microchip proprietary 2-wire ICSP®: 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 ICSP®:
- 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
Connectors for Headers
The J-Link Microchip Adapter provides connectors for all commonly used headers for PIC32:
- 14-pin 0.1" connector for 4-wire JTAG
- RJ11 connector for 2-wire ICSP®
- 6-pin PICKit connector (soldering option)
Click here for more information about the J-Link Microchip Adapter.
What is 2-Wire ICSP®?
2-wire ICSP® 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.
Download Speeds
The maximum download speed that can be achieved, depends on various factors such as target hardware, the target interface being used, if a J-Link BASE model or a high-end model is used.
- 4-wire JTAG: Up to 1 MB/s
- 2-wire ICSP®: Up to 250 KB/s
J-Link PRO and ULTRA+ deliver even higher performance.
Time Needed to Program 500 KB Into a PIC32MX Device
The following graphics show the time needed by J-Link to program a 500 KB image into an PIC32MX under various circumstances (device empty, device already programmed, ...)
* RealICE and ICD3 using ICSP for programming + debugging. Please note; ICD3 does not support 4-wire JTAG. ICSP mode on most MX devices does not allow debug images to run stand-alone (without debugger connected) and does not allow debugging release builds. RealICE via 4-wire JTAG takes 35 seconds to perform these operations.
Settings / Environment:
- MPLAB X V2.15
- PIC32MX795F512L on Explorer16 board
- J-Link software V4.88
- Target interface: 4-wire JTAG
- Target interface speed: 12 MHz
- This project: Download MPLAB X Project
Speed Measurement:
- Changed code: Device already programmed with image. New image differs in up to 10% from the pre-programmed one.
- Identical code: Device already programmed with the correct image. Debug session is just restarted.
- Time measurement: Manually, from hitting "Start debug" until application stopped at main().
- Time measurement does not include time taken for firmware update of RealICE / ICD3.
- Time measurement does not include build time of MPLAB X (make sure "Make for debugging" is performed prior to hitting "Start debug", so MPLAB X does not rebuild on debug session start)
- Time measurement J-Link + PIC32MZ: Since MPLAB X V2.15 does not support PIC32MZ with J-Link yet, times have been taken via J-Link Commander. "Total time" output by J-Link Commander has been taken as time reference
Time needed to program 500 KB into a PIC32MZ device
The following graphics show the time needed by J-Link to program a 500 KB image into an PIC32MZ under various circumstances (device empty, device already programmed, ...)
Speed Measurement:
- Changed code: Device already programmed with image. New image differs in up to 10% from the pre-programmed one.
- Identical code: Device already programmed with the correct image. Debug session is just restarted.
- Time measurement: Manually, from hitting "Start debug" until application stopped at main().
- Time measurement does not include time taken for firmware update of RealICE / ICD3.
- Time measurement does not include build time of MPLAB X (make sure "Make for debugging" is performed prior to hitting "Start debug", so MPLAB X does not rebuild on debug session start)
- Time measurement J-Link + PIC32MZ: Since MPLAB X V2.15 does not support PIC32MZ with J-Link yet, times have been taken via J-Link Commander. "Total time" output by J-Link Commander has been taken as time reference