Skip to content

Commit b3a4b87

Browse files
Set PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS (#496)
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
1 parent cbb5d61 commit b3a4b87

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ endif()
1515

1616
set(PICO_EXAMPLES_PATH ${PROJECT_SOURCE_DIR})
1717

18+
# 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
19+
if (NOT DEFINED PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS)
20+
set(PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS 3000)
21+
endif()
22+
1823
# Initialize the SDK
1924
pico_sdk_init()
2025

0 commit comments

Comments
 (0)