From DP

Revision as of 10:33, 28 November 2010 by Dpropicweb (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation , search



MPLAB X is the next version of the Microchip development software for PIC microcontrollers, succeeding MPLAB 8.60. At the moment it's still in the Beta phase. See here (pdf) for a short introduction to this new IDE.

  • Based on Java / Netbeans
  • Supported under Windows, Linux and Mac OS X 10.5 and Mac OS X 10.6
  • MPLAB C32 (for PIC32MX) and C30 (for PIC24 and dsPIC) compilers are also available
  • MPLAB C18 compiler is available for Windows and Linux for now but Mac OS X support will follow soon
  • MPLAB X Beta and the lite versions of the compilers are free (as in free beer)

There is also a wiki of Microchip around MPLAB X.

Downloads & Installation

Visit and get the following components for your preferred OS (in this case the MPLAB X IDE and C30 compiler):

  • MPLAB C Compiler for dsPIC DSCs and PIC24 MCUs (Lite)

Linux 32-bit

$ chmod 755 mplabxidebeta32.bin mplabc30.bin
$ sudo ./mplabxidebeta32.bin
$ sudo ./mplabc30.bin

Files will be installed in /opt/microchip

Linux 64-bit

Tested on a Debian Squeeze:

$ chmod 755 mplabxidebeta32.bin mplabc30.bin
$ sudo su -
# GTK_PATH=/usr/lib32/gtk-2.0 exec ./mplabxidebeta32.bin
# GTK_PATH=/usr/lib32/gtk-2.0 exec ./mplabc30.bin

Note that you may still have a couple of "wrong ELF class: ELFCLASS64" errors because some GTK components (gio modules) were not available in 32-bit libraries but it seems to not hurt the installation. Files will be installed in /opt/microchip

Tested on a Fedora 13:

$ chmod a+x mplabxidebeta32.bin mplabc30.bin
$ su -
# ./mplabxidebeta32.bin
# ./mplabc30.bin

On F13 it installs and works without any errors

Converting MPLAB 8 projects

We'll need a bit of discipline now as Linux is case-sensitive and only Windows accepts paths with "\" while all OSes accept paths with "/".

  • Check all #include directives for proper case-sensitive filenames spellings
  • Check all paths for proper usage of "/" in place of the Windows-only "\"

To migrate an existing MPLAB8 project to MPLABX, one needs to use the included wizard
Here is one example for the Bus Pirate:

  • New project> Microchip Embedded> Existing MPLAB IDE v8> busPirate.mcp
    • Device: PIC24FJ64GA002
    • Select Header: AC162088
    • HW tool: PICkit3
    • Compiler: C30
    • Keep files in place


HEX export

HEX file export is not yet included in the beta release.
But a HEX file is produced aside the ELF file in the new project structure as MyProject.X/MyProject/dist/default/production/MyProject.production.hex

Apparently HEX file content is not capitalized anymore ([0-9A-F] => [0-9a-f]) so make sure your firmware loader is case insensitive.

ELF loading

We get currently an error when loading the produced ELF in the IDE, under investigation...

Note: ELF loading on some projects work - it does not work with the BP firmware for some reason


A file compare of the MPLAB C30 Lite compiler installation files for Win32 from the MPLAB X download page and the official MPLAB C30 download page revealed that they are identical. The same applies to the MPLAB C32 Lite compiler installation packages for Win32.

See Talk page for things to integrate on this wiki page.