Subsequent uploads fail after uploading to Leonardo w/ Serial Monitor/Plotter open #615
Labels
conclusion: resolved
Issue was resolved
topic: code
Related to content of the project itself
topic: serial monitor
Related to the Serial Monitor
type: imperfection
Perceived defect in any part of project
Describe the bug
When I upload to an ATmega32U4-based board (e.g., Leonardo, Micro, Pro Micro) while Serial Monitor or Serial Plotter are open, the upload is successful, but after that all uploads to that board fail until I restart the Arduino IDE.
This did not occur prior to the introduction of Serial Plotter (#597).
To Reproduce
The upload should complete successfully, as is expected because the Serial Monitor and Serial Plotter are designed to close the port while an upload is in progress.
The upload fails:
The same failure will now occur every time you attempt uploading to this board, even if you use Arduino CLI or the classic Arduino IDE.
The failure occurs with or without Serial Monitor or Serial Plotter open.
If I close all Arduino IDE windows and start the IDE again, I am then able to upload again, so the board is fine.
Expected behavior
Uploading with Serial Monitor/Plotter open doesn't break uploads.
Desktop
Date: 2021-11-16T16:50:40.920Z
CLI Version: 0.19.1 alpha [718bbbf2]
Additional context
It must be a regression because I don't have this problem when uploading to these boards with Serial Monitor open with recent versions of the Arduino IDE, up to the latest nightly build (2021115)
The output from the failed upload show that the bootloader port enumeration is not correctly navigated:
Normally, the native USB upload process is:
But instead you can see that the fallback behavior is occurring:
A successful upload looks like this:
(Note that the bootloader port enumerated to COM13)
I can see from the "L" LED on the board that the bootloader was activated as expected during the failed uploads, but the discovery of the bootloader port is somehow broken.
I see this error in the terminal on the first successful upload to the Leonardo with Serial Plotter open:
The text was updated successfully, but these errors were encountered: