MplabX SDCC Adding Pic Devices

I really like MplabX and SDCC.

One slight problem I bumped into was that some PIC devices, although apparently supported by gputils and sdcc did simply not show up as available for use with SDCC in MPlabx when I tried to create a new project.

Just know that I am referring to Mplabx under Windows 7. Under Linux, the path might be different from what I am showing here. Also, other installations might differ from my install, so you might find things a little different on your system.

Knowing that the toolchain was well installed in MplabX (succeeded to build a test project earlier with an already existing device), I started looking for the place where MplabX gets the available devices list during project creation.

It turns out that the file: sdcc.languageToolchain.xml  where I need to add the missing devices is contained in a jar file named: br-unifei-rmaalmeida-toolchainSDCC.jar under the directory: C:\Users\Steve\AppData\Roaming\.mplab_ide\dev\v2.10\modules

(Obviously you will need to replace my user with your own username in that path.)

Screenshot 1

In order to edit the sdcc.languageToolchain.xml, I renamed the .jar file into a .zip file and extracted the .xml file. Then I edited it and added the device I was missing. Once done I added the xml file back to the .zip file and renamed that one to .jar again.

Adding the missing device
Adding the missing device

After restarting MplabX, my device (PIC16F1829) is now showing up as available for the SDCC toolchain!

SDCC now available for new project.
SDCC now available for new project.

I can also refer to following Microchip Forum entry which gives also some hints on adding new Pic devices: http://www.microchip.com/forums/m669474.aspx

Leave a comment