pio-platform
Manage development platforms for PlatformIO
TLDR
List all installed development platforms
Search for existing development platforms
Show details about a development platform
Install a development platform
Update installed development platforms
Uninstall a development platform
List all supported frameworks
SYNOPSIS
pio platform command [options]
PARAMETERS
list / ls
Lists all installed development platforms.
search / s
Searches for available development platforms in the PlatformIO Registry based on a provided query.
install / i
Installs a new development platform. Accepts a platform name from the registry, a Git repository URL, or a path to a local platform folder.
update / up [
Updates installed development platforms. If no platform_name is specified, all installed platforms are checked and updated to their latest versions.
uninstall / un
Uninstalls a previously installed development platform from your system.
show / sh
Displays detailed information about a specific installed or available development platform, including its supported boards, packages, and frameworks.
outdate
Lists installed development platforms that have updates available in the PlatformIO Registry.
--json-output
(Global option for some subcommands) Outputs command results in JSON format, ideal for scripting and programmatic parsing.
--installed
(For search subcommand) Filters search results to display only platforms that are already installed on the system.
--skip-default-package
(For install subcommand) Prevents the installation of default packages (toolchains, frameworks) associated with a platform during installation. Useful for custom configurations.
--with-package
(For install subcommand) Specifies an additional package to be installed along with the platform. Can be used multiple times.
--without-package
(For install subcommand) Excludes a specific package from being installed with the platform. Can be used multiple times.
--storage-dir
(For install subcommand) Specifies a custom directory where the platform and its packages should be installed, overriding the default PlatformIO storage location.
DESCRIPTION
The pio platform command is a core component of the PlatformIO ecosystem, enabling seamless management of diverse hardware development platforms. These platforms encapsulate specific microcontrollers, their associated toolchains, SDKs, and development frameworks (like Arduino, ESP-IDF, Mbed, etc.).
This command allows developers to list all installed platforms, search for new ones in the PlatformIO Registry, install them from various sources (registry, Git repositories, local paths), update existing installations, uninstall platforms no longer needed, and show detailed information about any specific platform. It significantly simplifies the setup and maintenance of multi-architecture embedded projects, abstracting away the complexities of managing toolchain versions and framework dependencies.
CAVEATS
An active internet connection is typically required for searching, installing, and updating platforms, as they download necessary toolchains and frameworks from remote repositories.
PlatformIO platforms, toolchains, and frameworks can consume significant disk space, especially if many different platforms are installed. Regular cleanup of unused platforms via uninstall is recommended.
PLATFORM MANIFESTS
Each PlatformIO development platform is defined by a manifest file (e.g., platform.json) which specifies its packages, toolchains, frameworks, and supported boards. These manifests are crucial for the pio platform command to correctly resolve dependencies and configure development environments.
OFFLINE CAPABILITIES
Once a platform and its associated packages are installed, many pio platform operations (like show) and subsequent project builds can often proceed offline, as long as all necessary components are locally cached. New installations or updates, however, will always require network access to fetch remote resources.
HISTORY
The pio platform command is a foundational element of PlatformIO Core, which emerged around 2014-2015 as a cross-platform, professional-grade development ecosystem for embedded systems. Its design evolved to address the fragmentation in embedded development, where managing different vendor-specific IDEs, toolchains, and SDKs was a significant challenge. The command provides a unified, command-line interface for handling these complexities, making PlatformIO a popular choice for developers working with a variety of microcontrollers and boards, emphasizing automation and consistency across projects.
SEE ALSO
pio project init(1), pio board(1), pio lib(1), pio run(1)