mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
tools: Support external Esptool wrappers
Implements https://github.com/jimparis/esptool-ftdi/issues/3 Closes https://github.com/espressif/esp-idf/pull/6879
This commit is contained in:
parent
76fbb689fd
commit
6faf4941cc
@ -12,7 +12,7 @@ if(target STREQUAL "esp32s3")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(ESPTOOLPY ${python} "${CMAKE_CURRENT_LIST_DIR}/esptool/esptool.py" --chip ${chip_model})
|
||||
set(ESPTOOLPY ${python} "$ENV{ESPTOOL_WRAPPER}" "${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")
|
||||
|
@ -37,9 +37,13 @@ def action_extensions(base_actions, project_path):
|
||||
|
||||
def _get_esptool_args(args):
|
||||
esptool_path = os.path.join(os.environ['IDF_PATH'], 'components/esptool_py/esptool/esptool.py')
|
||||
esptool_wrapper_path = os.environ.get('ESPTOOL_WRAPPER', '')
|
||||
if args.port is None:
|
||||
args.port = _get_default_serial_port(args)
|
||||
result = [PYTHON, esptool_path]
|
||||
result = [PYTHON]
|
||||
if os.path.exists(esptool_wrapper_path):
|
||||
result += [esptool_wrapper_path]
|
||||
result += [esptool_path]
|
||||
result += ['-p', args.port]
|
||||
result += ['-b', str(args.baud)]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user