Skip to content

Commit 501b140

Browse files
committed
Force SerialUSB not to be stripped even if unused
1 parent 26ba1b0 commit 501b140

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cores/arduino/USB/USBCore.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ void USBDeviceClass::init()
306306
usbd.enable();
307307

308308
initialized = true;
309+
310+
#ifdef CDC_ENABLED
311+
SerialUSB.begin(0);
312+
#endif
309313
}
310314

311315
bool USBDeviceClass::attach()

0 commit comments

Comments
 (0)