Skip to content

Commit

Permalink
cmake: Handle ESPPORT environment variable correctly
Browse files Browse the repository at this point in the history
Closes #2553
  • Loading branch information
projectgus committed Oct 14, 2018
1 parent 1ee2bc4 commit 897670b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/esptool_py/run_esptool.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ endif()
# 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
# 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.")
else()
set(port_arg "-p $ENV{ESPPORT}")
set(port_arg "-p ${ESPPORT}")
endif()

set(ESPBAUD $ENV{ESPBAUD})
Expand Down

0 comments on commit 897670b

Please sign in to comment.