Monday, October 8, 2012

MplabX with Xmonad

Download the mplabx install files from microchip.  From the same page, grab the install files for the compiler for the family of controllers you will work with.  I downloaded the mplabx-ide-v1.41-linux-installer.run for the IDE and the xc32-v1.11-linux-installer.run.tar for the PIC32 compiler.  Login as root, change the permissions, and install the IDE as follows.  These commands assume the current working directory contains the install files.
ROOTPROMPT$> chmod 770 mplabx-ide-v1.41-linux-installer.run
ROOTPROMPT$> ./mplabx-ide-v1.41-linux-installer.run
   I selected all the defaults through the install wizard.  After the IDE is installed, untar and  install the compiler(s).
ROOTPROMPT$> tar -xf xc32-v1.11-linux-installer.run.tar
ROOTPROMPT$> chmod 770 xc32-v1.11-linux-installer.run
ROOTPROMPT$> ./xc32-v1.11-linux-installer.run
   When prompted by the wizard, I selected to add the compiler location to the end of the PATH variable, and to use this setting for all users on this machine.  Otherwise I used the defaults.  For reference, everything for the compiler and IDE is installed to the /opt/microchip/ directory including the required java files, so no need to worry about installing the appropriate jdk with this version.  Exit root, and start the IDE from the terminal as follows.
$> mplab_ide
   You will probably get a floating splashscreen as if the program is starting, but then just a tiled  but empty grey window.  This is a java error with Xmonad as explained in section 4.12 of the FAQ linked.  Of the suggestions, Changing the AWT_TOOLKIT - as described in the link - worked for me.  To test it, run:
$> export AWT_TOOLKIT=MToolkit
$> mplab_ide
  And the IDE should launch correctly.  If this works, add the 'export AWT_TOOLKIT=MToolkit' line to your .bashrc file to have the export done automatically when the shell is started.  Otherwise you have to manually enter the export command to every new shell instance.


update 06DEC2012:
If building a project does nothing, and you see no compiler messages in the output window, make sure MAKE is installed on your machine.  The forums details a little of the  Linux MPLABX build does nothing problem, which is easily resolved.

No comments:

Post a Comment