platform-atmelavr icon indicating copy to clipboard operation
platform-atmelavr copied to clipboard

Not able to do serial uploads when the serial port is actively used

Open MCUdude opened this issue 5 years ago • 0 comments

This issue is probably not just related to platform-atmelavr, but I can reproduce the issue here.

The problem is that if my code is constantly printing to the PIO serial monitor and I want to re-upload, I can't because PlatformIO thinks the port is busy.

  • I'm not able to upload if I print something to the serial monitor every 60th millisecond
  • I am able to upload if I print something to the serial monitor every 250th ms.

This is not how Arduino IDE behaves. It can interrupt a terminal no matter how often something is written to the serial monitor.

This is the error I'm getting:

avrdude: ser_open(): can't open device "\\.\COM3": Ingen tilgang.


avrdude done.  Thank you.

*** [upload] Error 1

Is there a fix for this, besides manually closing the session before uploading again? Why can't it close the connection when data is incoming?

MCUdude avatar Dec 01 '20 14:12 MCUdude