Because you can use the J-Link Microchip Adapter to connect to the target board using either the 2-wire JTAG (ICSP) or 4-wire JTAG interface, you must choose which one your project will use.
Selecting the Communication Type
Follow the steps below to choose the communication type:
If the communication type does not match the actual connection, you WILL get errors when MPLAB X tries to communicate with the J-Link.
Open the Project Properties window.
Select SEGGER J-Link node under Categories.
Select Communication Option Category.
Choose 2-wire JTAG or 4-wire JTAG for JTAG Method.