pio(1)
PlatformIO is a cross-platform, open-source ecosystem for IoT development with support for embedded boards, microcontrollers, and FPGA platforms.
Synopsis
pio [COMMAND] [OPTIONS] [ARGUMENTS]Description
PlatformIO (pio) is a professional collaborative platform for embedded development. It provides a unified workflow for building, uploading, and debugging firmware across hundreds of development boards and platforms including Arduino, ESP8266, STM32, Raspberry Pi Pico, and many others.
The pio command-line tool manages project initialization, dependency resolution, library management, build configuration, and device programming. It abstracts away platform-specific toolchains and complexity, allowing developers to focus on writing application code.
PlatformIO integrates with popular IDEs and editors while also functioning as a standalone command-line build system, making it suitable for CI/CD pipelines and headless development environments.
Common options
| Flag | What it does |
|---|---|
--version | Display the installed PlatformIO version |
--help | Show help message and list of available commands |
-v, --verbose | Enable verbose output with detailed build information |
-q, --quiet | Suppress all output except warnings and errors |
-e, --environment | Specify target environment for build/upload operations |
--project-dir | Set the project directory path (default: current directory) |
--no-ansi | Disable colored output from the build system |
Examples
Initialize a new PlatformIO project configured for Arduino Uno board
pio project init --board arduino:avr:unoBuild the current project using the default environment
pio runBuild and upload firmware to an ESP32 development board
pio run -e esp32dev --target uploadInstall a library dependency into the project
pio lib install "DHT sensor library"Open serial monitor to view device output at 115200 baud
pio device monitor --baud 115200Remove all build artifacts and compiled objects
pio run --target cleanList all available STM32 development boards supported by PlatformIO
pio boards | grep stm32Build project for Linux desktop using GCC compiler
pio run -e linux_gcc --target build