Upload options

upload_port

This option is used by “uploader” tool when sending firmware to board via upload_port. For example,

  • /dev/ttyUSB0 - Serial port (Unix-based OS)
  • COM3 - Serial port (Windows OS)
  • 192.168.0.13 - IP address when using OTA
  • /media/disk - physical path to media disk/flash drive (mbed enabled boards)
  • D: - physical path to media disk/flash drive (Windows OS).

If upload_port isn’t specified, then PlatformIO will try to detect it automatically.

To print all available serial ports use platformio device list command.

This option can be set by global environment variable PLATFORMIO_UPLOAD_PORT.

Please note that you can use Unix shell-style wildcards:

Pattern Meaning
* matches everything
? matches any single character
[seq] matches any character in seq
[!seq] matches any character not in seq

Example:

[env:uno]
platform = atmelavr
framework = arduino
; any port that starts with /dev/ttyUSB
upload_port = /dev/ttyUSB*

; COM1 or COM3
upload_port = COM[13]

upload_protocol

A protocol that “uploader” tool uses to talk to the board.

upload_speed

A connection speed (baud rate) which “uploader” tool uses when sending firmware to board.

upload_flags

Extra flags for uploader. Will be added to the end of uploader command. If you need to override uploader command or base flags please use extra_scripts.

This option can be set by global environment variable PLATFORMIO_UPLOAD_FLAGS.

upload_resetmethod

Specify reset method for “uploader” tool. This option isn’t available for all development platforms. The only Espressif 8266 supports it.