cmake_minimum_required(VERSION 3.13) # Include the SDK import helper we copied include(pico_sdk_import.cmake) project(pico_rubber_ducky C CXX ASM) set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) # Initialize the Pico hardware SDK routines pico_sdk_init() # Tell the compiler which C files hold our code add_executable(pico_rubber_ducky main.c usb_descriptors.c ) # Link standard libraries, hardware drivers, AND TinyUSB components target_link_libraries(pico_rubber_ducky pico_stdlib hardware_uart pico_multicore tinyusb_device tinyusb_board ) # CRUCIAL: Tell the compiler to look in the current directory for tusb_config.h target_include_directories(pico_rubber_ducky PRIVATE ${CMAKE_CURRENT_LIST_DIR}) # Enable standard printf() to route over the USB-C cable pico_enable_stdio_usb(pico_rubber_ducky 1) pico_enable_stdio_uart(pico_rubber_ducky 0) # Instruct CMake to generate a drag-and-drop .uf2 file pico_add_extra_outputs(pico_rubber_ducky)