1# Note: we can't expand these environment variables in the main IDF CMake build,
2# because we want to expand them at flashing time not at CMake runtime (so they can change
3# without needing a CMake re-run)
4set(ESPPORT $ENV{ESPPORT})
5if(NOT ESPPORT)
6    message("Note: ${SERIAL_TOOL} will search for a serial port. "
7            "To specify a port, set the ESPPORT environment variable.")
8else()
9    set(port_arg "-p ${ESPPORT}")
10endif()
11
12set(ESPBAUD $ENV{ESPBAUD})
13if(NOT ESPBAUD)
14    message("Note: ${SERIAL_TOOL} will attempt to set baud rate automatically. "
15            "To specify a baud rate, set the ESPBAUD environment variable.")
16else()
17    set(baud_arg "-b ${ESPBAUD}")
18endif()
19