pico-sdk/test/pico_stdio_test/CMakeLists.txt
Graham Sanderson cc169ddd68
stdio hardening + new mutex API (#1224)
* * Harden stdio_usb and stdio in general against deadlocks which could otherwise result from doing printfs from within IRQs
* Add a test for the above
* Add mutex_try_enter_block_until API.
* Make best_effort_wfe_or_timeout not use alarms if called from within IRQ
2023-02-06 16:27:39 -06:00

16 lines
781 B
CMake

if (NOT PICO_TIME_NO_ALARM_SUPPORT)
add_executable(pico_stdio_test_uart pico_stdio_test.c)
target_link_libraries(pico_stdio_test_uart PRIVATE pico_stdlib pico_test pico_multicore)
pico_add_extra_outputs(pico_stdio_test_uart)
pico_enable_stdio_uart(pico_stdio_test_uart 1)
pico_enable_stdio_usb(pico_stdio_test_uart 0)
add_executable(pico_stdio_test_usb pico_stdio_test.c)
target_link_libraries(pico_stdio_test_usb PRIVATE pico_stdlib pico_test pico_multicore)
target_compile_definitions(pico_stdio_test_usb PRIVATE
PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS=-1) # wait for USB connect
pico_add_extra_outputs(pico_stdio_test_usb)
pico_enable_stdio_uart(pico_stdio_test_usb 0)
pico_enable_stdio_usb(pico_stdio_test_usb 1)
endif()