From 3c6ad05434b835d222878086c6d55ff404aa6b42 Mon Sep 17 00:00:00 2001 From: Peter Harper Date: Wed, 1 May 2024 18:20:52 +0100 Subject: [PATCH] Set PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS If you use stdio_usb for the examples you miss some of the output while USB is connected. Set PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS to a sensible default so you see all the output --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index af5cca987..580377dcb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,11 @@ endif() set(PICO_EXAMPLES_PATH ${PROJECT_SOURCE_DIR}) +# If you want debug output from USB (pass -DPICO_STDIO_USB=1) this ensures you don't lose any debug output while USB is set up +if (NOT DEFINED PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS) + set(PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS 3000) +endif() + # Initialize the SDK pico_sdk_init()