forked from M-Labs/artiq
artiq_devtool: add reset action.
This commit is contained in:
parent
5bbb05362b
commit
b391598c87
@ -44,7 +44,7 @@ def get_argparser():
|
||||
parser.add_argument("actions", metavar="ACTION",
|
||||
type=str, default=[], nargs="+",
|
||||
help="actions to perform, sequence of: "
|
||||
"build boot boot+log connect hotswap clean")
|
||||
"build reset boot boot+log connect hotswap clean")
|
||||
|
||||
return parser
|
||||
|
||||
@ -117,6 +117,13 @@ def main():
|
||||
if os.path.isdir(target_dir):
|
||||
shutil.rmtree(target_dir)
|
||||
|
||||
elif action == "reset":
|
||||
logger.info("Resetting device")
|
||||
artiq_flash = run_command(
|
||||
"{env} artiq_flash start" +
|
||||
(" --target-file " + args.config if args.config else ""))
|
||||
drain(artiq_flash)
|
||||
|
||||
elif action == "boot" or action == "boot+log":
|
||||
logger.info("Uploading firmware")
|
||||
get_sftp().mkdir("/tmp/{tmp}".format(tmp=tmp))
|
||||
|
Loading…
Reference in New Issue
Block a user