merge s2 and s3, update cmake for espressif, add tinyusb_src as component
This commit is contained in:
@@ -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()
|
||||
|
@@ -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"
|
||||
)
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
# ---------------- GNU Make Start -----------------------
|
||||
# ESP32-Sx and RP2040 has its own CMake build system
|
||||
ifeq (,$(findstring $(FAMILY),esp32s2 esp32s3 rp2040))
|
||||
ifeq (,$(findstring $(FAMILY),espressif rp2040))
|
||||
|
||||
# ---------------------------------------
|
||||
# Compiler Flags
|
||||
|
Reference in New Issue
Block a user