From 212ee1c239b8ef658637eb15f9a8b1598ec578bf Mon Sep 17 00:00:00 2001 From: Daniel Saier Date: Sun, 6 Mar 2022 20:10:24 +0100 Subject: [PATCH] Implement `upload_resetmethod` option for stlink upload --- builder/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builder/main.py b/builder/main.py index 8df00252..c99b66c4 100644 --- a/builder/main.py +++ b/builder/main.py @@ -320,6 +320,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", "")