pio_upload
Build and flash firmware to a connected board via PlatformIO. Specify an upload port for multi-board setups, or close active serial monitor sessions to free the port before uploading.
Instructions
Build and flash firmware to the connected board (pio run -t upload). Refuses while a serial monitor session holds the port unless stop_open_sessions=true, which closes our own session(s) first. Pass upload_port when several boards are attached. Port failures come back classified (port_busy, port_permission, port_missing, no_response) with a port_diagnosis naming the holder and the fix. Blocked when PLATFORMIO_MCP_POLICY is build_only or read_only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| project_dir | No | ||
| upload_port | No | ||
| stop_open_sessions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||