http://www.hcilab.org/resources/particles/particles-linux-mplab-howto.htm

PIC Microcontroller Programming using the MPLAB ICD2 with Linux

Please see our Particle How-To page for an overview on working with PIC18f6720-based Particle Computers as well.

The MPLAB ICD2 can be used with Linux! The original files our code heavily bases on use the LPLAB code from http://www.landamore.com/pic.html.

Though, the LPLAB code was not working for our PIC18F6720 from Microchip, due to problems with parsing the compiled HEX files, the communication with the serial port as well as the communication protocoll which relied on an old and hard-to-get MPLAB ICD2 firmware.

Our version works with the MPLAB ICD2 firmware supplied with Microchip's MPLAB 7.21, but should work with any firmware versions. The MPLAB ICD2 is connected to the computer using the serial port, or, preferred, the USB port.

Currently, we can

  • set the configuration bits
  • download HEX files generated with the CCSC C compiler and
  • program Particles with it
  • verifiy the downloaded code
  • use USB or serial connection
  • download the firmware (needed for switching between PIC16 and PIC18 devices)
  • verified and supported PICs: 18F6720, 18F252, 18F452, 16F873, 18F2550
  • simple textbased PIC definitions in /usr/local/share/icd2prog (changed!)

The tool currently provides a command line interfaces. We currently provide the raw sources which so far have been tested with Debian and Gentoo Linux.

If you have questions on the ICD2 programmer code for Linux, please contact us at icd2linux @ hcilab . org

Files - Code and Headers

  • icd2prog-0.30.tar.gz (UPDATED 02/02/2005)
  • kernel hack for usbcore module for comfortable sniffing of USB communication usbkernel usbkernelpatch.tar.gz
    after recompiling the kernel module, activate the logging by
    ''echo Y > /sys/module/usbcore/parameters/usbfs_snoop"
    deactivate sniffing by
    "echo N > /sys/module/usbcore/parameters/usbfs_snoop"

Files - previous releases

Links


Reply via email to