Skip to content

Commit 51dbf09

Browse files
Remove obsolete USB component workaround for esp_tinyusb
The workaround was trying to access the 'usb' component during CMake configuration, but in newer ESP-IDF versions this component doesn't exist as a built-in and must come from component manager. Now that we're pulling usb from component manager via idf_component.yml, the esp_tinyusb component should handle its USB dependencies correctly without manual linking intervention.
1 parent f5cdb36 commit 51dbf09

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

esp/main/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,3 @@ idf_component_register(SRCS "usb_dfu.c" "ble_hid.c" "transport_hid.c" "transport
99
"mouthpad-proto/nanopb"
1010
"mouthpad-proto/src/C"
1111
REQUIRES bt esp_hid nvs_flash esp_driver_uart usb)
12-
13-
# Workaround for esp_tinyusb v2.0.1 bug: CMakeLists.txt has backwards logic for IDF 6.0
14-
# It only adds "usb" component for IDF < 6, but IDF 6.0+ is what requires it
15-
# Force esp_tinyusb to link against usb component
16-
idf_component_get_property(esp_tinyusb_lib espressif__esp_tinyusb COMPONENT_LIB)
17-
idf_component_get_property(usb_lib usb COMPONENT_LIB)
18-
target_link_libraries(${esp_tinyusb_lib} PRIVATE ${usb_lib})

0 commit comments

Comments
 (0)