From 1570a482c2675339a7af3c70532765e0044c48ab Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 25 Dec 2017 16:15:51 +0000 Subject: [PATCH] artiq_devtool: don't require lock for reset. reset is mainly useful as a part of reset+hotswap sequence, and that already needs lock via connect. --- artiq/frontend/artiq_devtool.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/artiq/frontend/artiq_devtool.py b/artiq/frontend/artiq_devtool.py index e84b988f3..8c5b0ac01 100755 --- a/artiq/frontend/artiq_devtool.py +++ b/artiq/frontend/artiq_devtool.py @@ -44,7 +44,7 @@ def get_argparser(): parser.add_argument("actions", metavar="ACTION", type=str, default=[], nargs="+", help="actions to perform, sequence of: " - "build reset boot boot+log connect hotswap clean") + "build boot boot+log connect reset hotswap clean") return parser @@ -112,14 +112,6 @@ def main(): if os.path.isdir(target_dir): shutil.rmtree(target_dir) - elif action == "reset": - lock() - - logger.info("Resetting device") - client.run_command( - "{env} artiq_flash start", - **substs) - elif action == "boot" or action == "boot+log": lock() @@ -196,6 +188,12 @@ def main(): "{env} python3 flterm.py {serial} --output-only", **substs) + elif action == "reset": + logger.info("Resetting device") + client.run_command( + "{env} artiq_flash start", + **substs) + elif action == "hotswap": logger.info("Hotswapping firmware") try: