Skip to content

Commit

Permalink
Set PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS (#496)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
peterharperuk authored Jul 12, 2024
1 parent cbb5d61 commit b3a4b87
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit b3a4b87

Please sign in to comment.