Explore the new development instruments for Arduino with PlatformIO ecosystem
-
Upload
ivan-kravets -
Category
Devices & Hardware
-
view
549 -
download
1
Transcript of Explore the new development instruments for Arduino with PlatformIO ecosystem
Ivan KravetsExplore 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]
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
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
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
ARDUINO DEVELOPER SUMMIT 2016
PlatformIO IDE
The next-generation integrated development environment for IoT
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
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
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)
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
ARDUINO DEVELOPER SUMMIT 2016
Web 2.0 Library Portal
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
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 .”
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
ARDUINO DEVELOPER SUMMIT 2016
Continuous DeliveryAutomatic firmware updates by Daniel Eichhorn
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
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
ARDUINO DEVELOPER SUMMIT 2016
Unit Testing
$ platformio test --help
• Local PC and Hardware unit testing for embedded
• Rich Unity Test API
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
ARDUINO DEVELOPER SUMMIT 2016
PlatformIO 3.0
THIS SUMMER
Questions?
T H A N K Y O U