From d9f687f51a572aaca5d1de22e3158647cb8f3162 Mon Sep 17 00:00:00 2001 From: callalilychen Date: Mon, 18 May 2020 22:11:11 +0200 Subject: [PATCH] esptool_py: call idf.py monitor with python explicitly Closes https://github.com/espressif/esp-idf/pull/5314 --- components/esptool_py/project_include.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/esptool_py/project_include.cmake b/components/esptool_py/project_include.cmake index 95fa5648a9..8ef68860c3 100644 --- a/components/esptool_py/project_include.cmake +++ b/components/esptool_py/project_include.cmake @@ -3,6 +3,7 @@ # Many of these are read when generating flash_app_args & flash_project_args idf_build_get_property(target IDF_TARGET) idf_build_get_property(python PYTHON) +idf_build_get_property(idf_path IDF_PATH) set(chip_model ${target}) if(target STREQUAL "esp32s3") @@ -14,6 +15,7 @@ endif() set(ESPTOOLPY ${python} "${CMAKE_CURRENT_LIST_DIR}/esptool/esptool.py" --chip ${chip_model}) set(ESPSECUREPY ${python} "${CMAKE_CURRENT_LIST_DIR}/esptool/espsecure.py") set(ESPEFUSEPY ${python} "${CMAKE_CURRENT_LIST_DIR}/esptool/espefuse.py") +set(ESPMONITOR ${python} "${idf_path}/tools/idf_monitor.py") set(ESPFLASHMODE ${CONFIG_ESPTOOLPY_FLASHMODE}) set(ESPFLASHFREQ ${CONFIG_ESPTOOLPY_FLASHFREQ}) @@ -151,7 +153,7 @@ add_custom_target(erase_flash add_custom_target(monitor COMMAND ${CMAKE_COMMAND} -D IDF_PATH="${idf_path}" - -D SERIAL_TOOL="${idf_path}/tools/idf_monitor.py" + -D SERIAL_TOOL="${ESPMONITOR}" -D SERIAL_TOOL_ARGS="${elf_dir}/${elf}" -D WORKING_DIRECTORY="${build_dir}" -P run_serial_tool.cmake