targets

Type: String | Multiple: Yes

A list of targets which will be processed by the pio run command by default. You can enter more than one target, if separated by comma+space “, “.

Please follow to pio run --list-targets documentation for the other targets.

Examples

  1. Build a project using Release Configuration, upload the firmware, and start Serial Monitor automatically:

    [env:upload_and_monitor]
    targets = upload, monitor
    
  2. Build a project using Debug Configuration.

Tip! You can use these targets like an option to pio run --target command. For example:

# clean project
pio run -t clean

# dump current build environment
pio run --target envdump

When no targets are defined, PlatformIO will build only sources by default.