Microchip ICD3 Issue – Part 2

Continuing from my previous post (if you haven’t read it yet, read it here)

Another issue seen while using ICD3 is given below:


If the detected Target Device ID is 0x0000000, then there is some issue in the communication between ICD3 and the target device. Please re-check all your connections.

The reason for this other target device ID mismatch could be any one of the following:

  • A wrong target chip is selected in MPLab project.
  • Ensure whether the target device is the same as you think.
  • You might need a Debug adapter to Debug.

Narrow down the issue by doing Self-Test procedure on ICD3 (refer Part 1). If it goes through, then it is obvious that the issue is on the target board. You will have to check the following in such circumstances:

  • Ensure the 5 programming pins on the target (PGC, PDA, nMCLR, VDD, VSS) are properly connected and that the device is getting VDD from your power source.
  • There is proper decoupling capacitor on all the required pins.



Thanks a lot for stopping by to read this post.
If you like this post, share it with your friends.
If you have any suggestions, leave a comment.
If you never want to miss a post, please subscribe.


Microchip ICD3 Issues – Part 1

To design ICD3 programming circuit, follow the design guidelines found in the below link:


Note: nMCLR pin should be pulled to Vdd by 4.7k as shown in figure below:

Interface ICD3

A frequently seen issue while using ICD3 is given below:


To resolve this issue, follow the steps below:

Self test ICD3:  The Test Interface board is meant for checking communication between the PC and ICD3. This test ensures that the ICD3 is functioning properly. After connecting the ICD3 Test Interface board to the ICD3, you need to select “Run ICD3 Test Interface” from Debugger ->Settings->Status tab.

Following messages in the Output window confirm that the ICD3 is working fine:


If the self test pass then change the ICD3 settings in project properties:

ICD3 settings

Uncheck the “use latest firmware” and manually browse to the firmware folder/file.

firmware path

Using the default firmware will fix this issue .

Let me know if this helped 🙂

Thanks a lot for stopping by to read this post.
If you like this post, share it with your friends.
If you have any suggestions, leave a comment.
If you never want to miss a post, please subscribe.


A Quick Introduction

MPLAB X IDE is a software program that is used to develop applications for Microchip microcontrollers and digital signal controllers. This development tool is called an Integrated Development Environment, or IDE, because it provides a single integrated “environment” to develop code for embedded microcontrollers.

Why build from Command line, when I can do with one click

                              We can build the project in MPLAB X IDE with one click on any of the following icons

In this way the IDE works great and makes it easy to develop and build projects. however, building releases locally on developer machines is not the ideal way to be releasing software. Usually we want to automate the build and test software continuously using a platform like Jenkins. Jenkins is cross-platform, continuous integration and continuous delivery application that increases your productivity. Using Jenkins to build and test your software projects continuously makes it easier for developers to integrate changes to the project and makes it easier for users to obtain a fresh build. It also allows you to continuously deliver your software by providing powerful ways to define your build pipelines and integrating with a large number of testing and deployment technologies. Continuous Integration (CI) and automated build servers solve this problem and are in widespread use by the software industry.

To automate build, we need to set up Embedded toolchains which can be complicated and time-consuming. IDEs do a good job of making this easy, but build servers usually require building the projects through scripts and the command line. I’ve seen a lot of people asking questions about how to build their MPLABX projects through the command line, presumably so that they can set up automated build servers for their projects.

The process is really quite simple once you understand how MPLABX builds a release.,

  • Firstly it generates a Makefile based on the build configuration and settings of your project.
  • Secondly it runs the build using the generated Makefile.

Following steps show how to set up and build from command line:

Environment Setup 

  1. Make sure you have the latest version of MPLABX. Look inside your MPLABX installation folder and browse to batch file which creates makefile C:\Program Files(x86)\Microchip\MPLABX\v3.05\mplab_ide\bin\ . If you see a file called prjMakefilesGenerator.bat then move on to the next step. Otherwise, update your copy of MPLABX.
  2. Add the folder containing prjMakefilesGenerator.bat to PATH. This will allow you to run the Makefile generator simply by typing its name on the command line. On Windows, the directory you will need to add to PATH will most likely be C:\Program Files(x86)\Microchip\MPLABX\v3.05\mplab_ide\bin\.
  3. Add the MPLABX utilities required to run a Makefile to PATH. The utilities are located inside the MPLABX installation folder inside of \gnuBins\GnuWin32\bin\ . This will allow you to run the Makefile simply by using the command make . On Windows the directory you will need to add to PATH will most likely be C:\Program Files (x86)\Microchip\MPLABX\v3.05\gnuBins\GnuWin32\bin\ . Make sure that you don’t have any other make commands on your path else this might cause some issues.

What Next

Building the Project

  1. Open up a command line and browse to the project’s root folder.
  2. Run the prjMakefilesGenerator.bat to generate the Makefile.

    The Makefile should now appear in the project’s root directory. If you are going to be building on a build server, you won’t always know what the full path is. On a Windows build machine, you could use the following command instead:

    This will automatically insert the path of the current directory when you run the command.

  3. Find out what the build command is by running the GUI version of MPLABX. Open the project you are trying to build and run the “Clean and Build” command. Then look in the Output window (If you don’t see it, try Windows > Output > Output) to see the command that was run. Look for the first command starting with make . The command should look something like this:


commandline capture

  1. You can replace buildconfigname from the line above with whatever build configuration you want to build.