Skip to content

Commit 8033b0a

Browse files
committed
Implement upload_resetmethod option for stlink upload
1 parent 5ee07da commit 8033b0a

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
@@ -310,6 +310,10 @@ def __configure_upload_port(env):
310310
openocd_args.extend(
311311
["-c", "adapter speed %s" % env.GetProjectOption("debug_speed")]
312312
)
313+
if env.GetProjectOption("upload_resetmethod", ""):
314+
openocd_args.extend(
315+
["-c", "reset_config %s" % env.GetProjectOption("upload_resetmethod")]
316+
)
313317
openocd_args.extend([
314318
"-c", "program {$SOURCE} %s verify reset; shutdown;" %
315319
board.get("upload.offset_address", "")

0 commit comments

Comments
 (0)