flash: add openocd-verify
Этот коммит содержится в:
родитель
f613cb41a3
коммит
09a3c6a16b
3 изменённых файлов: 8 добавлений и 2 удалений
|
@ -59,6 +59,7 @@ type TargetSpec struct {
|
|||
OpenOCDTarget string `json:"openocd-target"`
|
||||
OpenOCDTransport string `json:"openocd-transport"`
|
||||
OpenOCDCommands []string `json:"openocd-commands"`
|
||||
OpenOCDVerify *bool `json:"openocd-verify"` // enable verify when flashing with openocd
|
||||
JLinkDevice string `json:"jlink-device"`
|
||||
CodeModel string `json:"code-model"`
|
||||
RelocationModel string `json:"relocation-model"`
|
||||
|
|
6
main.go
6
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
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
"flash-1200-bps-reset": "true",
|
||||
"flash-method": "msd",
|
||||
"msd-volume-name": "Arduino",
|
||||
"msd-firmware-name": "firmware.uf2"
|
||||
"msd-firmware-name": "firmware.uf2",
|
||||
"openocd-verify": true
|
||||
}
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче