finds.dev← search

// the find

hathach/tinyusb

★ 6,863 · C · MIT · updated Jun 2026

An open source cross-platform USB stack for embedded system

TinyUSB is a USB host/device stack for microcontrollers, covering 50+ MCU families from STM32 to RP2040 to ESP32. It handles the full USB protocol stack in C with zero dynamic allocation, making it suitable for constrained embedded targets. If you need to make a microcontroller appear as a HID device, CDC serial port, USB mass storage drive, or audio device, this is the go-to library.

- Zero dynamic allocation — all buffers are statically declared, which means memory usage is deterministic and stack/heap corruption from USB activity is essentially impossible. This matters a lot in embedded contexts.

- ISR deferral design is solid: interrupts just push events into a queue, and all USB protocol processing happens in task context. This makes it genuinely safe to use with FreeRTOS or bare-metal superloops without subtle race conditions biting you.

- MCU coverage is exceptional. The driver table in the README covers DWC2, FSDEV, EHCI, OHCI, MUSB, and a dozen vendor-specific controllers. Porting guide exists and there are real contributed ports, not just stubs.

- CI pipeline is thorough — build matrix across toolchains (GCC, Clang, IAR), static analysis via PVS-Studio, fuzzing via OSS-Fuzz, and hardware-in-loop tests. For a C embedded library this is above average.

- USB Audio (UAC2) and Video (UVC) class drivers are incomplete or marked WIP. If you need isochronous transfer classes beyond basic audio capture, you'll be writing a lot yourself.

- The host stack is significantly less mature than the device stack. Hub support exists but multi-TT hubs and complex host enumeration scenarios have known gaps. Don't assume host mode works as well as device mode.

- Power Delivery (PD3.0) support is explicitly described as 'super early stage, only for testing purpose' and limited to STM32G4. Listing it as a feature is misleading for anyone who actually needs USB-C PD.

- Configuration is done entirely through a user-provided tusb_config.h header with dozens of compile-time defines. There's no Kconfig, no cmake options — you have to read the source to know what all the knobs do, and IDE autocompletion won't help you discover them.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →