Merge branch 'bugfix/run_esptool_espport' into 'master'

cmake: Handle ESPPORT environment variable correctly

See merge request idf/esp-idf!3482
This commit is contained in:
Angus Gratton 2018-10-17 08:14:20 +08:00
commit 95e4bdf030

View File

@ -17,10 +17,11 @@ endif()
# Note: we can't expand these environment variables in the main IDF CMake build, # Note: we can't expand these environment variables in the main IDF CMake build,
# because we want to expand them at flashing time not at CMake runtime (so they can change # because we want to expand them at flashing time not at CMake runtime (so they can change
# without needing a CMake re-run) # without needing a CMake re-run)
if(NOT ENV{ESPPORT}) set(ESPPORT $ENV{ESPPORT})
if(NOT ESPPORT)
message("Note: esptool.py will search for a serial port. To specify a port, set the ESPPORT environment variable.") message("Note: esptool.py will search for a serial port. To specify a port, set the ESPPORT environment variable.")
else() else()
set(port_arg "-p $ENV{ESPPORT}") set(port_arg "-p ${ESPPORT}")
endif() endif()
set(ESPBAUD $ENV{ESPBAUD}) set(ESPBAUD $ENV{ESPBAUD})