Просмотр исходного кода

Merge branch 'bugfix/call_idf_monitor_with_python_explicitly' into 'master'

esptool_py: call idf.py monitor with python explicitly

Closes IDFGH-3333

See merge request espressif/esp-idf!12981
Angus Gratton 4 лет назад
Родитель
Сommit
f13b10a17b
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      components/esptool_py/project_include.cmake

+ 3 - 1
components/esptool_py/project_include.cmake

@@ -3,6 +3,7 @@
 # Many of these are read when generating flash_app_args & flash_project_args
 # Many of these are read when generating flash_app_args & flash_project_args
 idf_build_get_property(target IDF_TARGET)
 idf_build_get_property(target IDF_TARGET)
 idf_build_get_property(python PYTHON)
 idf_build_get_property(python PYTHON)
+idf_build_get_property(idf_path IDF_PATH)
 
 
 set(chip_model ${target})
 set(chip_model ${target})
 if(target STREQUAL "esp32s3")
 if(target STREQUAL "esp32s3")
@@ -14,6 +15,7 @@ endif()
 set(ESPTOOLPY ${python} "${CMAKE_CURRENT_LIST_DIR}/esptool/esptool.py" --chip ${chip_model})
 set(ESPTOOLPY ${python} "${CMAKE_CURRENT_LIST_DIR}/esptool/esptool.py" --chip ${chip_model})
 set(ESPSECUREPY ${python} "${CMAKE_CURRENT_LIST_DIR}/esptool/espsecure.py")
 set(ESPSECUREPY ${python} "${CMAKE_CURRENT_LIST_DIR}/esptool/espsecure.py")
 set(ESPEFUSEPY ${python} "${CMAKE_CURRENT_LIST_DIR}/esptool/espefuse.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(ESPFLASHMODE ${CONFIG_ESPTOOLPY_FLASHMODE})
 set(ESPFLASHFREQ ${CONFIG_ESPTOOLPY_FLASHFREQ})
 set(ESPFLASHFREQ ${CONFIG_ESPTOOLPY_FLASHFREQ})
@@ -151,7 +153,7 @@ add_custom_target(erase_flash
 add_custom_target(monitor
 add_custom_target(monitor
     COMMAND ${CMAKE_COMMAND}
     COMMAND ${CMAKE_COMMAND}
     -D IDF_PATH="${idf_path}"
     -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 SERIAL_TOOL_ARGS="${elf_dir}/${elf}"
     -D WORKING_DIRECTORY="${build_dir}"
     -D WORKING_DIRECTORY="${build_dir}"
     -P run_serial_tool.cmake
     -P run_serial_tool.cmake