Table of Contents
Microchip XC32 compiler
The XC32 compiler is available in a free edition as either the legacy MPIDE compiler or the core compiler.
The core compiler is a requirement for newer chip families such as the PIC32MM but doesn't include the legacy microchip libraries to build older projects.
The legacy libraries are available for download but only as a binary installation. Newer device families such as the PIC32MM have no legacy backward compatibility.
Linux AMD64
32-bit compatibility
apt-get install libc6-i386
Legacy MPIDE compiler
cd /opt/ wget https://chipkit.s3.amazonaws.com/0150release/mpide-0150-linux64-20150820.tgz tar zxvf mpide-0150-linux64-20150820.tgz ln -sf mpide-0150-linux64-20150820/hardware/pic32/compiler/pic32-tools
Core compiler with legacy libraries
Core compiler
cd /opt/ wget "https://chipkit.s3.amazonaws.com/chipkit-core/builds/linux64/chipkit-core-linux64.16778055.Branch_0299cad4-v2.0.6-2-g0299cad.zip" unzip chipkit-core-linux64.16778055.Branch_0299cad4-v2.0.6-2-g0299cad.zip ln -sf chipkit-core/pic32/compiler/pic32-tools
Legacy libraries
wget http://ww1.microchip.com/downloads/en/softwarelibrary/pic32%20peripheral%20library/pic32%20legacy%20peripheral%20libraries%20linux%20(2).tar tar xvf pic32\ legacy\ peripheral\ libraries\ linux\ \(2\).tar ./PIC32\ Legacy\ Peripheral\ Libraries.run
When installing the libraries above use the following install directory.
/opt/pic32-tools
Finally, disable the legacy warnings from the legacy header files.
find /opt/pic32-tools/pic32mx/include/lega-c -name "*.h" -exec sed -i 's/#warning/\/\/#warning/g' {} \; find /opt/pic32-tools/pic32mx/include/peripheral -name "*.h" -exec sed -i 's/#warning/\/\/#warning/g' {} \;
Raspberry Pi Raspbian
Legacy MPIDE compiler
cd /opt/ wget https://chipkit.s3.amazonaws.com/0150release/mpide-0150-raspberrypi-20150820.tgz tar zxvf mpide-0150-raspberrypi-20150820.tgz ln -sf mpide-0150-raspberrypi-20150820/hardware/pic32/compiler/pic32-tools
Core compiler with legacy libraries
Core compiler
cd /opt/ wget https://chipkit.s3.amazonaws.com/chipkit-core/builds/arm/chipkit-core-arm.16778055.Branch_0299cad4-v2.0.6-2-g0299cad.zip unzip chipkit-core/builds/arm/chipkit-core-arm.16778055.Branch_0299cad4-v2.0.6-2-g0299cad.zip ln -sf chipkit-core/pic32/compiler/pic32-tools
Legacy libraries
Perform the steps above for Linux AMD64 and afterwards copy plib.h and the lega-c and peripheral library and include files to the Pi.
For example, to archive and copy:
cd /opt/pic32-tools/pic32mx/include tar cvf lega-c.tar lega-c tar cvf peripheral.tar peripheral scp plib.h *.tar pi@pi: cd /opt/pic32-tools/pic32mx/lib find -name "libmchp_peripheral*" | tar zcvf lib.tgz -T - scp lib.tgz pi@pi:
To extract on the pi:
cd /opt/pic32-tools/pic32mx/include mv ~/plib.h . tar xvf ~/lega-c.tar tar xvf ~/peripheral.tar cd /opt/pic32-tools/pic32mx/lib tar zxvf ~/lib.tgz
Debian derived (Armbian, Bananian, Devuan)
As per RPi above, with the following step.
cd /lib ln -sf arm-linux-gnueabihf/ld-2.19.so ld-linux.so.3
Cygwin
Legacy compiler
Download and extract mpide-0023-windows-20140821.zip to c:\mpide-0023-windows-20140821
Run Cygwin terminal
mkdir -p /opt ln -sf /cygdrive/c/mpide-0023-windows-20140821/hardware/pic32/compiler/pic32-tools /opt/pic32-tools