cherry-embedded/CherryUSB
FreeCherryUSB is a tiny and beautiful, high performance and portable USB host and device stack for embedded system with USB IP
About cherry-embedded/CherryUSB
CherryUSB is an open-source, high-performance, and portable USB host and device stack designed for embedded systems with USB IP. It emphasizes ease of learning through streamlined code with simple logic and tree-structured programming, making USB fundamentals accessible. Data transmission interfaces are designed to be as easy to use as UART TX DMA/RX DMA, with no length restrictions on transmission/reception (packetization handled by porting drivers). Performance is optimized via direct register interfacing, memory zero-copy DMA mode, and interrupt-context packetization. The stack supports USB 2.0 full and high speed (USB 3.0 super speed planned) and provides a unified framework for standard device requests, class requests, vendor requests, and custom special requests. A standard DCD porting interface enables adaptation across different USB IPs.
Key Features
Pros & Cons
- Easy to learn with simple logic and progressive code layers
- High performance through zero-copy DMA and direct register access
- No length restrictions on data transmission, simplifying user code
- Portable across different USB IPs via standardized DCD/HCD interfaces
- Active open-source project with documentation and demos
- Supports composite devices with object-oriented design
- USB 3.0 super speed support is still in development (TODO)
- Requires manual porting for different USB IP cores (no auto-detection)
- Limited to embedded systems with USB hardware; not a general-purpose USB library
- Documentation may be minimal for advanced features