Compile the Bus Pirate firmware
There is also generic guide to compiling PIC projects.
Get the code of Community Firmware v7.0 from Github
First, download and install Microchip's IDE called MPLAB X, and the free demonstration MPLAB XC16 compiler (which seems to have succeeded Microchip C30 compiler, according to [www.microchip.com/stellent/mplabc30 this page])
- https://github.com/BusPirate/Bus_Pirate - Source code
- http://dangerousprototypes.com/forum/viewtopic.php?f=28&t=8498 - Discussion thread
Feedback and patches are welcome!
MPLAB X (Win, Linux, Mac)
First of all, see the general MPLABX page how to install MPLABX. Then you open MPLAB X, load busPirate.X project, then clean and build it. If everything is correct, you will get a new .hex file in your build directory
You don't need a Microchip programmer to develop firmware for the Bus Pirate. You can use Microchip's free development tools and upload code through the USB bootloader. It's a mini PIC 24F development board!
- Open the Bus Pirate project in MPLAB.
- Uncomment the correct Bus Pirate hardware version and language in base.h.
- Compile the project. You may need to modify the compiler location when prompted, but MPLAB X is getting better about making these changes automatically.
Export for bootloader
Updated for v4 bootloader, see Compiling PIC projects for more: The compiled firmware must be exported in order to work with the bootloader.
- In MPLAB, go to File->Export...
- Make sure that the Program Memory box is checked and the range 0 to 0xa7fa is selected.
- Uncheck the Configuration Bits box.
- Make sure INHX32 (Intel 32bit HEX) is selected on the File Format tab.
- Click OK to export the firmware.
Bootload the firmware following your normal upgrade process.