aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorsago35 <[email protected]>2022-03-24 18:37:29 +0900
committerRon Evans <[email protected]>2022-04-09 17:49:54 +0200
commit09a3c6a16b37a23f0f753b606bd32eabb842f012 (patch)
tree421c1925ab925763185c831290f087215cd03bf0 /main.go
parentf613cb41a3d3a7b049ac0a1f7d2e500b694ba0a7 (diff)
downloadtinygo-09a3c6a16b37a23f0f753b606bd32eabb842f012.tar.gz
tinygo-09a3c6a16b37a23f0f753b606bd32eabb842f012.zip
flash: add openocd-verify
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index cd00b62f4..c1a39ee60 100644
--- a/main.go
+++ b/main.go
@@ -453,7 +453,11 @@ func Flash(pkgName, port string, options *compileopts.Options) error {
if err != nil {
return err
}
- args = append(args, "-c", "program "+filepath.ToSlash(result.Binary)+" reset exit")
+ exit := " reset exit"
+ if config.Target.OpenOCDVerify != nil && *config.Target.OpenOCDVerify {
+ exit = " verify" + exit
+ }
+ args = append(args, "-c", "program "+filepath.ToSlash(result.Binary)+exit)
cmd := executeCommand(config.Options, "openocd", args...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr