forked from M-Labs/artiq
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.
This commit is contained in:
parent
fa4dc1bf0e
commit
1570a482c2
|
@ -44,7 +44,7 @@ def get_argparser():
|
||||||
parser.add_argument("actions", metavar="ACTION",
|
parser.add_argument("actions", metavar="ACTION",
|
||||||
type=str, default=[], nargs="+",
|
type=str, default=[], nargs="+",
|
||||||
help="actions to perform, sequence of: "
|
help="actions to perform, sequence of: "
|
||||||
"build reset boot boot+log connect hotswap clean")
|
"build boot boot+log connect reset hotswap clean")
|
||||||
|
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
@ -112,14 +112,6 @@ def main():
|
||||||
if os.path.isdir(target_dir):
|
if os.path.isdir(target_dir):
|
||||||
shutil.rmtree(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":
|
elif action == "boot" or action == "boot+log":
|
||||||
lock()
|
lock()
|
||||||
|
|
||||||
|
@ -196,6 +188,12 @@ def main():
|
||||||
"{env} python3 flterm.py {serial} --output-only",
|
"{env} python3 flterm.py {serial} --output-only",
|
||||||
**substs)
|
**substs)
|
||||||
|
|
||||||
|
elif action == "reset":
|
||||||
|
logger.info("Resetting device")
|
||||||
|
client.run_command(
|
||||||
|
"{env} artiq_flash start",
|
||||||
|
**substs)
|
||||||
|
|
||||||
elif action == "hotswap":
|
elif action == "hotswap":
|
||||||
logger.info("Hotswapping firmware")
|
logger.info("Hotswapping firmware")
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue