mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
main: fix error message when a serial port can't be accessed
Old message:
error: failed to reset port /tmp/tinygo1441085170/main.uf2: opening port: Permission denied
new message:
error: failed to reset port /dev/ttyACM0: opening port: Permission denied
This commit is contained in:
committed by
Ron Evans
parent
2b04006b1e
commit
c32490935b
@@ -401,7 +401,7 @@ func Flash(pkgName, port string, options *compileopts.Options) error {
|
||||
if err == nil {
|
||||
err = touchSerialPortAt1200bps(port)
|
||||
if err != nil {
|
||||
return &commandError{"failed to reset port", result.Binary, err}
|
||||
return &commandError{"failed to reset port", port, err}
|
||||
}
|
||||
// give the target MCU a chance to restart into bootloader
|
||||
time.Sleep(3 * time.Second)
|
||||
|
||||
Reference in New Issue
Block a user