Skip to content

Commit

Permalink
Force Teensy CLI when Teensy App is not available (Linux ARM) // Resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Feb 8, 2018
1 parent 654a349 commit 810a674
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import sys
from platform import system
from os import makedirs
from os.path import isdir, join
from os.path import isdir, isfile, join

from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default,
DefaultEnvironment)
Expand Down Expand Up @@ -227,6 +227,14 @@
# Target: Upload by default firmware file
#

# Force Teensy CLI when Teensy App is not available (Linux ARM)
if env.subst("$UPLOAD_PROTOCOL") == "teensy-gui" and not isfile(
join(
platform.get_package_dir("tool-teensy") or "",
"teensy_post_compile.exe"
if system() == "Windows" else "teensy_post_compile")):
env.Replace(UPLOAD_PROTOCOL="teensy-cli")

upload_protocol = env.subst("$UPLOAD_PROTOCOL")
upload_actions = []

Expand Down

0 comments on commit 810a674

Please sign in to comment.