Install or update mplabx, gputils, gpsim and sdcc

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

or (e.g.)

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.

MPLAB X

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.

/opt/microchip/mplabx/Uninstall_MPLAB_X_IDE_v2.05

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.

6 thoughts on “Install or update mplabx, gputils, gpsim and sdcc”

  1. Hello.
    Nice work.
    Maybe this tool is for Ubuntu, but I am trying it to work under Win7, MPLABX 3.0. MPLABX does not show SDCC as a possible compiler for PIC18F family devices.
    I will try Mageia at home.
    Milan

  2. Hello
    (I don´t see my previous post so one more try)
    Thank You for this module but SDCC is not shown in Project properties->Compiler toolchain window for 18F devices.

  3. Hi Milan,
    I am away from my desk until next week, but if you cannot get it working until then I will take a look once I am back.
    Re windows, I don’t have any windows systems, so I cannot be of much help there, I am afraid. My guess though is that it is a path setting issue…
    John

  4. Hello.
    So exactly it does not nork for Baseline MCUs and Advanced MCUs. Now tested with Mageia4, MPLABX 3, SDCC 3.4, GPUTILS 1.4. If it is Win7 and Mageia issue, so it is not path.
    Regards, Milan.

  5. On Ubuntu 14.04 with sdcc 3.5.0, gputils 1.4.0, mplab x 2.26 I’m having the same problem as Milan B., SDCC is not showing for pic18f…

Leave a Reply

Your email address will not be published. Required fields are marked *