Skip to content

Commit ef52c37

Browse files
committed
Add a board level config upload.gpiostring
This config can be used to specify a custom reset method during serial upload. Example: ``` "upload": { "maximum_ram_size": 65536, "maximum_size": 262144, "protocol": "serial", "protocols": [ "dfu", "serial", "jlink", "stlink", "blackmagic" ], "gpiostring": "-dtr,-rts," ``` Fix #257
1 parent 76958b4 commit ef52c37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builder/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,13 @@ def __configure_upload_port(env):
267267
elif upload_protocol == "serial":
268268
def __configure_upload_port(env):
269269
return env.subst("$UPLOAD_PORT")
270-
271270
env.Replace(
272271
__configure_upload_port=__configure_upload_port,
273272
UPLOADER=join(
274273
'"%s"' % platform.get_package_dir("tool-stm32duino") or "",
275274
"stm32flash", "stm32flash"),
276275
UPLOADERFLAGS=[
276+
"-i%s" % board.get("upload.gpiostring") if board.get("upload.gpiostring", False) else "",
277277
"-g", board.get("upload.offset_address", "0x08000000"),
278278
"-b", env.subst("$UPLOAD_SPEED") or "115200", "-w"
279279
],

0 commit comments

Comments
 (0)