-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Labels
Architecture: AVRApplies only to the AVR microcontrollers (Uno, etc.)Applies only to the AVR microcontrollers (Uno, etc.)Type: BugUSB: CDC serialSerial interface used by MCUs with native USB (e.g. Leonardo) to communicate with the computerSerial interface used by MCUs with native USB (e.g. Leonardo) to communicate with the computer
Description
In a forum in the Netherlands, someone encountered a possible bug: http://arduinoforum.nl/viewtopic.php?f=13&t=2533.
I can replicate the problem in Windows 10 and Ubuntu linux 17.04 with Arduino IDE 1.8.1 and 1.8.2 and with the Leonardo bootloader that came with version 1.6.8 and 1.8.2.
Below is a test sketch. After uploading, the serial port disappears and uploading once more is not possible. The delay() is needed and the parameter for the constructor is needed.
There is a workaround to be able to upload a sketch. I turn on the verbose output for upload in the preferences and when the Arduino IDE tries to upload then I press the reset button on the Arduino board.
class myLibT
{
public:
myLibT( char a);
};
myLibT::myLibT( char a)
{
delay(10); // This delay together with the parameter kills the usb-serial.
}
myLibT serialwrecker( 0); // the parameter is needed
void setup()
{
}
void loop()
{
}
Metadata
Metadata
Assignees
Labels
Architecture: AVRApplies only to the AVR microcontrollers (Uno, etc.)Applies only to the AVR microcontrollers (Uno, etc.)Type: BugUSB: CDC serialSerial interface used by MCUs with native USB (e.g. Leonardo) to communicate with the computerSerial interface used by MCUs with native USB (e.g. Leonardo) to communicate with the computer