platformio / platform-atmelavr

Atmel AVR: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelavr
Apache License 2.0
139 stars 105 forks source link

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

Open MCUdude opened 3 years ago

MCUdude commented 3 years ago

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.

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?