This is an old revision of the document!


Microchip XC16 compiler

This is a C compiler for the dsPIC and PIC24 24-bit address word PICMicros.

Installation is comprised of two steps. The first step installs the commercial compiler and the support files. The second step is used to replace the compiler with the free edition. The support files are needed in step 2 from step 1.

Commercial edition

The commercial edition has optimisation limitations unless a license is bought.

Initialise
mkdir -p /opt/microchip
cd /opt/microchip
Fetch and install
wget "http://ww1.microchip.com/downloads/en/DeviceDoc/xc16-v1.30-full-install-linux-installer.run"
chmod +x *.run
./xc16-v1.30-full-install-linux-installer.run
Include files

Peripheral include files need to be fetched and installed separately.

Fetch and install
wget "http://ww1.microchip.com/downloads/en//softwarelibrary/pic24 mcu dspic peripheral lib/peripheral-libraries-for-pic24-and-dspic-v2.00-linux-installer.run"
chmod +x *.run
./peripheral-libraries-for-pic24-and-dspic-v2.00-linux-installer.run

Use /opt/microchip/xc16/v1.30 as the install directory.

Free edition

The free edition utilises header files and libraries from the commercial edition so perform the installation steps given above. The free edition has no limitations and does not require a license for optimisations.

Initialise
cd /var/tmp
apt-get install build-essential flex bison unzip mercurial zlib1g-dev
hg clone http://hg.kewl.org/pub/pic30
cd pic30
Fetch and install
wget "http://ww1.microchip.com/downloads/en/DeviceDoc/v1.30.src.zip"
./install

Raspberry Pi

This also depends on the commercial edition which must be installed as given above.

Install emulator
Initialise
mkdir -p /embedded/raspbian/opt/microchip/xc16/v1.30/
cd /embedded/raspbian/opt/microchip/xc16/v1.30/
cp -Rp /opt/microchip/xc16/v1.30/* .
mkdir -p /embedded/raspbian/var/tmp/
cd /embedded/raspbian/var/tmp
hg clone http://hg.kewl.org/pub/pic30
cd pic30
Fetch
wget "http://ww1.microchip.com/downloads/en/DeviceDoc/v1.30.src.zip"
Enter emulator
Install in emulator
apt-get install build-essential flex bison unzip zlib1g-dev
cd /var/tmp/pic30
./install
exit
Mount emulator directory in RPi

NFS

Install on RPi
cd /opt
cp -Rpa /embedded/raspbian/opt/pic30-tools .

Resources

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies