You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
598 B

cmake_minimum_required(VERSION 4.0)
# initialize the SDK based on PICO_SDK_PATH
# note: this must happen before project()
include(pico_sdk_import.cmake)
project(my_project)
# initialize the Raspberry Pi Pico SDK
pico_sdk_init()
# rest of your project
add_executable(main
main.c
)
target_compile_definitions(main PRIVATE PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS=5000)
# Add pico_stdlib library which aggregates commonly used features
target_link_libraries(main PRIVATE pico_stdlib hardware_resets hardware_irq)
# create map/bin/hex/uf2 file in addition to ELF.
pico_add_extra_outputs(main)