← 返回命令列表

Linux command

platformio 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Initialize project

pio init --board [uno]

Build project

pio run

Upload to board

pio run --target upload

Monitor serial port

pio device monitor

List connected boards

pio device list

Install a library

pio pkg install --library "[library_name]"

Search for boards

pio boards [pattern]

Clean build files

pio run --target clean

说明

platformio is an ecosystem for embedded development. It provides unified tools for building, uploading, and debugging embedded software across many platforms and frameworks. The tool supports Arduino, ESP32, STM32, and hundreds of other boards with integrated library management and debugging.

参数

init
Initialize project.
run
Build project.
run --target upload
Upload firmware.
device monitor
Serial monitor.
device list
List devices.
pkg install
Install packages (libraries, platforms, tools).
pkg install --library _NAME_
Install a library dependency.
pkg search
Search the PlatformIO Registry.
boards
List supported boards.
check
Run static code analysis.
debug
Start debugger.
test
Run unit tests.
home
Launch PlatformIO Home web UI.
-e, --environment _env_
Specific environment.
-v, --verbose
Verbose output.

FAQ

What is the platformio command used for?

platformio is an ecosystem for embedded development. It provides unified tools for building, uploading, and debugging embedded software across many platforms and frameworks. The tool supports Arduino, ESP32, STM32, and hundreds of other boards with integrated library management and debugging.

How do I run a basic platformio example?

Run `pio init --board [uno]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does init do in platformio?

Initialize project.