Search This Blog

Friday 17 April 2015

PlatformIO - A Cross-Platform Code Builder and Missing Library Manager

I ran across this awesome site a couple weeks ago, and was astounded by their claims.  I had to try it out!

In a nutshell, PlatformIO has automated the various build aspects of cross compiling for your favorite Microcontroller across Mac OS X, Windows, and Linux, both on Intel as well as ARM (Meaning you can run PlatformIO on your Raspberry PI, or Beagle Board!)   

Basically, you can write your embedded code once, and compile across several target boards with very little additional work.

PlatformIO for each Operating system includes compiler, debugger, uploader (for embedded) and a bunch of useful tools. Popular settings for most popular Embedded Platform Boards are pre-configured out of the box.

To date, PlatformIO out-of-the-box support includes:



And of Special NotePlatformIO.org has worked with the guys that developed the Teensy 3.1 board to include it in their supported systems.  I make note of this, as the Teensy does use the Freescale Kinetis K20dx256 32bit ARM cortex-4 MCU, but they have simply made this board more readily available to work with.  (I also have a vested interest in this board!) 


Once installed, you can get a list of the 60 or more supported boards by typing “platformio boards” ...


 It's really as simple as installing PlatformIO onto your Laptop, Desktop, or Single board Computer (Raspberry Pi, BeagleBone, etc...), and choosing your target Embedded System to develop for. 

You Install PlatformIO itself, then invoke it to install the toolsets and libraries for your preferred board/processor,
something akin to  "platformio install freescalekinetis"  and it pulls down all of the cross compiler tools, and kinetis core libraries.

You then initiate a project with "platformio init -bteensy31".  It creates the directory structure, and you are free to use your favorite editor/IDE to write the code. 

No... this is not Visual Studio / Programming-with-your-mouse tool, but it DOES take care of a lot of the planning, configuration, build, and upload issues for you.

Once you have written your code, again invoking PlatformIO to build and upload is a simple process..  "platformio  run -t upload"... 




PlatformIO Library Manager allows you to organize external libraries. Searching for new libraries can be via commandline or Web Interfaces.  Python code in the background takes care of the rest.  Think of this as a package manager for your embedded libraries.










My fellow Teensy developers... If you feel constrained by the limitations of the  Arduino IDE (even though they did such an awesome job extending it with Teensyduino) And you are not up to the complexity of a full fledged bloated developer suite.. Please do yourself the favor, and try out PlatformIO.


References:

PlatformIO.org 
Cross-board and cross-vendor embedded development with PlatformIO 
Discovered a new tool for embedded development: PlatformIO 
Integration of PlatformIO library manager to Arduino and Energia IDEs
Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO

No comments:

Post a Comment