mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-22 21:39:01 +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 {
|
if err == nil {
|
||||||
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", port, err}
|
||||||
}
|
}
|
||||||
// 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)
|
||||||
|
|||||||
Reference in New Issue
Block a user