Merge branch 'bugfix/detect_port_once' into 'master'

tools: fix unnecessary port detection for multiple targets

Closes IDF-6655

See merge request espressif/esp-idf!22019
This commit is contained in:
Roland Dobai 2023-01-13 00:29:39 +08:00
commit 9d9860b0e5
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import json
import os
@ -149,11 +149,11 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
coredump_to_flash = coredump_to_flash_config.rstrip().endswith('y') if coredump_to_flash_config else False
prog = os.path.join(project_desc['build_dir'], project_desc['app_elf'])
esp_port = args.port or get_default_serial_port()
args.port = args.port or get_default_serial_port()
espcoredump_kwargs = dict()
espcoredump_kwargs['port'] = esp_port
espcoredump_kwargs['port'] = args.port
espcoredump_kwargs['baud'] = args.baud
espcoredump_kwargs['gdb_timeout_sec'] = gdb_timeout_sec

View File

@ -95,8 +95,8 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
yellow_print(msg)
no_reset = False
esp_port = args.port or get_default_serial_port()
monitor_args += ['-p', esp_port]
args.port = args.port or get_default_serial_port()
monitor_args += ['-p', args.port]
baud = monitor_baud or os.getenv('IDF_MONITOR_BAUD') or os.getenv('MONITORBAUD')
@ -163,8 +163,8 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
yellow_print('skipping flash since running on linux...')
return
esp_port = args.port or get_default_serial_port()
run_target(action, args, {'ESPBAUD': str(args.baud), 'ESPPORT': esp_port})
args.port = args.port or get_default_serial_port()
run_target(action, args, {'ESPBAUD': str(args.baud), 'ESPPORT': args.port})
def erase_flash(action: str, ctx: click.core.Context, args: PropertyDict) -> None:
ensure_build_directory(args, ctx.info_name)