Skip to content
Discussion options

You must be logged in to vote

It's pretty straightforward, you can simply add the source files of the class you needed (eg. CDC & HID) and includes to your project:

# C/C++ source files 
set(SRC_C_CXX
    ../../../tinyusb/src/class/cdc/cdc_device.c
    ../../../tinyusb/src/class/hid/hid_device.c
    ../../../tinyusb/src/tusb.c
    ../../../tinyusb/src/common/tusb_fifo.c
    ../../../tinyusb/src/device/usbd.c
    ../../../tinyusb/src/device/usbd_control.c
    main.c
    usb_descriptors.c
    system_stm32g0xx.c
)

# Includes
set(INCLUDES
    CMSIS/Include
    CMSIS/Device/Include
    ../../../tinyusb/src
    .
)

Or use tinyusb_sources_get function too add all source files:

include(../../../tinyusb/src/CMakeLists.txt)

t…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Matthias32
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@HiFiPhile
Comment options

@Matthias32
Comment options

@HiFiPhile
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants