MPLAB X

From DP

(Difference between revisions)
Jump to: navigation , search
(f13)
(ELF loading)
Line 62: Line 62:
===ELF loading===
===ELF loading===
We get currently an error when loading the produced ELF in the IDE, under investigation...
We get currently an error when loading the produced ELF in the IDE, under investigation...
 +
 +
Note: works perfectly on Fedora 13 64bit [http://www.youtube.com/watch?v=Hy-O_FD2QpU YouTube video loading elf to MPLAB-X]
 +
==Misc==
==Misc==
See [[Talk:MPLAB X|Talk page]] for things to integrate on this wiki page.
See [[Talk:MPLAB X|Talk page]] for things to integrate on this wiki page.

Revision as of 04:40, 17 November 2010

Contents

Description

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

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

There is also a wiki of Microchip around MPLABX

Downloads & Installation

Visit http://devupdates.microchip.com/mplab/ and get the following components for your preferred OS (in this case the MPLABX & C30 compiler):

  • MPLAB X IDE
  • 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 having 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

Limitations

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: works perfectly on Fedora 13 64bit YouTube video loading elf to MPLAB-X

Misc

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