Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:xc16 [2016/01/12 12:17] – [Free edition] darrontools:xc16 [2017/01/18 19:05] (current) – [Microchip XC16 compiler] darron
Line 1: Line 1:
 ==== Microchip XC16 compiler ==== ==== 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 include 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 === === Commercial edition ===
  
Line 11: Line 17:
 </code> </code>
  
-== Fetch ==+== Fetch and install ==
 <code> <code>
-wget http://ww1.microchip.com/downloads/en/DeviceDoc/xc16-v1.25-full-install-linux-installer.run+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
 </code> </code>
  
-== Install  ==+== Include files == 
 + 
 +Peripheral include files need to be fetched and installed separately. 
 + 
 +== Fetch and install ==
 <code> <code>
-chmod +x xc16-v1.25-full-install-linux-installer.run +wget "http://ww1.microchip.com/downloads/en//softwarelibrary/pic24 mcu dspic peripheral lib/peripheral-libraries-for-pic24-and-dspic-v2.00-linux-installer.run" 
-./xc16-v1.25-full-install-linux-installer.run+chmod +x *.run 
 +./peripheral-libraries-for-pic24-and-dspic-v2.00-linux-installer.run
 </code> </code>
  
-== Missing files ==+Use /opt/microchip/xc16/v1.30 as the install directory.
  
-Version 1.25 is missing some important include files so we need to get them +=== Free edition ===
-from 1.24.+
  
-<code> +The free edition utilises header files and libraries from the commercial edition so perform the installation steps given above firstThe free edition has no limitations and does not require a license for optimisations.
-wget xc16-v1.24-full-install-linux-installer.run +
-chmod +x xc16-v1.25-full-install-linux-installer.run +
-./xc16-v1.25-full-install-linux-installer.run +
-cp -Rpa /opt/microchip/xc16/v1.24/support/peripheral_* /opt/microchip/xc16/v1.25/support/ +
-</code> +
-=== 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.+The source code for the compiler needs a number of patches to build and operate. Patches were sourced from patches from the older c30 compiler and others created for XC16. The 
 +resultant build has proven to produce binary objects that work on the target devices.
  
 == Initialise == == Initialise ==
 <code> <code>
 cd /var/tmp cd /var/tmp
-apt-get install build-essential flex bison unzip mercurial+apt-get install build-essential flex bison unzip mercurial zlib1g-dev
 hg clone http://hg.kewl.org/pub/pic30 hg clone http://hg.kewl.org/pub/pic30
 cd pic30 cd pic30
 </code> </code>
  
-== Fetch == +The install process will apply a number of patches, build the compiler and tools and install everything in /opt/pic30-tools.
-<code> +
-wget http://ww1.microchip.com/downloads/en/DeviceDoc/v1.25.src.zip +
-</code>+
  
-== Install ==+== Fetch and install ==
 <code> <code>
 +wget "http://ww1.microchip.com/downloads/en/DeviceDoc/v1.30.src.zip"
 ./install ./install
 </code> </code>
 +
 +The install script expects the commercial compiler and includes files
 +to be installed so it may copy the support files to the build directory.
 +
 +The final output of this process is not elegant and can do with more
 +work but this is not a high priority.
  
 === Raspberry Pi === === Raspberry Pi ===
Line 60: Line 71:
  
 == Install emulator == == Install emulator ==
-[[tools:raspbian|Raspbian]]+[[tools:raspbian-emu|Raspbian emulator]]
  
 == Initialise == == Initialise ==
 <code> <code>
-mkdir -p /embedded/raspbian/opt/microchip/xc16/v1.25+mkdir -p /embedded/raspbian/opt/microchip/xc16/v1.30
-cd /embedded/raspbian/opt/microchip/xc16/v1.25+cd /embedded/raspbian/opt/microchip/xc16/v1.30
-cp -Rp /opt/microchip/xc16/v1.25/* .+cp -Rp /opt/microchip/xc16/v1.30/* .
 mkdir -p /embedded/raspbian/var/tmp/ mkdir -p /embedded/raspbian/var/tmp/
 cd /embedded/raspbian/var/tmp cd /embedded/raspbian/var/tmp
Line 75: Line 86:
 == Fetch == == Fetch ==
 <code> <code>
-wget http://ww1.microchip.com/downloads/en/DeviceDoc/v1.25.src.zip+wget "http://ww1.microchip.com/downloads/en/DeviceDoc/v1.30.src.zip"
 </code> </code>
  
 == Enter emulator == == Enter emulator ==
-[[tools:raspbian|Raspbian]]+[[tools:raspbian-emu|Raspbian emulator]]
  
 == Install in emulator == == Install in emulator ==
 <code> <code>
-apt-get install build-essential flex bison unzip+apt-get install build-essential flex bison unzip zlib1g-dev
 cd /var/tmp/pic30 cd /var/tmp/pic30
 ./install ./install
Line 100: Line 111:
 === Resources === === Resources ===
  
-[[http://www.microchip.com/pagehandler/en-us/devtools/dev-tools-parts.html|Microchip archive]]+[[http://web.archive.org/web/20160206013352/http://www.microchip.com/pagehandler/en-us/devtools/dev-tools-parts.html|Microchip downloads archive (old site)]] \\ 
 +[[http://www.microchip.com/development-tools/downloads-archive|Microchip downloads archive]]