flash: call PortReset only on other than openocd

This commit is contained in:
sago35
2020-08-31 08:29:07 +09:00
committed by Ron Evans
parent 753162f4e0
commit 946184b8ba
+1 -1
View File
@@ -191,7 +191,7 @@ func Flash(pkgName, port string, options *compileopts.Options) error {
return builder.Build(pkgName, fileExt, config, func(tmppath string) error {
// do we need port reset to put MCU into bootloader mode?
if config.Target.PortReset == "true" {
if config.Target.PortReset == "true" && flashMethod != "openocd" {
if port == "" {
var err error
port, err = getDefaultPort()