ICDPROG is a simple command line programmer for Microchip PIC controllers, using the Microchip ICD (in circuit debugger) as a programmer.

ICDPROG was originally written for linux. The current version (0.5) has also been ported to Windows32. It should be easy to port to other architectures, since it uses POSIX for serial port handling. The program is written for command line usage. It is useful where programming of a PIC via the ICD is required but use of the MPLAB IDE is not desired or possible e.g. to use the Hitech PICC compiler and GNU make on Linux.

This program is covered by the GNU GPL license, see COPYING and/or http://www.gnu.org/

It is also beta software so use at your own risk!


Version 0.5 has a number of new features notably:

A port of icdprog to Symbians EPOC R5 OS is also available. See http://www.btinternet.com/~adfhome/demarco5



Download the latest package from the Sourceforge download page.



The Linux executable has to be compiled using the following commands:

cd src

You will have to manually copy the executable to a suitable location like


A precompiled executable icdprog.exe is included in the package. Just copy it to somewhere on your executable path.

The Windows32 version is compiled with the mingw32 compiler. I have not tried the cygwin compiler, but I can't see any reason why it shouldn't work. I have also tried the Microsoft VisualSomeThing complier with success, but it doesn't have "getopt" in the library, so you need to supply your own (or like I did, comment it out).

If you want to compile it yourselves, use the Makefile_w32 makefile as follows:

cd src
mingw32-make -f Makefile_w32


The program has 3 modes invoked in different ways:

Options are:

Make sure that your icd has the latest firmware (2.31.00), You can use the Microchip MPLAB to do the upgrade if you have a flash controller.

The first ICDs that microchip produced can not be upgraded without changing the controller to a 16LF876, see Microchip ETN #21.


RedHat users (and probably other also, this depends on PAM) can add these two lines to their /etc/security/console.perms:

<console> 0600 <serial> 0660 root.uucp

The first line defines a new file class called <serial>, which are all serial ports on your machine. The second line tells the PAM system to change the owner of the serial ports to you and set the permission to 0600 (full access for the user and no access for others) when you log into the machine via the console, and put it back to 0660 root.uucp when you log out. Basically this makes the serial port yours when you log in locally, but not when you log in remote (it makes sense doesn't it ?).

Change the first line to "<serial>=/dev/ttyS1" if you want this to happen for only one port when you log in (eg. you have a modem which other users should have access to even if you are logged in).



If you have any problems with this software, please don't bug Microchip with them. This software was written without any help from them (it would have been much easier if they had released the specification of the ICD..). Use the sourceforge forum instead.


Project summary page
Project forum


ver 0.5 Improved UI using progress bars. Improved error checking. Implemented verify only mode for FLASH. Added EEPROM read/write/verify option. Added config word read/write/verify option. Added low latency serial comms for Linux.

ver 0.4 Compiles and works under Microsoft Windows. Added check for hex files without configuration word.

ver 0.3 Cleaned up reading of Intel hex files, now works with files with MS-DOS line terminations.

ver 0.2 Initial release on sourceforge.

ver 0.1 First version that could do anything useful ...


Geir Thomassen, icdprog@in.fer.no

Andrew Ferry, adfhome@btinternet.com

Hosted by:
SourceForge Logo Valid HTML 4.01!