From 55684fab7245d7a14bc31e7a8bfc85941fd31d90 Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Mon, 12 Oct 2020 22:15:40 +0800 Subject: [PATCH] esptool_py: use serial script for monitor --- components/esptool_py/project_include.cmake | 6 +++--- components/esptool_py/run_idf_monitor.cmake | 21 --------------------- 2 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 components/esptool_py/run_idf_monitor.cmake diff --git a/components/esptool_py/project_include.cmake b/components/esptool_py/project_include.cmake index 038a07c937..0297a3a8cd 100644 --- a/components/esptool_py/project_include.cmake +++ b/components/esptool_py/project_include.cmake @@ -143,10 +143,10 @@ add_custom_target(erase_flash add_custom_target(monitor COMMAND ${CMAKE_COMMAND} -D IDF_PATH="${idf_path}" - -D IDF_MONITOR="${idf_path}/tools/idf_monitor.py" - -D ELF_FILE="${elf_dir}/${elf}" + -D SERIAL_TOOL="${idf_path}/tools/idf_monitor.py" + -D SERIAL_TOOL_ARGS="${elf_dir}/${elf}" -D WORKING_DIRECTORY="${build_dir}" - -P run_idf_monitor.cmake + -P run_serial_tool.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} USES_TERMINAL ) diff --git a/components/esptool_py/run_idf_monitor.cmake b/components/esptool_py/run_idf_monitor.cmake deleted file mode 100644 index 56b58de3da..0000000000 --- a/components/esptool_py/run_idf_monitor.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# A CMake script to run idf_monitor from within ninja or make -# or another cmake-based build runner -# -# (Needed to expand environment variables, for backwards compatibility.) -# -# It is recommended to NOT USE this CMake script if you have the option of -# running idf_monitor.py directly. This script exists only for use inside CMake builds. -# -cmake_minimum_required(VERSION 3.5) - -set(TOOL "idf_monitor.py") - -if(NOT IDF_MONITOR OR NOT ELF_FILE) - message(FATAL_ERROR "IDF_MONITOR and ELF_FILE must " - "be specified on the CMake command line. For direct execution, it is " - "strongly recommended to run ${TOOL} directly.") -endif() - -include("${CMAKE_CURRENT_LIST_DIR}/get_port_args.cmake") -set(CMD "${IDF_MONITOR} ${port_arg} ${baud_arg} ${ELF_FILE}") -include("${CMAKE_CURRENT_LIST_DIR}/run_cmd.cmake")