Skip to content

Commit c81f478

Browse files
committed
loader: log: early enable usb only if debug is active
c33: fix sketch upload without debug others: remove usbd device already enabled warning
1 parent 59e6863 commit c81f478

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

loader/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ static int loader(const struct shell *sh) {
220220
}
221221
#elif CONFIG_LOG
222222
#if !CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT
223-
usb_enable(NULL);
223+
if (debug) {
224+
usb_enable(NULL);
225+
}
224226
#endif
225227
for (int i = 0; i < log_backend_count_get(); i++) {
226228
const struct log_backend *backend;

0 commit comments

Comments
 (0)