finds.dev← search

// the find

xtoolbox/TeenyUSB

★ 613 · C · MIT · updated Nov 2023

Lightweight USB device and host stack for STM32 and other MCUs. Ready for USB 3.0 device.

TeenyUSB is a USB device and host stack written in C, targeting STM32 MCUs and the WCH CH56x series (which gets you USB 3.0 SuperSpeed). It handles the usual suspects — HID, CDC, MSC, RNDIS, vendor — on both device and host sides, with a Lua-based descriptor generator (TeenyDT) to avoid hand-writing descriptor tables.

The descriptor generator (TeenyDT) is genuinely useful: you describe your device in Lua, generate the C descriptor arrays, and skip the error-prone byte-counting that trips up everyone writing USB descriptors by hand. The footprint is small — a bulk device on F072 compiles to under 5KB of flash, which matters on constrained targets. Host-side hub support with multi-device chaining is rare in hobby-grade stacks and actually works across several real boards. The CH56x USB 3.0 support is a differentiator; most open-source stacks stop at HS.

The last commit is November 2023 and the project shows clear signs of slowing down — Travis CI (not GitHub Actions), no issues response, documentation primarily in Chinese with English as an afterthought. TinyUSB has lapped it in community support, board coverage, and active maintenance. The host stack requires an RTOS or careful manual polling; the OS abstraction layer is thin and poorly documented, so porting to anything other than rt-thread or bare-metal requires reading source. There are no unit tests — you find out if it works by flashing hardware.

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 →