summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-03-30 00:31:26 +0700
committerhathach <[email protected]>2023-03-30 00:31:26 +0700
commit96718b7ca08d1d74cf1ecfb3816b57df50bf1616 (patch)
tree8c2372cb5976211acbbb408158a5504233ee8f3a /examples/device
parent99315bcca35e1ffb9d14705a0cd533f962bc79eb (diff)
merge s2 and s3, update cmake for espressif, add tinyusb_src as component
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/cdc_msc_freertos/CMakeLists.txt3
-rw-r--r--examples/device/cdc_msc_freertos/src/CMakeLists.txt26
2 files changed, 2 insertions, 27 deletions
diff --git a/examples/device/cdc_msc_freertos/CMakeLists.txt b/examples/device/cdc_msc_freertos/CMakeLists.txt
index cbd75efd6..82bf79f19 100644
--- a/examples/device/cdc_msc_freertos/CMakeLists.txt
+++ b/examples/device/cdc_msc_freertos/CMakeLists.txt
@@ -16,7 +16,6 @@ project(${PROJECT})
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})
# Check for -DFAMILY=
-if(FAMILY MATCHES "^esp32s[2-3]")
-else()
+if(NOT FAMILY STREQUAL "espressif")
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
endif()
diff --git a/examples/device/cdc_msc_freertos/src/CMakeLists.txt b/examples/device/cdc_msc_freertos/src/CMakeLists.txt
index 9216e2b49..e433e5074 100644
--- a/examples/device/cdc_msc_freertos/src/CMakeLists.txt
+++ b/examples/device/cdc_msc_freertos/src/CMakeLists.txt
@@ -1,35 +1,11 @@
idf_component_register(SRCS "main.c" "usb_descriptors.c" "msc_disk.c"
INCLUDE_DIRS "."
- REQUIRES freertos soc)
-
-file(TO_NATIVE_PATH "${TOP}/hw/bsp/${FAMILY}/boards/${BOARD}/board.cmake" board_cmake)
-
-if(EXISTS ${board_cmake})
- include(${board_cmake})
-endif()
+ REQUIRES freertos soc tinyusb_src)
target_include_directories(${COMPONENT_TARGET} PUBLIC
"${TOP}/hw"
- "${TOP}/src"
)
target_compile_definitions(${COMPONENT_TARGET} PUBLIC
ESP_PLATFORM
)
-
-target_sources(${COMPONENT_TARGET} PUBLIC
- "${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/ecm_rndis_device.c"
- "${TOP}/src/class/net/ncm_device.c"
- "${TOP}/src/class/usbtmc/usbtmc_device.c"
- "${TOP}/src/class/vendor/vendor_device.c"
- "${TOP}/src/portable/synopsys/dwc2/dcd_dwc2.c"
-)