flash: add openocd-verify

This commit is contained in:
sago35
2022-03-24 18:37:29 +09:00
committed by Ron Evans
parent f613cb41a3
commit 09a3c6a16b
3 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -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