Skip to content

Commit 212ee1c

Browse files
committed
Implement upload_resetmethod option for stlink upload
1 parent 6dbc7b7 commit 212ee1c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

builder/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ def __configure_upload_port(env):
320320
openocd_args.extend(
321321
["-c", "adapter speed %s" % env.GetProjectOption("debug_speed")]
322322
)
323+
if env.GetProjectOption("upload_resetmethod", ""):
324+
openocd_args.extend(
325+
["-c", "reset_config %s" % env.GetProjectOption("upload_resetmethod")]
326+
)
323327
openocd_args.extend([
324328
"-c", "program {$SOURCE} %s verify reset; shutdown;" %
325329
board.get("upload.offset_address", "")

0 commit comments

Comments
 (0)