- Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Sponsored Links

Latest News
  General News
  Press Releases
  Off Topic

Back to files

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""> <HTML>
<H2><FONT COLOR="008080">icdprog - a programmer for Microchip PIC controllers.</FONT></H2> <A HREF=""></A>; <HR>
ICDPROG is a simple command line programmer for Microchip PIC controllers, using the Microchip ICD (in circuit debugger) as a programmer. </P>
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.</LI>

<P>This program is covered by the GNU GPL license, see COPYING and/or <A HREF=""></A>; </P>
<P>It is also beta software so use at your own risk!</P> <H3>NEWS</H3>
<P>Version 0.5 has a number of new features notably:</P> <UL>
<LI>Verify only option to check FLASH contents without changing it.</LI> <LI>EEPROM write option to program individual EEPROM addresses.</LI> <LI>Config word write option to enable the config word to be changed without altering the FLASH program.</LI> </UL>
<P>A port of icdprog to Symbians EPOC R5 OS is also available. See <A HREF=""></A>; </P>
<LI>Works with PIC16F87x, x = [0,1,2,3,4,6,7] (3,7 is well tested ... )</LI> <LI>Reads intel hex format</LI>
<LI>Auto-detects controller type<?LI>
<P>Download the latest package from the <A HREF=""> Sourceforge download page.</A></P>

<P>The Linux executable has to be compiled using the following commands:</P>

cd src<BR>
<P>You will have to manually copy the executable to a suitable location like<BR> <CODE>/usr/local/bin</CODE></P>
<P>A precompiled executable icdprog.exe is included in the package. Just copy it to somewhere on your executable path.</P> <P>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).</P>

<P>If you want to compile it yourselves, use the Makefile_w32 makefile as follows:</P> <CODE>

cd src<BR>
mingw32-make -f Makefile_w32<BR>

<P>The program has 3 modes invoked in different ways:</P> <UL>
<LI>To program the contents of the hex file to flash/id locations/config word.<BR>

<CODE>icdprog <options> <I>hex_file</I> e.g. "icdprog pic001.hex"</CODE> </LI>
<LI>To program a single EEPROM addreess with a single byte of data<BR>

<CODE>icdprog <options> -e <I>address data</I> e.g. "icdprog -e 0x00 0x01"</CODE> </LI>
<LI>To program the config word without altering anything else<BR>

<CODE>icdprog <options> -c <I>data</I> e.g. "icdprog -c 0x3EFA"</CODE> </LI>
<P>Options are:</P>
<LI>-p <serial port> if the default port is not being used i.e /dev/ttyS1 instead of /dev/ttyS0

or COM2 instead of COM1</LI>
<LI>-v to verify only</LI>

<P>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. </P>
<P>The first ICDs that microchip produced can not be upgraded without changing the controller to a 16LF876, see Microchip ETN #21. </P>

<P>RedHat users (and probably other also, this depends on PAM) can add these two lines to their /etc/security/console.perms:</P> <CODE>
&#60console&#62 0600 &#60serial&#62 0660 root.uucp<BR> </CODE>
<P>The first line defines a new file class called &#60serial&#62, 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 ?).</P> <P>
Change the first line to "&#60serial&#62=/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). </P>
<LI>Better documentation, and web page</LI> <LI>Check sum calculation</LI>
<LI>Linux binaries (a RedHat RPM would be nice ...)</LI> </UL>

<P>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.</P>

Project <A href="">summary page</A><BR> Project <A href="">forum</A> </P>

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.</P>

ver 0.4 Compiles and works under Microsoft Windows. Added check for hex

files without configuration word.</P> <P>
ver 0.3 Cleaned up reading of Intel hex files, now works with files

with MS-DOS line terminations.</P> <P>
ver 0.2 Initial release on sourceforge.</P> <P>
ver 0.1 First version that could do anything useful ...</P>

<P>Geir Thomassen,</P> <P>Andrew Ferry,</P> </P>

Sponsored Links

Discussion Groups
  Networking / Security

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 All rights reserved.