mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 05:34:32 +02:00
esptool_py: fix quoting issues in run_serial_tool.cmake
This commit is contained in:
@@ -22,6 +22,8 @@ if(DEFINED ENV{IDF_ENV_FPGA})
|
|||||||
message("Note: IDF_ENV_FPGA is set, propagating to esptool with ESPTOOL_ENV_FPGA = 1")
|
message("Note: IDF_ENV_FPGA is set, propagating to esptool with ESPTOOL_ENV_FPGA = 1")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(serial_tool_cmd ${SERIAL_TOOL})
|
||||||
|
|
||||||
# Main purpose of this script: we can't expand these environment variables in the main IDF CMake build,
|
# Main purpose of this script: 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)
|
||||||
@@ -30,7 +32,7 @@ if(NOT ESPPORT)
|
|||||||
message("Note: ${SERIAL_TOOL} will search for a serial port. "
|
message("Note: ${SERIAL_TOOL} will search for a serial port. "
|
||||||
"To specify a port, set the ESPPORT environment variable.")
|
"To specify a port, set the ESPPORT environment variable.")
|
||||||
else()
|
else()
|
||||||
set(port_arg "-p ${ESPPORT}")
|
list(APPEND serial_tool_cmd -p ${ESPPORT})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(ESPBAUD $ENV{ESPBAUD})
|
set(ESPBAUD $ENV{ESPBAUD})
|
||||||
@@ -38,13 +40,10 @@ if(NOT ESPBAUD)
|
|||||||
message("Note: ${SERIAL_TOOL} will attempt to set baud rate automatically. "
|
message("Note: ${SERIAL_TOOL} will attempt to set baud rate automatically. "
|
||||||
"To specify a baud rate, set the ESPBAUD environment variable.")
|
"To specify a baud rate, set the ESPBAUD environment variable.")
|
||||||
else()
|
else()
|
||||||
set(baud_arg "-b ${ESPBAUD}")
|
list(APPEND serial_tool_cmd -b ${ESPBAUD})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(serial_tool_cmd "${SERIAL_TOOL} ${port_arg} ${baud_arg} ${SERIAL_TOOL_ARGS}")
|
list(APPEND serial_tool_cmd ${SERIAL_TOOL_ARGS})
|
||||||
|
|
||||||
include("${IDF_PATH}/tools/cmake/utilities.cmake")
|
|
||||||
spaces2list(serial_tool_cmd)
|
|
||||||
|
|
||||||
execute_process(COMMAND ${serial_tool_cmd}
|
execute_process(COMMAND ${serial_tool_cmd}
|
||||||
WORKING_DIRECTORY "${WORKING_DIRECTORY}"
|
WORKING_DIRECTORY "${WORKING_DIRECTORY}"
|
||||||
|
Reference in New Issue
Block a user