Skip to content

Commit

Permalink
Merge branch 'bugfix/detect_port_once' into 'master'
Browse files Browse the repository at this point in the history
tools: fix unnecessary port detection for multiple targets

Closes IDF-6655

See merge request espressif/esp-idf!22019
  • Loading branch information
dobairoland committed Jan 12, 2023
2 parents 1a8a067 + 8934233 commit 9d9860b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tools/idf_py_actions/debug_ext.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -149,11 +149,11 @@ def _get_espcoredump_instance(ctx: Context,
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

Expand Down
8 changes: 4 additions & 4 deletions tools/idf_py_actions/serial_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def monitor(action: str, ctx: click.core.Context, args: PropertyDict, print_filt
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')

Expand Down Expand Up @@ -163,8 +163,8 @@ def flash(action: str, ctx: click.core.Context, args: PropertyDict) -> None:
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)
Expand Down

0 comments on commit 9d9860b

Please sign in to comment.