Skip to content

Commit

Permalink
Implement upload_resetmethod option for stlink upload
Browse files Browse the repository at this point in the history
  • Loading branch information
saierd committed Mar 6, 2022
1 parent 5ee07da commit 8033b0a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ def __configure_upload_port(env):
openocd_args.extend(
["-c", "adapter speed %s" % env.GetProjectOption("debug_speed")]
)
if env.GetProjectOption("upload_resetmethod", ""):
openocd_args.extend(
["-c", "reset_config %s" % env.GetProjectOption("upload_resetmethod")]
)
openocd_args.extend([
"-c", "program {$SOURCE} %s verify reset; shutdown;" %
board.get("upload.offset_address", "")
Expand Down

0 comments on commit 8033b0a

Please sign in to comment.