main: change to ignore PortReset failures

Этот коммит содержится в:
sago35 2022-07-14 22:41:03 +09:00 коммит произвёл Ron Evans
родитель 3047d8f321
коммит 13311da7e9

Просмотреть файл

@ -350,10 +350,7 @@ func Flash(pkgName, port string, options *compileopts.Options) error {
// do we need port reset to put MCU into bootloader mode? // do we need port reset to put MCU into bootloader mode?
if config.Target.PortReset == "true" && flashMethod != "openocd" { if config.Target.PortReset == "true" && flashMethod != "openocd" {
port, err := getDefaultPort(port, config.Target.SerialPort) port, err := getDefaultPort(port, config.Target.SerialPort)
if err != nil { if err == nil {
return err
}
err = touchSerialPortAt1200bps(port) err = touchSerialPortAt1200bps(port)
if err != nil { if err != nil {
return &commandError{"failed to reset port", result.Binary, err} return &commandError{"failed to reset port", result.Binary, err}
@ -361,6 +358,7 @@ func Flash(pkgName, port string, options *compileopts.Options) error {
// give the target MCU a chance to restart into bootloader // give the target MCU a chance to restart into bootloader
time.Sleep(3 * time.Second) time.Sleep(3 * time.Second)
} }
}
// this flashing method copies the binary data to a Mass Storage Device (msd) // this flashing method copies the binary data to a Mass Storage Device (msd)
switch flashMethod { switch flashMethod {