Skip to content

Commit

Permalink
Merge pull request #39 from espressif/change/build_scripts
Browse files Browse the repository at this point in the history
feature(tinyusb) : Updated build scripts for upstream v0.17
  • Loading branch information
roma-jam authored Nov 22, 2024
2 parents 3004b15 + da47608 commit 0cb218d
Showing 1 changed file with 15 additions and 4 deletions.
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

0 comments on commit 0cb218d

Please sign in to comment.