Commit 41adf178 authored by Frank Pilhofer's avatar Frank Pilhofer Committed by Damien George

tools/pyboard.py: Add cmd-line option to make soft reset configurable.

Leaves the default as-is, but allows using --no-soft-reset to disable the
soft reset when connecting.
parent efa97beb
...@@ -656,6 +656,12 @@ def main(): ...@@ -656,6 +656,12 @@ def main():
help="seconds to wait for USB connected board to become available", help="seconds to wait for USB connected board to become available",
) )
group = cmd_parser.add_mutually_exclusive_group() group = cmd_parser.add_mutually_exclusive_group()
group.add_argument(
"--soft-reset",
default=True,
action=argparse.BooleanOptionalAction,
help="Whether to perform a soft reset when connecting to the board.",
)
group.add_argument( group.add_argument(
"--follow", "--follow",
action="store_true", action="store_true",
...@@ -695,7 +701,7 @@ def main(): ...@@ -695,7 +701,7 @@ def main():
# we must enter raw-REPL mode to execute commands # we must enter raw-REPL mode to execute commands
# this will do a soft-reset of the board # this will do a soft-reset of the board
try: try:
pyb.enter_raw_repl() pyb.enter_raw_repl(args.soft_reset)
except PyboardError as er: except PyboardError as er:
print(er) print(er)
pyb.close() pyb.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment