No Description
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.

CMakeLists.txt 911B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. cmake_minimum_required(VERSION 3.13)
  2. # initialize pico-sdk from submodule
  3. # note: this must happen before project()
  4. include(pico-sdk/pico_sdk_init.cmake)
  5. project(trackball)
  6. # initialize the Raspberry Pi Pico SDK
  7. pico_sdk_init()
  8. add_executable(trackball)
  9. target_sources(trackball PUBLIC
  10. src/main.c
  11. src/log.c
  12. src/pmw3360.c
  13. src/usb.c
  14. src/usb_cdc.c
  15. src/usb_descriptors.c
  16. src/usb_hid.c
  17. )
  18. # Make sure TinyUSB can find tusb_config.h
  19. target_include_directories(trackball PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
  20. # pull in common dependencies
  21. target_link_libraries(trackball
  22. pico_stdlib
  23. pico_unique_id
  24. tinyusb_device
  25. tinyusb_board
  26. hardware_spi
  27. )
  28. # fix for Errata RP2040-E5 (the fix requires use of GPIO 15)
  29. target_compile_definitions(trackball PUBLIC PICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1)
  30. # create map/bin/hex/uf2 file etc.
  31. pico_add_extra_outputs(trackball)