Skip to content

Commit

Permalink
Merge branch 'monitor_no_reset' into 'master'
Browse files Browse the repository at this point in the history
fix(tools/idf_monitor): exit with error if monitor is run with --no-reset and without --port

Closes IDFGH-13094

See merge request espressif/esp-idf!31705
  • Loading branch information
dobairoland committed Jun 24, 2024
2 parents e9a2f3b + 2662a51 commit 4f3522d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/idf_py_actions/serial_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from typing import Tuple

import click
from idf_py_actions.errors import FatalError
from idf_py_actions.global_options import global_options
from idf_py_actions.tools import ensure_build_directory
from idf_py_actions.tools import get_default_serial_port
Expand Down Expand Up @@ -117,12 +118,10 @@ def monitor(

if project_desc['target'] != 'linux':
if no_reset and args.port is None:
msg = (
'WARNING: --no-reset is ignored. '
raise FatalError(
'Error: --no-reset is only supported when used with a port.'
'Please specify the port with the --port argument in order to use this option.'
)
yellow_print(msg)
no_reset = False

args.port = args.port or get_default_serial_port()
monitor_args += ['-p', args.port]
Expand Down Expand Up @@ -927,7 +926,8 @@ def efuse_write_protect(action: str, ctx: click.core.Context, args: PropertyDict
'help': (
'Disable reset on monitor startup. '
'IDF Monitor will not reset the MCU target by toggling DTR/RTS lines on startup '
'if this option is set.'
'if this option is set. '
'This option only works if --port argument is specified.'
),
},
{
Expand Down

0 comments on commit 4f3522d

Please sign in to comment.