1.

MPIDE: One IDE to rull them all. (For Arduino and its varients anyway)

MPIDE: One IDE to Rule Them All

 

If you read this site you are more than likely familiar with Arduino and the Arduino IDE. If not let me briefly bring you up to speed. 

The Arduino IDE is a cross-platform application written in Java, and is derived from the IDE for the Processing programming language and the Wiring project. It is designed to introduce programming to artists and other newcomers unfamiliar with software development. It includes a code editor with features such as syntax highlighting, brace matching, and automatic indentation, and is also capable of compiling and uploading programs to the board with a single click. There is typically no need to edit makefiles or run programs on the command line... Keep reading after the jump.

The Arduino IDE comes with a C/C++ library called "Wiring" (from the project of the same name), which makes many common input/output operations much easier. Arduino programs are written in C/C++, although users only need define two functions to make a runnable program:

  • setup() – a function run once at the start of a program that can initialize settings
  • loop() - a function called repeatedly until the board powers off

 

 

chipKIT Uno32 Max32 MPIDE Multi-Platform IDE

MPIDE

Intro to MPIDE

With the recent introduction of Microchip and Digilent's chipKIT PIC32 Arduino Compatible boards we were also introduced to a retooled / modified version of the Arduino IDE. Dubbed Multi-Platform Integrated development environment or MPIDE, this IDE combines the chipKIT compiler and Arduino IDE into one familiar and easy to use interface. Users of Arduino will quickly recgonise the IDE's layout and will be able to jump right in and continue their coding, and compile for either PIC32 or AVR based Arduino Compatible boards.  MPIDE was created my Rick Anderson and Mark Sproul of FUBAR Labs, a Hacker Space in New Jersey

Download

MPIDE is cross platform compatibe with Windows, Mac, and Linux. So everyone who wants to play, will be able to join the game. You can download MPIDE from Github

How it works

Quoting Mark Sproul, one of the coders who brought us MPIDE:

 

"As far as how it works, the core files and library files of course have been re-written to use pic32 hardware instead of avr hardware. The IDE has been modified to have a platforms.txt in addition to the boards.txt. This allows multiple compilers to be used. The design idea is that any GCC compiler can now be made to work just by adding a text file (platforms.txt) Everything about the compiler is driven by that file. The biggest difference in what we did compared to what maple did, is now you can select back and forth between AVR and PIC32 without changing programs. Just go up the boards menu and select a different board. Mega2560, Arduino-UNO, chipKit-MAX32 or chipKit-UNO. and click download. Thats all there is to it. For anyone that has looked inside of the java ide code, the section that drives the compiler has been COMPLETELY re-written. This was a MAJOR undertaking."

 

So that means that any GCC compiler can be made work with MPIDE. I wonder if we will see a Maple port to MPIDE. How cool would it be if we could program all of the Open Source devboards from one IDE?

chipKIT Uno32 Max32 Pic32 Arduino MPIDE Multi-platform IDE

 

Burning the Bootloader

In the official Arduino IDE, you can burn the Arduino Bootloader to a fresh AVR chip from the IDE. While this is still possible for AVR based chips from within MPIDE, things are a little different for burning to the chipKIT PIC32 chips. Again I am going to quote Mark Sproul:

 

"The PIC32 chipKit board is designed to use in an Arduino™ style environment called MPIDE (Multi Platform Integrated Development Environment).The bootloader is the same bootloader as used in the Arduino™ Mega 2560 board. This bootloader uses STK500V2 protocol. Avrdude is used to talk to it.

 

In the normal Arduino™ environment you can use the Arduino™ IDE to burn the bootloader. It uses an ISP (In System Programmer) to do the actuall programming of the bootloader. PIC32 does not support the same style of ISP programmer and therefore cannot be used to burn the pic32 bootloader.

To program the bootloader on a PIC32 chip, you need to use an ICD or PicKit programmer. I use the ICD-3 but the PicKit-3 also works. This is done from MPLAB, the Microchip development environment. There are several versions. The new MPLAB-X is cross platform and can be downloaded free."

Linux Install Issues

 

There have been some issues with MPIDE starting up on Linux. The problem is that to run MPIDE, you must have Java and librxtx-java installed. Below is a quote from Rick Anderson on how to get this working on linux.

"It's a requirement that you have Java, and librxtx-java installed. There is a bug in Sun Java version that doesn't include it in the path even if you have it installed. It's nicely documented here: http://colinharrington.net/blog/2010/11/arduino-ubuntu-10-10-maverick-meerkat-no-rxtxserial In any case here's what you'll need to do.

 

If you know you don't have Java installed do: 

sudo apt-get install openjdk-6-jdk

Check for librxtx-java via:

dpkg -l | grep rxtx

If not found do:

sudo apt-get install librxtx-java

If you have more than one version of Java then you'll need to check which version of Java you are running. You can do this by typing:

update-java-alternatives -l

This will list which version you have installed. Like:

java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk
java-6-sun 63 /usr/lib/jvm/java-6-sun

The easiest solution is to select java-6-openjkd

sudo update-java-alternatives -s java-6-openjdk

Once done you can double check by typing:

java -version

Then run mpide again.

If you have to use the Sun JDK here are the options from the article.

 

  1. don’t use sun-java but default-jre instead. This bug is actually a known bug in sun-java. (bug #325506)
  2. add export LD_LIBRARY_PATH=/usr/lib/jni to your .bashrc, the .deskop file (in /usr/share/desktop), or on the command line before starting arduino "

 

 

That about sums up MPIDE, if you have any questions or comments on MPIDE please leave us a comment and we will do our best to answer, get an answer or point you in the right direction of someone who can help answer your question. Also take a moment and sign up on the official chipKIT forums at http://chipkit.cc/forum. Keep your eyes out in the next few weeks for our full coverage on two new Shields (Basic I/O with a OLED screen and a Ethernet shield.)  for the chipKIT boards from Digilent. We will have both boards on release day and will try to have some sample code and examples for you to play with. We will also be covering NKC Electronics new Prototyping boards designed just for the chipKIT Uno32 and Max32 boards.

Other Articles You Might Like

Review: Lulzbot AO-100 3D Printer part 1Lulzbot AO-100 / AO-101 reviewed

Tutorial: DIY Telescope to PC CableDIY Telescope to PC Cable

Project: LED Strip Bench LightingDIY RGB LED Strip Bench lighting

Review: ISO-TIP Portable  Soldering KitISO-Tip Portable Soldering Kit Review

Article: Arduino Due Overview

Project: 3D Printed Balloon Powered CarPrint a Balloon powered Jet Car with your 3D printer

 

 
1.