Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(tinyusb) : Updated build scripts for upstream v0.17 #39

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
idf_build_get_property(target IDF_TARGET)

if(target STREQUAL "esp32s3")
if(${target} STREQUAL "esp32s3")
set(tusb_mcu "OPT_MCU_ESP32S3")
set(tusb_family "esp32sx")
elseif(target STREQUAL "esp32s2")
elseif(${target} STREQUAL "esp32s2")
set(tusb_mcu "OPT_MCU_ESP32S2")
set(tusb_family "esp32sx")
elseif(target STREQUAL "esp32p4")
elseif(${target} STREQUAL "esp32p4")
set(tusb_mcu "OPT_MCU_ESP32P4")
set(tusb_family "esp32px")
endif()
Expand Down Expand Up @@ -47,16 +47,27 @@ set(srcs
"src/class/dfu/dfu_rt_device.c"
# Common, device-mode related
"src/portable/synopsys/dwc2/dcd_dwc2.c"
"src/portable/synopsys/dwc2/dwc2_common.c"
"src/common/tusb_fifo.c"
"src/device/usbd_control.c"
"src/device/usbd.c"
"src/tusb.c"
)

set(requirements_private
esp_netif # required by rndis_reports.c: #include "netif/ethernet.h"
)

if(${target} STREQUAL "esp32p4")
list(APPEND requirements_private
esp_mm # required by dcd_dwc2.c: #include "esp_cache.h"
)
endif()

idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${includes_public}
PRIV_INCLUDE_DIRS ${includes_private}
PRIV_REQUIRES esp_netif # required by rndis_reports.c: #include "netif/ethernet.h"
PRIV_REQUIRES ${requirements_private}
)

target_compile_options(${COMPONENT_LIB} PUBLIC ${compile_options})
Expand Down