PlatformIO is an advanced and extremely versatile ecosystem for IoT development that includes an IDE, build system, and library manager. It comes with support for more than 250 development boards, 15 development platforms and over 10 useful frameworks. The PlatformIO IDE is a cross-platform utility for rapid professional development with built-in C/C++ Intelligent Code Completion, Smart Code Linter and advanced Serial Port monitor. Also, PlatformIO can be integrated with the popular IDEs and continuous integration systems to speed up time to delivering IoT applications.
PlatformIO is a comprehensive ecosystem that provides an excellent opportunity to explore the fascinating world of IoT development.
3. ARDUINO DEVELOPER SUMMIT 2016
What is PlatformIO?
An open source ecosystem for IoT development
• Cross-platform Build System
• Package Manager (pre-built toolchains, frameworks, SDK)
• Library Manager
• Continuous and IDE integration
• Arduino and ARM mbed compatible
• Windows, macOS, Linux (+ARM v6/v7)
• Written in Python
4. ARDUINO DEVELOPER SUMMIT 2016
Professional development for...
• 250+ embedded boards
• 100+ different MCUs
• 20+ development platforms: Atmel AVR/SAM, Espressif, Freescale Kinetis, Intel ARC32,
Lattice iCE40 FPGA, Microchip PIC32, Nordic nRF51, NXP LPC, Silicon Labs EFM32, ST
STM32, TI MSP430/Tiva, Teensy
• 10+ frameworks: Arduino, CMSIS, WiringPi, libOpenCM3, Energia, ESP8266 SDK, SPL,
ARM mbed
5. ARDUINO DEVELOPER SUMMIT 2016
PlatformIO Command Line Interface (CLI)
$ platformio --help
• Coloured terminal output
• Option “--json-output”
• Standard streams
• Exit status “echo $?”
• Ready for Cloud Compiling
• Windows, macOS, Linux
6. ARDUINO DEVELOPER SUMMIT 2016
PlatformIO IDE
The next-generation integrated development environment for IoT
7. ARDUINO DEVELOPER SUMMIT 2016
PlatformIO IDE: key features
• C/C++ Intelligent Code Completion and
Smart Code Linter for rapid professional
development
• Multi-projects workflow with multiple
panes and Themes support with dark
and light colours
• Built-in Terminal with PlatformIO CLI tool
and powerful Serial Port Monitor
8. ARDUINO DEVELOPER SUMMIT 2016
Project Generator for your IDE
$ platformio init --ide
• Integration with Atom, CLion, CodeBlocks, Eclipse, Emacs, NetBeans, Qt Creator, Sublime
Text, Vim, Microsoft Visual Studio
• Native plugins/packages for Atom, CodeBlocks, Emacs, NetBeans, Sublime Text
• Actual project data for code completion and for the source code linter
9. ARDUINO DEVELOPER SUMMIT 2016
Project Configuration “platformio.ini”
Single source code.
Multiple environments.
• Custom CPU frequency or Flash size
• Extra build flags
• Option to remove built-in flags (“unflags")
• Source code filter
• Upload settings (port, protocol, speed)
• Extra scripting (control build system)
10. ARDUINO DEVELOPER SUMMIT 2016
• Friendly Command-Line Interface
• Web 2.0 Library Portal (examples,
discussions, frameworks and platforms
compatibility information)
• Open Source API
• Library Crawler for “library.json” manifest
• Library dependency management
• Automatic library updates
Library Manager and Registry
12. ARDUINO DEVELOPER SUMMIT 2016
“library.json”
Manifest file for embedded library
• Custom structure of source code
• Examples list
• Compatible frameworks and platforms
• Library dependencies
• Extra build flags, source code filters
13. ARDUINO DEVELOPER SUMMIT 2016
Continuous Integration
$ platformio ci --help
• Integration with AppVeyor, Circle CI, Dron.IO, Shippable, Travis CI
• Variable source code ($PLATFORMIO_CI_SRC) and build flags
($PLATFORMIO_BUILD_FLAGS)
• Custom Project Configuration “$ platformio ci --project-conf /path/custom_platformio.ini”
• Project as a library “$ platformio ci /path/to/example --lib .”
14. ARDUINO DEVELOPER SUMMIT 2016
Travis CI: Embedded Builds with PlatformIO
• Official Travis CI documentation
• Automatic Build Jobs / Matrix Builds
• Cache system for PlatformIO
packages
• Project generator with “.travis.yml”
template
16. ARDUINO DEVELOPER SUMMIT 2016
• Decentralised architecture for development
platforms
• Unit testing for embedded (local & remote)
• Cloud Agent for integration with Cloud IDEs
(Cloud9, Codeanywhere, Codenvy, Eclipse Che)
• New Library Build System (semantic
versioning, intelligent dependency finder,
support for 3-rd party manifests)
• Hardware debugging
PlatformIO 3.0
17. ARDUINO DEVELOPER SUMMIT 2016
Decentralised architecture: “platform.json”
• “platform.json” manifest file for development platform
• Semantic versioning for packages, development
platforms and projects
• Package dependencies with custom package storage
• Embedded board configurations (build and upload
options)
• Isolated build scripts
18. ARDUINO DEVELOPER SUMMIT 2016
Unit Testing
$ platformio test --help
• Local PC and Hardware unit testing for embedded
• Rich Unity Test API
19. ARDUINO DEVELOPER SUMMIT 2016
Developers love PlatformIO!
• 1100 stars on GitHub
• 2000 commits and 60 releases since May, 2014
• Estimated 4 years of effort (COCOMO model)
• 30000 downloads of PlatformIO IDE for the first 3 months
• Community from 150 countries
• Nominated for the year’s best Software and Tools in the 2015/16 IoT Awards