Skip to content
Turns any Linux device with spare IOs into a PIC programmer
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


lpicp: The embedded Linux PIC programmer
Copyright (c) 2011 Eran Duchan <>

This program is free software; you can redistribute  it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.

:: About
lpicp allows reading/writing/erasing the program, configuration and eeprom memory of
PIC devices from an embedded Linux environment. It allows you to turn any board running
embedded Linux with 4 spare GPIOs into a PIC programmer.

lpicp currently only supports a small set of PIC devices (PIC18F2xx/4xx and PIC18F2xxx/4xxx) 
but is extendable in such a way that keeps all device-specific code in device-specific modules 
(e.g lpicp_dev_18f_2xx_4xx.c). As more devices are supported, the shared code will undoubtedly 
change but will still atempt to eliminate the zillion "if (device == DEV_ID) {} else {}" that 
plague so many PIC programmers.

lpicp requires a custom ICSP kernel driver compiled into the kernel and instantiated with:
> mknod /dev/icsp0 c 245 0

:: More info and kernel driver

:: Compiling
The build environment supports both running on x86 (for testing purposes, without the ICSP
driver) and ppc, but more support can be added as needed by writing a cmake script.

To compile debug load for ppc:
- cd to build/ppc/debug
- cmake ../.. -DCMAKE_TOOLCHAIN_FILE=../tc-eldk-ppc-8xx.cmake -DCMAKE_BUILD_TYPE=Debug
- make

:: For future versions
- Program at offset/selective program
- Dump from device to HEX file (currently only prints the data to stdout)

You can’t perform that action at this time.