From 657c9a6325e448f1b3ce81d8cc77d7ee96163f2c Mon Sep 17 00:00:00 2001 From: "Kwabena W. Agyeman" Date: Sun, 24 Aug 2025 21:34:02 -0700 Subject: [PATCH] common/usbdbg: Flush data from unsupported commands. The removal of unused USB commands that are still sent by the IDE causes tinyusb boards to crash on connect currently. Flushing the excess received bytes for unknown commands solves this issue. --- common/usbdbg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/usbdbg.c b/common/usbdbg.c index 276691139..600220321 100644 --- a/common/usbdbg.c +++ b/common/usbdbg.c @@ -375,6 +375,9 @@ void usbdbg_data_out(uint32_t size, usbdbg_read_callback_t read_callback) { } default: /* error */ + size = OMV_MIN(size, 512); + uint8_t byte_buffer[size]; + read_callback(&byte_buffer, size); break; } }