Fix firmware uploading to Arduino/Genuino 101 // Resolve #695

This commit is contained in:
Ivan Kravets
2016-06-15 16:02:04 +03:00
parent cdcf075635
commit 682e435ded
4 changed files with 16 additions and 5 deletions
+9 -1
View File
@@ -23,6 +23,14 @@ from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default,
env = DefaultEnvironment()
def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
if env.get("BOARD_OPTIONS", {}).get("upload", {}).get(
"use_1200bps_touch", False):
env.TouchSerialPort("$UPLOAD_PORT", 1200)
env.Replace(
AR="arc-elf32-ar",
AS="arc-elf32-as",
@@ -178,7 +186,7 @@ AlwaysBuild(target_size)
#
upload = env.Alias(["upload", "uploadlazy"], target_firm,
[env.AutodetectUploadPort, "$UPLOADCMD"])
[env.AutodetectUploadPort, BeforeUpload, "$UPLOADCMD"])
AlwaysBuild(upload)
#