esp32: Remove dependency on esp_tinyusb.

Instead, depend directly on espressif/tinyusb component
(which is otherwise transitively included via esp_tinyusb).

Turns out esp_tinyusb builds a bunch of source files with
symbols that conflict with our tinyusb symbols (i.e.
descriptors_control.c).

This only works because nothing in MicroPython causes the linker to include
the esp_tinyusb.a library, however in order to override the dcd_int_handler
(in following commit) this caused the linker to pull this library in and
break the build.

There's also a problematic header skew - TinyUSB component was building
with the tusb_config.h file from esp_tinyusb component, but we have our own
tusb_config.h file in shared/tinyusb. The changes in parent commit allow
us to build the TinyUSB component with our tusb_config.h header.

User-facing impacts are:

- Can no longer override USB VID & PID via sdkconfig, have to set
  MICROPY_HW_USB_VID/PID instead (changes applied in this commit).

- esp32 boards will have the same USB serial number as other ports
  (i.e. based on the hardware MAC address, not hard-coded).

Side effects include:

- CFG_TUD_DWC2_SLAVE_ENABLE is now set, DMA mode is disabled.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
Angus Gratton
2025-11-12 15:48:59 +11:00
committed by Damien George
parent a435e4ecfd
commit 4f193132d2
46 changed files with 70 additions and 159 deletions

View File

@@ -6,7 +6,6 @@ set(IDF_TARGET esp32s3)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.ble
boards/sdkconfig.240mhz
boards/sdkconfig.spiram_sx

View File

@@ -22,6 +22,11 @@
#define MICROPY_HW_USB_CDC_1200BPS_TOUCH (1)
#define MICROPY_SCHEDULER_STATIC_NODES (1)
#define MICROPY_HW_USB_VID 0x2341
#define MICROPY_HW_USB_PID 0x056B
#define MICROPY_HW_USB_MANUFACTURER_STRING "Arduino"
#define MICROPY_HW_USB_PRODUCT_FS_STRING "Nano ESP32"
#define MICROPY_BOARD_STARTUP NANO_ESP32_board_startup
void NANO_ESP32_board_startup(void);

View File

@@ -11,13 +11,6 @@ CONFIG_SPIRAM_IGNORE_NOTFOUND=
CONFIG_LWIP_LOCAL_HOSTNAME="nano-esp32"
CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID=n
CONFIG_TINYUSB_DESC_USE_DEFAULT_PID=n
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x2341
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x056B
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Arduino"
CONFIG_TINYUSB_DESC_PRODUCT_STRING="Nano ESP32"
# compatibility with Espressif Arduino core
CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP=y
CONFIG_ESP_ENABLE_COREDUMP_TO_FLASH=y

View File

@@ -2,6 +2,5 @@ set(IDF_TARGET esp32s2)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.spiram_sx
)

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s3)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.ble
boards/sdkconfig.spiram_sx
boards/ESP32_GENERIC_S3/sdkconfig.board

View File

@@ -3,7 +3,6 @@ set(IDF_TARGET esp32s2)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.spiram_sx
boards/sdkconfig.usb
)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)

View File

@@ -3,7 +3,6 @@ set(IDF_TARGET esp32s2)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.spiram_sx
boards/sdkconfig.usb
)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s3)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.ble
boards/ESP32_GENERIC_S3/sdkconfig.board
)

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s2)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.spiram_sx
boards/sdkconfig.usb
boards/UM_FEATHERS2/sdkconfig.board
)

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s2)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.spiram_sx
boards/sdkconfig.usb
boards/UM_FEATHERS2NEO/sdkconfig.board
)

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s3)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.ble
boards/sdkconfig.240mhz
boards/sdkconfig.spiram_sx

View File

@@ -11,3 +11,8 @@
#define MICROPY_HW_SPI1_MOSI (35)
#define MICROPY_HW_SPI1_MISO (37)
#define MICROPY_HW_SPI1_SCK (36)
#define MICROPY_HW_USB_VID 0x303A
#define MICROPY_HW_USB_PID 0x80D7
#define MICROPY_HW_USB_MANUFACTURER_STRING "Unexpected Maker"
#define MICROPY_HW_USB_PRODUCT_FS_STRING "FeatherS3"

View File

@@ -4,12 +4,3 @@ CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_SPIRAM_MEMTEST=
CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS3"
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x303A
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x80D7
CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100
CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID=n
CONFIG_TINYUSB_DESC_USE_DEFAULT_PID=n
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Unexpected Maker"
CONFIG_TINYUSB_DESC_PRODUCT_STRING="FeatherS3"
CONFIG_TINYUSB_DESC_SERIAL_STRING="_fs3_"

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s3)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.ble
boards/sdkconfig.240mhz
boards/sdkconfig.spiram_sx

View File

@@ -8,3 +8,8 @@
#define MICROPY_HW_SPI1_MOSI (35)
#define MICROPY_HW_SPI1_MISO (37)
#define MICROPY_HW_SPI1_SCK (36)
#define MICROPY_HW_USB_VID 0x303A
#define MICROPY_HW_USB_PID 0x81FC
#define MICROPY_HW_USB_MANUFACTURER_STRING "Unexpected Maker"
#define MICROPY_HW_USB_PRODUCT_FS_STRING "FeatherS3 Neo"

View File

@@ -5,12 +5,3 @@ CONFIG_ESPTOOLPY_AFTER_NORESET=y
CONFIG_SPIRAM_MEMTEST=
CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS3Neo"
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x303A
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x81FC
CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100
CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID=n
CONFIG_TINYUSB_DESC_USE_DEFAULT_PID=n
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Unexpected Maker"
CONFIG_TINYUSB_DESC_PRODUCT_STRING="FeatherS3 Neo"
CONFIG_TINYUSB_DESC_SERIAL_STRING="_fs3neo_"

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s3)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.ble
boards/sdkconfig.240mhz
boards/sdkconfig.spiram_sx

View File

@@ -8,3 +8,8 @@
#define MICROPY_HW_SPI1_MOSI (35)
#define MICROPY_HW_SPI1_MISO (37)
#define MICROPY_HW_SPI1_SCK (36)
#define MICROPY_HW_USB_VID 0x303A
#define MICROPY_HW_USB_PID 0x817A
#define MICROPY_HW_USB_MANUFACTURER_STRING "Unexpected Maker"
#define MICROPY_HW_USB_PRODUCT_FS_STRING "NanoS3"

View File

@@ -4,12 +4,3 @@ CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_SPIRAM_MEMTEST=
CONFIG_LWIP_LOCAL_HOSTNAME="UMNanoS3"
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x303A
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x817A
CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100
CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID=n
CONFIG_TINYUSB_DESC_USE_DEFAULT_PID=n
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Unexpected Maker"
CONFIG_TINYUSB_DESC_PRODUCT_STRING="NanoS3"
CONFIG_TINYUSB_DESC_SERIAL_STRING="_ns3_"

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s3)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.ble
boards/sdkconfig.240mhz
boards/sdkconfig.spiram_sx

View File

@@ -8,3 +8,8 @@
#define MICROPY_HW_SPI1_MOSI (6)
#define MICROPY_HW_SPI1_MISO (5)
#define MICROPY_HW_SPI1_SCK (4)
#define MICROPY_HW_USB_VID 0x303A
#define MICROPY_HW_USB_PID 0x8225
#define MICROPY_HW_USB_MANUFACTURER_STRING "Unexpected Maker"
#define MICROPY_HW_USB_PRODUCT_FS_STRING "OMGS3"

View File

@@ -5,12 +5,3 @@ CONFIG_ESPTOOLPY_AFTER_NORESET=y
CONFIG_SPIRAM_MEMTEST=
CONFIG_LWIP_LOCAL_HOSTNAME="UMOMGS3"
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x303A
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x8225
CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100
CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID=n
CONFIG_TINYUSB_DESC_USE_DEFAULT_PID=n
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Unexpected Maker"
CONFIG_TINYUSB_DESC_PRODUCT_STRING="OMGS3"
CONFIG_TINYUSB_DESC_SERIAL_STRING="_omgs3_"

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s3)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.ble
boards/sdkconfig.240mhz
boards/sdkconfig.spiram_sx

View File

@@ -8,3 +8,8 @@
#define MICROPY_HW_SPI1_MOSI (35)
#define MICROPY_HW_SPI1_MISO (37)
#define MICROPY_HW_SPI1_SCK (36)
#define MICROPY_HW_USB_VID 0x303A
#define MICROPY_HW_USB_PID 0x80D4
#define MICROPY_HW_USB_MANUFACTURER_STRING "Unexpected Maker"
#define MICROPY_HW_USB_PRODUCT_FS_STRING "ProS3"

View File

@@ -4,12 +4,3 @@ CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_SPIRAM_MEMTEST=
CONFIG_LWIP_LOCAL_HOSTNAME="UMProS3"
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x303A
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x80D4
CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100
CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID=n
CONFIG_TINYUSB_DESC_USE_DEFAULT_PID=n
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Unexpected Maker"
CONFIG_TINYUSB_DESC_PRODUCT_STRING="ProS3"
CONFIG_TINYUSB_DESC_SERIAL_STRING="_ps3_"

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s3)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.ble
boards/sdkconfig.240mhz
boards/sdkconfig.spiram_sx

View File

@@ -8,3 +8,8 @@
#define MICROPY_HW_SPI1_MOSI (35)
#define MICROPY_HW_SPI1_MISO (37)
#define MICROPY_HW_SPI1_SCK (36)
#define MICROPY_HW_USB_VID 0x303A
#define MICROPY_HW_USB_PID 0x81FF
#define MICROPY_HW_USB_MANUFACTURER_STRING "Unexpected Maker"
#define MICROPY_HW_USB_PRODUCT_FS_STRING "RGBTouchMini"

View File

@@ -5,12 +5,3 @@ CONFIG_ESPTOOLPY_AFTER_NORESET=y
CONFIG_SPIRAM_MEMTEST=
CONFIG_LWIP_LOCAL_HOSTNAME="UMRGBTouchMini"
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x303A
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x81FF
CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100
CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID=n
CONFIG_TINYUSB_DESC_USE_DEFAULT_PID=n
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Unexpected Maker"
CONFIG_TINYUSB_DESC_PRODUCT_STRING="RGBTouchMini"
CONFIG_TINYUSB_DESC_SERIAL_STRING="_rgbtouch_mini_"

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s2)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.spiram_sx
boards/sdkconfig.usb
boards/UM_TINYS2/sdkconfig.board
)

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s3)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.ble
boards/sdkconfig.240mhz
boards/sdkconfig.spiram_sx

View File

@@ -8,3 +8,8 @@
#define MICROPY_HW_SPI1_MOSI (35)
#define MICROPY_HW_SPI1_MISO (37)
#define MICROPY_HW_SPI1_SCK (36)
#define MICROPY_HW_USB_VID 0x303A
#define MICROPY_HW_USB_PID 0x80D1
#define MICROPY_HW_USB_MANUFACTURER_STRING "Unexpected Maker"
#define MICROPY_HW_USB_PRODUCT_FS_STRING "TinyS3"

View File

@@ -4,12 +4,3 @@ CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_SPIRAM_MEMTEST=
CONFIG_LWIP_LOCAL_HOSTNAME="UMTinyS3"
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x303A
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x80D1
CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100
CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID=n
CONFIG_TINYUSB_DESC_USE_DEFAULT_PID=n
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Unexpected Maker"
CONFIG_TINYUSB_DESC_PRODUCT_STRING="TinyS3"
CONFIG_TINYUSB_DESC_SERIAL_STRING="_ts3_"

View File

@@ -2,7 +2,6 @@ set(IDF_TARGET esp32s3)
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
boards/sdkconfig.ble
boards/sdkconfig.240mhz
boards/sdkconfig.spiram_sx

View File

@@ -8,3 +8,8 @@
#define MICROPY_HW_SPI1_MOSI (35)
#define MICROPY_HW_SPI1_MISO (37)
#define MICROPY_HW_SPI1_SCK (36)
#define MICROPY_HW_USB_VID 0x303A
#define MICROPY_HW_USB_PID 0x81B1
#define MICROPY_HW_USB_MANUFACTURER_STRING "Unexpected Maker"
#define MICROPY_HW_USB_PRODUCT_FS_STRING "TinyWATCHS3"

View File

@@ -4,12 +4,3 @@ CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_SPIRAM_MEMTEST=
CONFIG_LWIP_LOCAL_HOSTNAME="UMTinyWATCHS3"
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x303A
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x81B1
CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100
CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID=n
CONFIG_TINYUSB_DESC_USE_DEFAULT_PID=n
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Unexpected Maker"
CONFIG_TINYUSB_DESC_PRODUCT_STRING="TinyWATCHS3"
CONFIG_TINYUSB_DESC_SERIAL_STRING="_tws3_"

View File

@@ -1,4 +0,0 @@
CONFIG_USB_OTG_SUPPORTED=y
CONFIG_TINYUSB_CDC_ENABLED=y
CONFIG_TINYUSB_CDC_RX_BUFSIZE=256
CONFIG_TINYUSB_CDC_TX_BUFSIZE=256

View File

@@ -97,6 +97,14 @@ if(MICROPY_PY_TINYUSB)
list(APPEND MICROPY_INC_TINYUSB
${MICROPY_DIR}/shared/tinyusb/
)
# Build the Espressif tinyusb component with MicroPython shared/tinyusb/tusb_config.h
idf_component_get_property(tusb_lib espressif__tinyusb COMPONENT_LIB)
target_include_directories(${tusb_lib} PRIVATE
${MICROPY_DIR}/shared/tinyusb
${MICROPY_DIR}
${MICROPY_PORT_DIR}
${MICROPY_BOARD_DIR})
endif()
list(APPEND MICROPY_SOURCE_PORT

View File

@@ -30,6 +30,6 @@ direct_dependencies:
- espressif/lan867x
- espressif/mdns
- idf
manifest_hash: 3b18b5bbac91c9fe5098d3759a37c84ed0828546d8cbc92e26e4c1698e689c8a
manifest_hash: ea629d6996152d77801fb1acae35b27596fdc023a933d40287d80f98dc497b55
target: esp32
version: 2.0.0

View File

@@ -16,6 +16,6 @@ dependencies:
direct_dependencies:
- espressif/mdns
- idf
manifest_hash: 3b18b5bbac91c9fe5098d3759a37c84ed0828546d8cbc92e26e4c1698e689c8a
manifest_hash: ea629d6996152d77801fb1acae35b27596fdc023a933d40287d80f98dc497b55
target: esp32c2
version: 2.0.0

View File

@@ -16,6 +16,6 @@ dependencies:
direct_dependencies:
- espressif/mdns
- idf
manifest_hash: 3b18b5bbac91c9fe5098d3759a37c84ed0828546d8cbc92e26e4c1698e689c8a
manifest_hash: ea629d6996152d77801fb1acae35b27596fdc023a933d40287d80f98dc497b55
target: esp32c3
version: 2.0.0

View File

@@ -16,6 +16,6 @@ dependencies:
direct_dependencies:
- espressif/mdns
- idf
manifest_hash: 3b18b5bbac91c9fe5098d3759a37c84ed0828546d8cbc92e26e4c1698e689c8a
manifest_hash: da32add5eb5e196ac97a99eb579025222ec572f5db4038873fbf9d3b9d6ed5a3
target: esp32c5
version: 2.0.0

View File

@@ -16,6 +16,6 @@ dependencies:
direct_dependencies:
- espressif/mdns
- idf
manifest_hash: 3b18b5bbac91c9fe5098d3759a37c84ed0828546d8cbc92e26e4c1698e689c8a
manifest_hash: ea629d6996152d77801fb1acae35b27596fdc023a933d40287d80f98dc497b55
target: esp32c6
version: 2.0.0

View File

@@ -1,18 +1,4 @@
dependencies:
espressif/esp_tinyusb:
component_hash: 96d232ced7afe1976119b62f7fbf1944a2a78b36228ff6f7b9318394ac1153cc
dependencies:
- name: idf
require: private
version: '>=5.0'
- name: espressif/tinyusb
registry_url: https://components.espressif.com
require: public
version: '>=0.14.2'
source:
registry_url: https://components.espressif.com/
type: service
version: 1.7.6~1
espressif/mdns:
component_hash: 46ee81d32fbf850462d8af1e83303389602f6a6a9eddd2a55104cb4c063858ed
dependencies:
@@ -30,7 +16,7 @@ dependencies:
require: private
version: '>=5.0'
source:
registry_url: https://components.espressif.com
registry_url: https://components.espressif.com/
type: service
targets:
- esp32s2
@@ -42,9 +28,9 @@ dependencies:
type: idf
version: 5.5.1
direct_dependencies:
- espressif/esp_tinyusb
- espressif/mdns
- espressif/tinyusb
- idf
manifest_hash: 3b18b5bbac91c9fe5098d3759a37c84ed0828546d8cbc92e26e4c1698e689c8a
manifest_hash: ea629d6996152d77801fb1acae35b27596fdc023a933d40287d80f98dc497b55
target: esp32s2
version: 2.0.0

View File

@@ -1,18 +1,4 @@
dependencies:
espressif/esp_tinyusb:
component_hash: 96d232ced7afe1976119b62f7fbf1944a2a78b36228ff6f7b9318394ac1153cc
dependencies:
- name: idf
require: private
version: '>=5.0'
- name: espressif/tinyusb
registry_url: https://components.espressif.com
require: public
version: '>=0.14.2'
source:
registry_url: https://components.espressif.com/
type: service
version: 1.7.6~1
espressif/mdns:
component_hash: 46ee81d32fbf850462d8af1e83303389602f6a6a9eddd2a55104cb4c063858ed
dependencies:
@@ -30,7 +16,7 @@ dependencies:
require: private
version: '>=5.0'
source:
registry_url: https://components.espressif.com
registry_url: https://components.espressif.com/
type: service
targets:
- esp32s2
@@ -42,9 +28,9 @@ dependencies:
type: idf
version: 5.5.1
direct_dependencies:
- espressif/esp_tinyusb
- espressif/mdns
- espressif/tinyusb
- idf
manifest_hash: 3b18b5bbac91c9fe5098d3759a37c84ed0828546d8cbc92e26e4c1698e689c8a
manifest_hash: ea629d6996152d77801fb1acae35b27596fdc023a933d40287d80f98dc497b55
target: esp32s3
version: 2.0.0

View File

@@ -1,10 +1,10 @@
## IDF Component Manager Manifest File
dependencies:
espressif/mdns: "~1.1.0"
espressif/esp_tinyusb:
espressif/tinyusb:
rules:
- if: "target in [esp32s2, esp32s3]"
version: "~1.7.6"
version: "~0.18.0"
espressif/lan867x:
version: "~1.0.0"
rules:

View File

@@ -223,19 +223,14 @@
#ifndef MICROPY_HW_USB_VID
#define USB_ESPRESSIF_VID 0x303A
#if CONFIG_TINYUSB_DESC_USE_ESPRESSIF_VID
#define MICROPY_HW_USB_VID (USB_ESPRESSIF_VID)
#else
#define MICROPY_HW_USB_VID (CONFIG_TINYUSB_DESC_CUSTOM_VID)
#endif
#ifndef MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE
#define MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE (1) // Support machine.USBDevice
#endif
#endif
#ifndef MICROPY_HW_USB_PID
#if CONFIG_TINYUSB_DESC_USE_DEFAULT_PID
#define _PID_MAP(itf, n) ((CFG_TUD_##itf) << (n))
// A combination of interfaces must have a unique product id, since PC will save device driver after the first plug.
// Same VID/PID with different interface e.g MSC (first), then CDC (later) will possibly cause system error on PC.
@@ -244,25 +239,16 @@
#define USB_TUSB_PID (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(MSC, 1) | _PID_MAP(HID, 2) | \
_PID_MAP(MIDI, 3)) // | _PID_MAP(AUDIO, 4) | _PID_MAP(VENDOR, 5) )
#define MICROPY_HW_USB_PID (USB_TUSB_PID)
#else
#define MICROPY_HW_USB_PID (CONFIG_TINYUSB_DESC_CUSTOM_PID)
#endif
#endif
// These Manufacturer & Product strings are the defaults when using the
// esp_tinyusb component (which MicroPython used in the past).
#ifndef MICROPY_HW_USB_MANUFACTURER_STRING
#ifdef CONFIG_TINYUSB_DESC_MANUFACTURER_STRING
#define MICROPY_HW_USB_MANUFACTURER_STRING CONFIG_TINYUSB_DESC_MANUFACTURER_STRING
#else
#define MICROPY_HW_USB_MANUFACTURER_STRING "MicroPython"
#endif
#define MICROPY_HW_USB_MANUFACTURER_STRING "Espressif Systems"
#endif
#ifndef MICROPY_HW_USB_PRODUCT_FS_STRING
#ifdef CONFIG_TINYUSB_DESC_PRODUCT_STRING
#define MICROPY_HW_USB_PRODUCT_FS_STRING CONFIG_TINYUSB_DESC_PRODUCT_STRING
#else
#define MICROPY_HW_USB_PRODUCT_FS_STRING "Board in FS mode"
#endif
#define MICROPY_HW_USB_PRODUCT_FS_STRING "Espressif Device"
#endif
#endif // MICROPY_HW_ENABLE_USBDEV