Automatically reboot Teensy board after upload when Teensy Loader GUI is used // Resolve #609

This commit is contained in:
Ivan Kravets
2016-04-09 18:39:10 +03:00
parent 669561782b
commit 6356e49fdd
3 changed files with 10 additions and 3 deletions
+4 -1
View File
@@ -65,6 +65,8 @@ if isfile(env.subst(join(
)
else:
env.Append(
REBOOTER=join(
"$PIOPACKAGES_DIR", "tool-teensy", "teensy_reboot"),
UPLOADER=join(
"$PIOPACKAGES_DIR", "tool-teensy", "teensy_post_compile"),
UPLOADERFLAGS=[
@@ -101,7 +103,8 @@ AlwaysBuild(target_size)
# Target: Upload by default firmware file
#
upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADHEXCMD")
upload = env.Alias(["upload", "uploadlazy"], target_firm,
["$UPLOADHEXCMD"] + (["$REBOOTER"] if "REBOOTER" in env else []))
AlwaysBuild(upload)
#