Update OpenOCD uploading flags // Issue #732

This commit is contained in:
Valeriy Koval
2016-08-04 18:37:52 +03:00
parent 179a971770
commit b714fb1be0

View File

@ -121,11 +121,10 @@ if upload_protocol == "openocd":
env.Replace(
UPLOADER=join("$PIOPACKAGES_DIR", "tool-openocd", "bin", "openocd"),
UPLOADERFLAGS=[
"-d2",
"-f", join(BOARD_OPTIONS.get("debug", {}).get("openocdcfg", "")),
"-s", join("$PIOPACKAGES_DIR", "tool-openocd",
"-s", '"%s"' % join("$PIOPACKAGES_DIR", "tool-openocd",
"share", "openocd", "scripts"),
"-s", join("$PIOPACKAGES_DIR", "tool-openocd",
"-s", '"%s"' % join("$PIOPACKAGES_DIR", "tool-openocd",
"share", "openocd", "scripts", "board")
],
@ -135,7 +134,7 @@ if upload_protocol == "openocd":
if "zero" in env.subst("$BOARD"):
env.Append(
UPLOADERFLAGS=[
"-s", join("$PLATFORMFW_DIR", "variants",
"-s", '"%s"' % join("$PLATFORMFW_DIR", "variants",
"${BOARD_OPTIONS['build']['variant']}",
"openocd_scripts")
]
@ -143,11 +142,9 @@ if upload_protocol == "openocd":
env.Append(
UPLOADERFLAGS=[
"-c", "\"telnet_port", "disabled;",
"program", "{{$SOURCES}}",
"verify", "reset",
"%s;" % (user_code_section if user_code_section else ""),
"shutdown\""
"-c", ("telnet_port disabled; program {{$SOURCES}} "
"verify reset %s; shutdown" % (
user_code_section if user_code_section else ""))
]
)