MPLAB Xpress: on Raspberry Pi

2

The MPLAB Xpress Evaluation Board is by far the most affordable of the Microchip development boards, with an advertised price tag of only 9.99$. But what about taking advantage of the cloud platform and running it on some slow and inexpensive hardware, making the cheapest learning station? Yep, I mean running MPLAB Xpress IDE and programming the MPLAB Xpress board on Raspberry PI.

In this demo I used a Raspberry Pi 2 model B, with 900MHz quad-core ARM Cortex-A7 CPU and 1Gb RAM. I also used a 8Gb SD card, not the fastest ever. To connect to Internet I used the wired Ethernet port.

MPLAB Xpress on Raspbian

In this test I used the latest version of Raspbian Jessie (kernel version 4.1) with the latest updates installed. The browser used is Epiphany Web Browser, which came as standard with Raspbian. With this setup trying to use MPLAB Xpress on Raspbian proved to be a big disappointment. It just loses connection to the server and Microchip Code Configurator cannot be started. It seems that although Raspbian has Java support, the Epiphany browser has no Java plugin, and .jnlp files cannot be run.

Raspbian: Code listing cannot be seen in MPLAB Xpress IDE

Raspbian: Code listing cannot be seen in MPLAB Xpress IDE

Moreover, from time to time in Epiphany I can’t see the code I have typed.

MPLAB Xpress on Ubuntu Mate

The next test was performed using Ubuntu Mate version 15.10.3, which came with Firefox as default browser.

Here we have an installer that looks much like the desktop version. There is no default user, it must be created during the install process. In this tutorial the user is mprojects. After that I performed the usual re-sizing of the SD card as described on the Ubuntu Mate page. Then I performed sudo apt-get update and sudo apt-get upgrade.

Ubuntu Mate: Resizing Partition

Ubuntu Mate: Resizing Partition

MPLAB Xpress on Ubuntu mate

I have to say it works much better than on Raspbian. I was able to start the IDE, and to log in. Sometimes I got an unresponsive script error”, but it’s just because the Pi is so slow, and the script times out. If you have the same error, just hit continue and everything will be OK.

Unlike in Epiphany, here I haven’t got any issues visualizing the code. All code examples provided by Microchip compile fine. Not surprisingly, as all this compiling takes place in the cloud.

Then, compiled code can be downloaded with ease, and the USB mass storage approach on the Xpress board works fine in Ubuntu.

Microchip Code Configurator in Ubuntu Mate

Here comes the ugly side: for the given moment I haven’t been able to run MCC under Ubuntu Mate. What I’ve managed to do is to install Oracle java by running:

as described on http://ubuntuforums.org/showthread.php?t=2283636. Then I have installed icedtea-plugin and icedtea-netx.

As I haven’t installed OpenJDK I got the following error:

javaws error: no openjdk

javaws error: no openjdk

which I solved by editing /usr/bin/javaws and replacing the correct path for Java: instead of /usr/lib/jwm/java-7-openjdk-armhf/jre/bin/java there should be /usr/lib/jwm/java-8-oracle/jre/bin/java> With this change I was able to start javaws.

Editing javaws for Oracle Java

Editing javaws for Oracle Java

Still things are not OK, when trying to start MCC_Xpress.jnlp I get a “Not a launchable jnlp file” error:

Not a launchable JNLP file error

Not a launchable JNLP file error

I’m stuck here. I don’t know what else to do, so if you have any ideas, please share them…

 

Share.

2 Comments

  1. Great post, thank you. I was able to get MPLAB Xpress running on Raspbian Jessie by installing and using the Chromium browser (https://www.raspberrypi.org/forums/viewtopic.php?t=121195).

    Regarding MCC, Raspbian Jessie comes with Java 8 pre-installed. Unfortunately without javaws, which is needed for Web Start. As a workaround, I download all the .jar files, which are listed inside the .jnlp file, manually, so that I can execute them by using java -jar. This worked fine for the USB Bridge application, which as I expected doesn’t work, because of missing drivers for the Raspberry Pi. But at least it started. If you look at the .jnlp file for MCC, you can see that it depends on JavaFX and it seems like Oracle removed JavaFX support for ARM a while ago. Without support for JavaFxX you won’t be able to launch MCC.

    I’ve only used Raspbian to test it. If your version of Java 8 on Ubuntu Mate still supports JavaFX, then try downloading the .jar files manually and run it by using “java -jar standalone.jar”. All the other files need to be inside the /lib folder, as listed in the .jnlp.

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.