get_port_args.cmake 688 B

123456789101112131415161718
  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)
  4. set(ESPPORT $ENV{ESPPORT})
  5. if(NOT ESPPORT)
  6. message("Note: ${SERIAL_TOOL} will search for a serial port. "
  7. "To specify a port, set the ESPPORT environment variable.")
  8. else()
  9. set(port_arg "-p ${ESPPORT}")
  10. endif()
  11. set(ESPBAUD $ENV{ESPBAUD})
  12. if(NOT ESPBAUD)
  13. message("Note: ${SERIAL_TOOL} will attempt to set baud rate automatically. "
  14. "To specify a baud rate, set the ESPBAUD environment variable.")
  15. else()
  16. set(baud_arg "-b ${ESPBAUD}")
  17. endif()