Setting up a Linux Development Enviroment
Before you begin, you’ll need a basic development system setup. This should include gcc, GNU make and a good editor.
The following directions should also work with Mac OS X (Intel) and FreeBSD with a grain of salt.
1. Install ifi-picloader.
PICloader is a little C++ program that flashes the PIC18F8722 (or 8520) chip inside the robot controller. It should be noted that this program does have a few bugs, and it currently doesn’t work with Mac OS X. Anyone willing to help?
2. Install wine.
Wine is a windows emulation layer that allows you to run the compiler system (C18). We recommend to use the packages from winehq, or to build it from source, as the packages from debian seem to have some problems. Notice: Versions 0.9.19 to 0.9.24 have problems with the Microchip compiler. We recommend using the newer versions (0.9.27 as of this writing).
*Macintosh versions newer than 0.9.28 have problems building, so for Mac OS X, you will need to build wine from source. You should be able to build wine after installing Xcode and X11.
3. Install Microchip C18.
Run wine on the C18 installer (run as root so you can write to prefixes). Install to a good place, /opt (Z:\opt) works great.
*Mac OS X, open X11 and a xterm, and the use wine on the installer.
4. Download our Makefile.
Open the file with an editor and change anything that is needed for your system or code.
Everything should be set up now. ‘make’ will build your code, ‘make load’ will flash the robot controller, and ‘make clean’ will clean up all the object files.
*Mac OS X: You might have to edit the makefile and replace cpp with the output of ‘which cpp’