21
Ivan Kravets Explore the new development instruments for Arduino with PlatformIO ecosystem

Explore the new development instruments for Arduino with PlatformIO ecosystem

Embed Size (px)

Citation preview

Page 1: Explore the new development instruments for Arduino with PlatformIO ecosystem

Ivan KravetsExplore the new development instruments for Arduino with PlatformIO ecosystem

Page 2: Explore the new development instruments for Arduino with PlatformIO ecosystem

ARDUINO DEVELOPER SUMMIT 2016

@me

IVAN KRAVETS

CTO, Founder of PlatformIO.Org

Ph.D., Researcher and Software Architect

“Creativity comes from talent and never from knowledge” ©

www.ikravets.com / [email protected]

Page 3: Explore the new development instruments for Arduino with PlatformIO ecosystem

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

Page 4: Explore the new development instruments for Arduino with PlatformIO ecosystem

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

Page 5: Explore the new development instruments for Arduino with PlatformIO ecosystem

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

Page 6: Explore the new development instruments for Arduino with PlatformIO ecosystem

ARDUINO DEVELOPER SUMMIT 2016

PlatformIO IDE

The next-generation integrated development environment for IoT

Page 7: Explore the new development instruments for Arduino with PlatformIO ecosystem

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

Page 8: Explore the new development instruments for Arduino with PlatformIO ecosystem

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

Page 9: Explore the new development instruments for Arduino with PlatformIO ecosystem

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)

Page 10: Explore the new development instruments for Arduino with PlatformIO ecosystem

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

Page 11: Explore the new development instruments for Arduino with PlatformIO ecosystem

ARDUINO DEVELOPER SUMMIT 2016

Web 2.0 Library Portal

Page 12: Explore the new development instruments for Arduino with PlatformIO ecosystem

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

Page 13: Explore the new development instruments for Arduino with PlatformIO ecosystem

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 .”

Page 14: Explore the new development instruments for Arduino with PlatformIO ecosystem

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

Page 15: Explore the new development instruments for Arduino with PlatformIO ecosystem

ARDUINO DEVELOPER SUMMIT 2016

Continuous DeliveryAutomatic firmware updates by Daniel Eichhorn

Page 16: Explore the new development instruments for Arduino with PlatformIO ecosystem

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

Page 17: Explore the new development instruments for Arduino with PlatformIO ecosystem

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

Page 18: Explore the new development instruments for Arduino with PlatformIO ecosystem

ARDUINO DEVELOPER SUMMIT 2016

Unit Testing

$ platformio test --help

• Local PC and Hardware unit testing for embedded

• Rich Unity Test API

Page 19: Explore the new development instruments for Arduino with PlatformIO ecosystem

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

Page 20: Explore the new development instruments for Arduino with PlatformIO ecosystem

ARDUINO DEVELOPER SUMMIT 2016

PlatformIO 3.0

THIS SUMMER

Page 21: Explore the new development instruments for Arduino with PlatformIO ecosystem

Questions?

T H A N K Y O U