diff options
| author | hathach <[email protected]> | 2020-04-07 16:35:02 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-04-07 16:35:02 +0700 |
| commit | 62c14a686654db7ee34ac88c1dcf33d67736da4c (patch) | |
| tree | 0d8b6bd7109b2b2d48aeb781b1ef5f50c92749d0 /examples | |
| parent | aff52919d6aaa8e46e7b2a73fd48dce707aa759e (diff) | |
esp32s2 work with hid_composite_freertos
Diffstat (limited to 'examples')
4 files changed, 50 insertions, 2 deletions
diff --git a/examples/device/cdc_msc_freertos/src/CMakeLists.txt b/examples/device/cdc_msc_freertos/src/CMakeLists.txt index d24bc2e41..ab4c1aa6d 100644 --- a/examples/device/cdc_msc_freertos/src/CMakeLists.txt +++ b/examples/device/cdc_msc_freertos/src/CMakeLists.txt @@ -1,7 +1,7 @@ idf_component_register(SRCS "main.c" "usb_descriptors.c" "msc_disk.c" INCLUDE_DIRS "." REQUIRES freertos soc) - + target_compile_options(${COMPONENT_TARGET} PUBLIC "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2" ) @@ -29,4 +29,3 @@ target_sources(${COMPONENT_TARGET} PUBLIC "${TOP}/src/class/vendor/vendor_device.c" "${TOP}/src/portable/espressif/esp32s2/dcd_esp32s2.c" ) - diff --git a/examples/device/hid_composite_freertos/CMakeLists.txt b/examples/device/hid_composite_freertos/CMakeLists.txt new file mode 100644 index 000000000..ebc087b22 --- /dev/null +++ b/examples/device/hid_composite_freertos/CMakeLists.txt @@ -0,0 +1,14 @@ +# The following five lines of boilerplate have to be in your project's +# CMakeLists in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.5) + +# example src directory +set(EXTRA_COMPONENT_DIRS "src") + +# TOP is absolute path to root directory of TinyUSB git repo +set(TOP "../../..") +get_filename_component(TOP "${TOP}" REALPATH) + +include($ENV{IDF_PATH}/tools/cmake/project.cmake) + +project(hid_composite_freertos) diff --git a/examples/device/hid_composite_freertos/sdkconfig.defaults b/examples/device/hid_composite_freertos/sdkconfig.defaults new file mode 100644 index 000000000..34991d70c --- /dev/null +++ b/examples/device/hid_composite_freertos/sdkconfig.defaults @@ -0,0 +1,4 @@ +CONFIG_IDF_CMAKE=y +CONFIG_IDF_TARGET="esp32s2" +CONFIG_IDF_TARGET_ESP32S2=y + diff --git a/examples/device/hid_composite_freertos/src/CMakeLists.txt b/examples/device/hid_composite_freertos/src/CMakeLists.txt new file mode 100644 index 000000000..fbe5f6389 --- /dev/null +++ b/examples/device/hid_composite_freertos/src/CMakeLists.txt @@ -0,0 +1,31 @@ +idf_component_register(SRCS "main.c" "usb_descriptors.c" + INCLUDE_DIRS "." + REQUIRES freertos soc) + +target_compile_options(${COMPONENT_TARGET} PUBLIC + "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2" +) + +idf_component_get_property( FREERTOS_ORIG_INCLUDE_PATH freertos ORIG_INCLUDE_PATH) +target_include_directories(${COMPONENT_TARGET} PUBLIC + "${FREERTOS_ORIG_INCLUDE_PATH}" + "${TOP}/hw" + "${TOP}/src" +) + +target_sources(${COMPONENT_TARGET} PUBLIC + "${TOP}/hw/bsp/esp32s2_saola/esp32s2_saola.c" + "${TOP}/src/tusb.c" + "${TOP}/src/common/tusb_fifo.c" + "${TOP}/src/device/usbd.c" + "${TOP}/src/device/usbd_control.c" + "${TOP}/src/class/cdc/cdc_device.c" + "${TOP}/src/class/dfu/dfu_rt_device.c" + "${TOP}/src/class/hid/hid_device.c" + "${TOP}/src/class/midi/midi_device.c" + "${TOP}/src/class/msc/msc_device.c" + "${TOP}/src/class/net/net_device.c" + "${TOP}/src/class/usbtmc/usbtmc_device.c" + "${TOP}/src/class/vendor/vendor_device.c" + "${TOP}/src/portable/espressif/esp32s2/dcd_esp32s2.c" +) |
