This is a summary of the steps involved in setting up development tools under Linux for Microchip PIC microcontrollers.
I have created Ubuntu Trusry packages for the most recent versions of gputils, psim and sdcc, and also updated the MPLAB X toolchain plugin for sdcc.
gputils and sdcc
Add PPA repository, update package list and install packages from PPA:
sudo add-apt-repository ppa:laczik/ppa sudo apt-get update sudo apt-get install gputils sdcc
The above should automatically pick the most up to date versions for gputils and sdcc, but if you want to make sure that the packages are installed from the PPA, check the exact version numbers in the PPA: ppa:laczik/ppa. Then copy/paste the version numbers into the apt-get install command, e.g.:
sudo apt-get install gputils=1.4.0-1-0zjl2 sdcc=3.4.0+vanilla-0zjl1
If you also want to install gpsim:
sudo apt-get install gpsim
sudo apt-get install gpsim=0.28.1-0zjl2
The above should also automatically install libgtkextra-3.0, which is required by gpsim, from the PPA.
Download mplabx and xc compiler(s):
wget http://ww1.microchip.com/downloads/en/DeviceDoc/MPLABX-v2.26-linux-installer.sh wget http://ww1.microchip.com/downloads/en/DeviceDoc/xc8-v1.33-full-install-linux-installer.run wget http://ww1.microchip.com/downloads/en/DeviceDoc/xc16-v1.23-full-install-linux-installer.run wget http://ww1.microchip.com/downloads/en/DeviceDoc/xc32-v1.34-full-install-linux-installer.run chmod +x MPLABX-v2.26-linux-installer.sh chmod +x xc8-v1.33-full-install-linux-installer.run chmod +x xc16-v1.23-full-install-linux-installer.run chmod +x xc32-v1.34-full-install-linux-installer.run
Uninstall any existing mplabx installation, e.g.
and install new version
sudo ./MPLABX-v2.26-linux-installer.sh sudo ./xc8-v1.33-full-install-linux-installer.run
SDCC toolchain plugin for MPLAB X
- Visit github.com/laczik/toolchainSDCC/releases/latest and download the most up to date version of the plugin .nmb package file.
- Copy the downloaded .nbm file ‘org-laczik-toolchainSDCC-x.x.x.nbm’ to your computer.
- In MPLAB X IDE, go to Tools – Plugins
- In the Plugins window, go to the Downloaded tab
- Click on Add Plugins…, and browse to select the .nbm file.
- Click on Install button located below in the Plugins window to install the plugin
- On clicking the Install button, a new window, the Plugin Installer screen comes up.
- Click on Next button to proceed.
- In the next screen, if there is a License Agreement displayed, you will need to check the checkbox at the bottom of the screen to confirm that you agree to the terms and conditions.
- Click on the Install button in the same. Further, if you come across a screen which says the plugin is not signed, or signed but not trusted, you may safely click on the Continue button to proceed with the installation.
- Once the installation is completed, you may click on the Finish button to close the installer. Click on the Close button to close the Plugins window.
- MPLAB X will restart to acivate the new plugin.
- After installation of the plugin, you can invoke it from the Tools – Embedded menu.
The above steps should automatically upgrade any already installed copy of the SDCC toolchain plugin. If that does not happen, it may be necessary to manually uninstall any already installed copy.
The above packages and plugin have only seen a limited amount of testing, so if you come across any problems or have any suggestions, your feedback would be most welcome.