LinuxCommandLibrary

platformio

Manage embedded software development projects

TLDR

View documentation for the original command

$ tldr pio
copy

SYNOPSIS

platformio [GLOBAL_OPTIONS] COMMAND [COMMAND_OPTIONS] [ARGUMENTS]...

PARAMETERS

--version
    Displays PlatformIO version information.

--help, -h
    Shows help message and exits. Can be used globally or for specific subcommands (e.g., platformio run --help).

--verbosity, -v
    Increases verbosity level for command output (can be used multiple times for more details).

--disable-color
    Disables colored output in the terminal.

init
    Initializes a new PlatformIO project or updates an existing one, setting up the necessary project structure and configuration files.

run
    Builds project firmware and uploads it to the target board. This is one of the most frequently used commands.

lib
    Manages project and global libraries. This subcommand has its own actions like install, update, list, and search.

monitor
    Starts a serial port monitor to communicate with a connected board, useful for debugging and logging output.

board
    Manages development boards, allowing listing available boards and viewing their detailed information.

home
    Starts the PlatformIO Home graphical user interface in a web browser, providing an easy way to manage projects, libraries, and boards.

update
    Updates PlatformIO core components, installed platforms, and tools to their latest versions.

debug
    Starts a debugging session for a project on a supported board with a compatible debugger setup.

DESCRIPTION

PlatformIO is a powerful, cross-platform, and open-source ecosystem designed for professional embedded development and Internet of Things (IoT) applications. It provides a unified command-line interface (CLI) to manage projects, build firmware, upload code to devices, and monitor serial communication. PlatformIO abstracts away the complexities of different toolchains, SDKs, and board-specific configurations, offering a consistent development experience across a vast array of development boards (e.g., ESP32, STM32, Arduino) and frameworks (e.g., Arduino, ESP-IDF, Mbed OS, Zephyr). Its CLI component, accessible via the platformio command, is the backbone for automation, continuous integration, and seamless integration with various IDEs, most notably through its popular VS Code extension. It simplifies the entire embedded software development lifecycle.

CAVEATS

PlatformIO requires a Python interpreter to be installed on the system. Initial setup and subsequent operations like installing new platforms or libraries often require an active internet connection to download necessary toolchains and dependencies, which can consume significant disk space. While simplifying development, users still need to understand the underlying embedded concepts and the platformio.ini configuration file for advanced customization.

<I>PROJECT CONFIGURATION (<BR>PLATFORMIO.INI)</I>

Every PlatformIO project contains a platformio.ini file in its root directory. This critical configuration file defines project-specific settings such as the target board, development framework, build flags, upload protocols, monitor settings, and library dependencies. It allows for highly customized build environments and is central to PlatformIO's flexibility and reproducibility.

<I>CROSS-PLATFORM & CROSS-ARCHITECTURE SUPPORT</I>

One of PlatformIO's core strengths is its ability to provide a consistent development experience across various operating systems (Windows, macOS, Linux) and for diverse microcontroller architectures (ARM, ESP8266/ESP32, AVR, etc.). It manages the complexity of different toolchains, compilers, and upload tools, making it easy to switch between projects and hardware without reconfiguring the entire development environment.

HISTORY

PlatformIO was founded by Ivan Kuten around 2014 with the vision to create a universal and accessible development ecosystem for embedded systems. Initially gaining traction among Arduino users, it rapidly expanded its support for a vast array of microcontrollers, development boards, and frameworks. Its modular design and strong emphasis on a command-line interface made it adaptable for automation and continuous integration workflows. Over the years, it has evolved into a comprehensive platform, complemented by powerful IDE integrations (most notably the VS Code extension), becoming a staple tool for both hobbyists and professional embedded developers worldwide.

SEE ALSO

gcc(1), make(1), pip(1), stty(1), udevadm(8)

Copied to clipboard