(Based mostly upon http://dangerousprototypes.com/docs/Compile_the_Bus_Pirate_firmware)
– grab the source from https://github.com/BusPirate/Bus_Pirate
# cd Bus_Pirate/Bootloaders/BPv4-bootloader/pirate-loader
# gcc -o pirate-loader pirate-loader.c
# cp pirate-loader /usr/local/bin
– Go to http://www.microchip.com/mplab/compilers
– Download MPLAB® XC16 Compiler v1.34 (or later version)
– install the 32-bit libraries
apt-get install libc6-i386
– run xc16-v1.34-full-install-linux-installer.run
– /opt will require 1.7Gb of space for the compiler
– You’ll get a host ID at the end:
Your Host ID is: [28d2440b7390]:
(Refer to point 3 on the original site to grab the license)
– You’ll need to download the MPLAB-X IDE (and as a result, you’ll need an X-based system)
Download a non-4.x release:
ww1.microchip.com/downloads/en/DeviceDoc/MPLABX-v3.65-linux-installer.tar
– There are a bunch of 32-bit libraries required by the IDE, so if You’re running on an amd64 system, these
libraries need to be installed. Recent Debian systems support multiple architectures (i.e. Stretch).
Recommended approach:
dpkg –add-architecture i386
apt-get update
apt-get install libx11-6:i386 libexpat1:i386 libxext6:i386 libc6-i386
– install MPLABX
– check out the BusPirate sources (git clone https://www.github.com/BusPirate/Bus_Pirate.git)
(it should be checked out as the user who’ll run the X / IDE, otherwise the IDE will blurb a bunch of perm denied errors.)
– start up your X env
– source in the license/hostID file
– start mplab_ide (the “hostID” file source should add its path)
– Refer to “Building with MPLAB X”
– After the build, collect the .hex files:
cd Bus_Pirate
cp Bootloaders/BPv4-bootloader/firmware-v1/bpv4-bootloader.X/dist/default/production/bpv4-bootloader.X.production.hex .
cp Firmware/busPirate.X/dist/BusPirate_v4/production/busPirate.X.production.hex .
I’ve also started uploading the pre-compiled trunk firmwares to https://github.com/wigyori/buspirate .