Hi, is there a command to show all the available environments?
I could read platform.ini, but it is very long and pure list of envs would be more readable.
Plus you would have to be very careful to take things like extra_configs
into account.
Use pio project dump
, pio project config
or pio run --list-targets
for this.
>pio run --list-targets
Environment Group Name Title Description
-------------- -------- ----------- --------------------------- -----------------------------------------------------
attiny167 Advanced compiledb Compilation Database Generate compilation database `compile_commands.json`
attiny167 Generic clean Clean
attiny167 Platform bootloader Burn Bootloader
attiny167 Platform fuses Set Fuses
attiny167 Platform size Program Size Calculate program size
attiny167 Platform upload Upload
attiny167 Platform uploadeep Upload EEPROM
esp-wrover-kit Advanced compiledb Compilation Database Generate compilation database `compile_commands.json`
esp-wrover-kit Generic clean Clean
esp-wrover-kit Platform buildfs Build Filesystem Image
esp-wrover-kit Platform erase Erase Flash
esp-wrover-kit Platform size Program Size Calculate program size
esp-wrover-kit Platform upload Upload
esp-wrover-kit Platform uploadfs Upload Filesystem Image
esp-wrover-kit Platform uploadfsota Upload Filesystem Image OTA
ATmega4809 Advanced compiledb Compilation Database Generate compilation database `compile_commands.json`
ATmega4809 Generic clean Clean
ATmega4809 Platform bootloader Burn Bootloader
ATmega4809 Platform fuses Set Fuses
ATmega4809 Platform size Program Size Calculate program size
ATmega4809 Platform upload Upload
esp32dev Advanced compiledb Compilation Database Generate compilation database `compile_commands.json`
esp32dev Generic clean Clean
esp32dev Platform buildfs Build Filesystem Image
esp32dev Platform erase Erase Flash
esp32dev Platform size Program Size Calculate program size
esp32dev Platform upload Upload
esp32dev Platform uploadfs Upload Filesystem Image
esp32dev Platform uploadfsota Upload Filesystem Image OTA
>pio project config
Computed project configuration for C:\Users\Max\Documents\PlatformIO\Projects\lib_path_repro
env:ATmega4809
--------------
platform = atmelmegaavr
board = ATmega4809
build_flags = -DARDUINO_AVR_ATmega4809
framework = arduino
lib_ldf_mode = chain+
lib_deps = adafruit/Adafruit GFX Library @ ^1.10.7
adafruit/Adafruit BusIO @ ^1.7.3
SPI
Wire
env:attiny167
-------------
platform = atmelavr
board = attiny167
framework = arduino
board_build.f_cpu = 16000000L
build_flags = -D CLOCK_SOURCE=1
env:esp32dev
------------
platform = espressif32
board = esp32dev
framework = arduino
env:esp-wrover-kit
------------------
platform = espressif32
board = esp-wrover-kit
framework = arduino
lib_ldf_mode = chain+
lib_deps = WiFi
ESP Async WebServer
ayushsharma82/AsyncElegantOTA @ ^2.2.5
You also get the list of available environments as a side-effect of specifying a wrong environment name
>pio run -e what
Error: Unknown environment names 'what'. Valid names are 'attiny167, ATmega4809, esp32dev, esp-wrover-kit'
Thanks, I think I will go for this. I was hoping in a command like pio run --list-environments
to output Valid names are 'attiny167, ATmega4809, esp32dev, esp-wrover-kit'