Geen omschrijving
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 1009B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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/console.c
  12. src/log.c
  13. src/util.c
  14. src/pmw3360.c
  15. src/usb.c
  16. src/usb_cdc.c
  17. src/usb_descriptors.c
  18. src/usb_hid.c
  19. )
  20. # Make sure TinyUSB can find tusb_config.h
  21. target_include_directories(trackball PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
  22. target_compile_options(trackball PUBLIC
  23. -Wall
  24. -Werror
  25. )
  26. # pull in common dependencies
  27. target_link_libraries(trackball
  28. pico_stdlib
  29. pico_unique_id
  30. tinyusb_device
  31. tinyusb_board
  32. hardware_spi
  33. )
  34. # fix for Errata RP2040-E5 (the fix requires use of GPIO 15)
  35. target_compile_definitions(trackball PUBLIC PICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1)
  36. # create map/bin/hex/uf2 file etc.
  37. pico_add_extra_outputs(trackball)