forked from platformio/platformio-core
Update OpenOCD uploading flags // Issue #732
This commit is contained in:
@ -121,12 +121,11 @@ if upload_protocol == "openocd":
|
|||||||
env.Replace(
|
env.Replace(
|
||||||
UPLOADER=join("$PIOPACKAGES_DIR", "tool-openocd", "bin", "openocd"),
|
UPLOADER=join("$PIOPACKAGES_DIR", "tool-openocd", "bin", "openocd"),
|
||||||
UPLOADERFLAGS=[
|
UPLOADERFLAGS=[
|
||||||
"-d2",
|
|
||||||
"-f", join(BOARD_OPTIONS.get("debug", {}).get("openocdcfg", "")),
|
"-f", join(BOARD_OPTIONS.get("debug", {}).get("openocdcfg", "")),
|
||||||
"-s", join("$PIOPACKAGES_DIR", "tool-openocd",
|
"-s", '"%s"' % join("$PIOPACKAGES_DIR", "tool-openocd",
|
||||||
"share", "openocd", "scripts"),
|
"share", "openocd", "scripts"),
|
||||||
"-s", join("$PIOPACKAGES_DIR", "tool-openocd",
|
"-s", '"%s"' % join("$PIOPACKAGES_DIR", "tool-openocd",
|
||||||
"share", "openocd", "scripts", "board")
|
"share", "openocd", "scripts", "board")
|
||||||
],
|
],
|
||||||
|
|
||||||
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS'
|
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS'
|
||||||
@ -135,19 +134,17 @@ if upload_protocol == "openocd":
|
|||||||
if "zero" in env.subst("$BOARD"):
|
if "zero" in env.subst("$BOARD"):
|
||||||
env.Append(
|
env.Append(
|
||||||
UPLOADERFLAGS=[
|
UPLOADERFLAGS=[
|
||||||
"-s", join("$PLATFORMFW_DIR", "variants",
|
"-s", '"%s"' % join("$PLATFORMFW_DIR", "variants",
|
||||||
"${BOARD_OPTIONS['build']['variant']}",
|
"${BOARD_OPTIONS['build']['variant']}",
|
||||||
"openocd_scripts")
|
"openocd_scripts")
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
env.Append(
|
env.Append(
|
||||||
UPLOADERFLAGS=[
|
UPLOADERFLAGS=[
|
||||||
"-c", "\"telnet_port", "disabled;",
|
"-c", ("telnet_port disabled; program {{$SOURCES}} "
|
||||||
"program", "{{$SOURCES}}",
|
"verify reset %s; shutdown" % (
|
||||||
"verify", "reset",
|
user_code_section if user_code_section else ""))
|
||||||
"%s;" % (user_code_section if user_code_section else ""),
|
|
||||||
"shutdown\""
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user