Skip to content

Conversation

igi540
Copy link
Collaborator

@igi540 igi540 commented Sep 10, 2025

Add ESP32-H4 as a supported MCU in TinyUSB and wire it into build/runtime:

  • CMakeLists: map IDF target esp32h4 → OPT_MCU_ESP32H4, family=esp32sx
  • tusb_option.h: define OPT_MCU_ESP32H4
  • tusb_mcu.h: enable DWC2 USBIP for H4
  • dcd_dwc2.c: add H4 USB_WRAP field aliases (wrap_* → legacy names)
  • dwc2_esp32.h: add H4 controller entry (FS base/IRQ, ep caps)
  • family.c: include H4 in USB init/PHY setup
  • idf_component.yml: add esp32h4 target

This enables TinyUSB examples to build for ESP32-H4.

Upstream PR: hathach#3252

@igi540 igi540 force-pushed the feat/tinyusb_esp32h4_support branch from 7d6744b to 85bde45 Compare September 10, 2025 16:59
@igi540 igi540 self-assigned this Sep 10, 2025
@igi540 igi540 requested a review from roma-jam September 10, 2025 17:00
@igi540 igi540 force-pushed the feat/tinyusb_esp32h4_support branch 2 times, most recently from fbd4fdc to f561d9e Compare September 10, 2025 17:05
@igi540 igi540 force-pushed the feat/tinyusb_esp32h4_support branch from f561d9e to 2d402c1 Compare September 10, 2025 17:32
@igi540 igi540 changed the title feat(usb): add initial ESP32-H4 support in tinyusb feat(usb): add ESP32-H4 support in tinyusb Sep 10, 2025
@igi540 igi540 force-pushed the feat/tinyusb_esp32h4_support branch from 2d402c1 to d3fd3af Compare September 10, 2025 20:50
@igi540 igi540 changed the title feat(usb): add ESP32-H4 support in tinyusb feat(usb): Add ESP32-H4 support in tinyusb Sep 10, 2025
@tore-espressif
Copy link
Collaborator

@igi540 Please base this feature branch on master branch. The plan is that we will upstream this change to hathach/tinyusb and include H4 support in upcoming 0.19 release.

Also please add H4 to the table in README.rst https://github.com/espressif/tinyusb/blob/master/README.rst

@igi540 igi540 force-pushed the feat/tinyusb_esp32h4_support branch from d3fd3af to 64f3c25 Compare September 15, 2025 17:54
@igi540 igi540 force-pushed the feat/tinyusb_esp32h4_support branch from 64f3c25 to 31d316d Compare September 15, 2025 19:12
@igi540 igi540 force-pushed the feat/tinyusb_esp32h4_support branch 2 times, most recently from 15234fa to ec38d47 Compare September 16, 2025 10:45
@roma-jam
Copy link
Collaborator

roma-jam commented Sep 18, 2025

Hi @igi540,

you can rebase now to unlock the CI.

Add ESP32-H4 as a supported MCU in TinyUSB and wire it into build/runtime:

- CMakeLists: map IDF target esp32h4 → OPT_MCU_ESP32H4, family=esp32sx
- tusb_option.h: define OPT_MCU_ESP32H4
- tusb_mcu.h: enable DWC2 USBIP for H4
- dcd_dwc2.c: add H4 USB_WRAP field aliases (wrap_* → legacy names)
- dwc2_esp32.h: add H4 controller entry (FS base/IRQ, ep caps)
- family.c: include H4 in USB init/PHY setup
- idf_component.yml: add esp32h4 target

This enables TinyUSB examples to build for ESP32-H4.
@igi540 igi540 force-pushed the feat/tinyusb_esp32h4_support branch from ec38d47 to ce70f24 Compare September 18, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants