diff options
author | Frank Pilhofer <frank.pilhofer@zuehlke.com> | 2021-06-25 01:51:27 -0700 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-07-01 12:37:08 +1000 |
commit | 41adf178309759d5965c15972f04987a2635314c (patch) | |
tree | 9abda4af680b71b98f10556b904dad20a229cd5c /tools/pyboard.py | |
parent | efa97beb992049978f0e7be6e4e2f01249054362 (diff) |
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.
Diffstat (limited to 'tools/pyboard.py')
-rwxr-xr-x | tools/pyboard.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/pyboard.py b/tools/pyboard.py index 7d06aa847..e460c69e2 100755 --- a/tools/pyboard.py +++ b/tools/pyboard.py @@ -657,6 +657,12 @@ def main(): ) 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( "--follow", action="store_true", help="follow the output after running the scripts [default if no scripts given]", @@ -695,7 +701,7 @@ def main(): # we must enter raw-REPL mode to execute commands # this will do a soft-reset of the board try: - pyb.enter_raw_repl() + pyb.enter_raw_repl(args.soft_reset) except PyboardError as er: print(er) pyb.close() |