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