Embed Builds with PlatformIO
Overview #
PlatformIO is a cross-platform code-builder and library manager for embedded development with no external dependencies. Using PlatformIO you can compile your code on multiple platforms, frameworks, and boards. Unit testing requires a monthly subscription.
-
Platforms - pre-built different development platforms for the most popular host OS (macOS, Windows, Linux 32/64bit, Linux ARMv6+). Each of them includes compiler, debugger, uploader, etc:
- Atmel AVR
- Espressif
- Teensy
- ST STM32
- Full list at PlatformIO
-
Frameworks - pre-configured build scripts for the popular embedded frameworks:
- Arduino
- libOpenCM3
- mbed
- Full list at PlatformIO
-
Embedded - pre-defined compilation profiles for a variety of embedded boards.
Full list at PlatformIO
.travis.yml file Settings #
Please read the official PlatformIO & Travis CI documentation before using PlatformIO.
PlatformIO is written in Python and is recommended to be run within a Travis CI Python isolated environment:
Test Libraries #
If the project you are testing is a library, please use the --lib="."
option for the platformio ci command
Manage dependencies #
There are two options for testing projects with external dependencies:
- using the PlatformIO Library Manager
- installing dependencies manually
PlatformIO Library Manager #
For the dependencies available in the PlatformIO Library Registry:
Install dependencies manually #
For the dependencies not available in the PlatformIO Library Registry:
Custom Build Flags #
To specify custom build flags using the PLATFORMIO_BUILD_FLAGS environment:
More details are available at build flags/options.
Advanced configuration #
You can configure multiple build environments using a platformio.ini Project Configuration file, and specifying a –project-conf instead of --board
.