Uploads to native USB boards fail when Serial Monitor or Plotter is open #1032
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 problem
Because the USB communication with the user's computer is handled directly by the primary microcontroller (rather than a separate chip as on the Uno, Mega, etc.), a special process is used when uploading to the native USB boards:
This port (which might be different from the one the board had previously) will be used for the upload.
🐛 If Serial Monitor or Serial Plotter is open during the upload, the "1200 bps touch" does not go through, the board stays in application mode, the IDE never sees the new port appear, the IDE attempts to upload to the board which does not have the bootloader running, the upload fails.
To reproduce
Equipment
Any native USB type Arduino board. Including:
Steps
🐛 The upload fails.
If you have Show verbose output during > ☐ upload enabled in the IDE preferences, you will see something like this in the Output panel:
Expected behavior
Serial Monitor does not interfere with uploads.
Arduino IDE version
2.0.0-rc7
Operating system
Windows
Operating system version
10
Additional context
I have not been able to reproduce this on my Linux machine, so it may be Windows-specific.
I bisected the issue to df8658e (does not occur when using the build for 4c55807).
The issue also affects the Nano Every. Even though this is not a native USB board, it still uses the "1200 bps touch" feature.
Uploading works fine once I close the Serial Monitor view.
Uploading does succeed with Serial Monitor open if I manually put the board into bootloader mode before the upload (e.g., press the reset button twice on most boards).
Arduino IDE 1.x handles uploading under these conditions as expected.
Issue checklist
The text was updated successfully, but these errors were encountered: