PlatformIO CLI使用說明筆記
- Source code of Wiring Blink Example
- platformio run
- platformio run -t upload
- Install PlatformIO Core(written in Python 2.7)
- Download examples source code
- Extract ZIP archive
- Run these commands
# Change directory to example
> $cd platformio-examples/wiring-blink
# Build project
> $platformio run
# Upload firmware
> $platformio run --target upload
# Build specific environment
> $platformio run -e uno
# Upload firmware for the specific environment
> $platformio run -e uno --target upload
# Clean build files
> $platformio run --target clean
- Platform Manager
$ platformio platform --help
$ platformio platform [COMMAND] --help
- platformio platform list (List installed Development Platforms)
$ platformio platform list [OPTIONS]
- platformio platform search (Search for development Development Platforms)
$ platformio platform search QUERY [OPTIONS]
$ pio platform search QUERY [OPTIONS]
- platformio platform show teensy (Show details about Development Platforms)
$ platformio platform show [PLATFORM]
$ pio platform show [PLATFORM]
- platformio platform update(Check or update installed Development Platforms)
$ platformio platform update [OPTIONS] [PLATFORM...]
$ pio platform update [OPTIONS] [PLATFORM...]
# update specific platform version using Semantic Versioning
$ platformio platform update PLATFORM@X.Y.Z
- platformio platform uninstall (Uninstall specified Development Platforms)
$ platformio platform uninstall [PLATFORM...]
$ pio platform uninstall [PLATFORM...]
# uninstall specific platform version using Semantic Versioning
$ platformio platform uninstall PLATFORM@X.Y.Z
- platformio remote
$ pio remote --help
$ platformio remote --help
$ platformio remote [COMMAND] --help
# run command on the specified PIO Remote Agents
$ platformio remote --agent NAME_1 --agent NAME_N COMMAND
Library Manager
$ platformio lib search 1-wire
$ platformio lib install 54
$ platformio lib search -f mbed
$ platformio lib search -k rf
$ platformio lib search radiohead
$ platformio lib install 124 –version “1.40”
$ platformio lib show 124
$ platformio lib update
$ platformio run
$ platformio run -t upload