Update January 13, 2008
This page is for logging the development and implementation of the
components needed to program the USB bit whacker device from
Linux. This development started at an
"XP code sprint" on September 19.
First the preliminaries:
- What is the USB bit whacker?
- Its a Microchip PIC18f2455
micro controller with a USB boot loader and interesting firmware
allowing access to much of the PIC's IO and devices from as a serial
device when connected to a PC.
- What do I want to do with the BitWhacker?
- I'm going to
replace the interesting FW with my own built using SDCC, and replace
the Mark-III I'm using in my Robo Magellan project
Some links for the basic URL's I used to get started:
I found a libusb driver + application boot loader thing on the web but
I wanted to have a proper USB driver and a, hopefully, python firmware
load application. I used the "fsusb"
loader application for guidance, along with the actual boot loader
firmware source code
on the PIC.
The current tar ball implements a unit test that confirms that I can
program a new HEX file to the UBW.
Current project files: driver.tar.bz2,
If you want a patch of the driver to build into you very one kernel
I don't know if I'm going to push the driver into the up stream kernel
at this time. If its just for me I'm not sure its worth the
The driver code protects against writing to boot loader addresses, and
the python FW upload program does the uploads and a verification
step. It still doesn't do anything with the config, or eeprom
areas. These are not needed for my use and I don't plan to do
them, but if you have an itch to scratch and you add support for them
let me know and I'd be happy to include your enhancements in the
SDCC tool chain bring up:
Starting with the Rick Bronson SDCC port
linked to on the UBW web site; I cleaned up some of the Makefile
and got rid of some of the unused files. I am now using the
following as my starting point: D_143_Dec8.tar.bz2
I also found I needed a newer version of SDCC than what I got from the
Ubuntu apt-get install sdcc. If you want to reproduce what I did
sudo apt-get install gputils
svn co https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc sdcc
Configure and make the sdcc, sudo make install, then go into the
sdcc/device/lib/pic16 directory and edit the "pics.build" file to
remove the lines with 2620, 2682, 2685, 4620, 4680, 4682, 4685, 8620,
and 8680. (They wouldn't build given the versions of gputils or
sdcc source). Now do one more make install to get the libsdcc.lib
made and installed.
Take the starting point code and hack it up to implement the PIC
application I had running on the 16f877.
comments, and advice welcome firstname.lastname@example.org