upload_port

Type: String (Pattern) | Multiple: No

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

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

To print all available serial ports please use pio device list command.

This option can also be set by global environment variable PLATFORMIO_UPLOAD_PORT.

Please note that you can use patterns:

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]