All Projects → xtoolbox → Teenyusb

xtoolbox / Teenyusb

Licence: mit
Lightweight USB device and host stack for STM32 and other MCUs.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Teenyusb

usb stack
Tiny and portable USB device/host stack for embedded system with USB IP
Stars: ✭ 175 (-39.02%)
Mutual labels:  usb, hid, hub
Usbdevice
Highly flexible Composite USB Device Library
Stars: ✭ 144 (-49.83%)
Mutual labels:  usb, stm32, hid
Stlink
Open source STM32 MCU programming toolset
Stars: ✭ 3,158 (+1000.35%)
Mutual labels:  stm32, embedded
IOsonata
IOsonata multi-platform multi-architecture power & performance optimized software library for fast and easy IoT MCU firmware development. Object Oriented design, no board package to define, just pure plug & play any boards
Stars: ✭ 40 (-86.06%)
Mutual labels:  embedded, stm32
async-stm32f1xx
Abstractions for asynchronous programming on the STM32F1xx family of microcontrollers.
Stars: ✭ 24 (-91.64%)
Mutual labels:  embedded, stm32
STM32 Base Project
STM32 Base project with a lot of stuff
Stars: ✭ 58 (-79.79%)
Mutual labels:  embedded, stm32
stm32 tiny monitor
A tiny external monitor for PC using STM32 and ST7789. Connects to PC over USB and displays the captured screen on ST7789 (240x240) display.
Stars: ✭ 61 (-78.75%)
Mutual labels:  usb, stm32
RaspberryPi-Joystick
A virtual HID USB joystick created using Raspberry Pi
Stars: ✭ 73 (-74.56%)
Mutual labels:  usb, hid
libDaisy
Hardware Library for the Daisy Audio Platform
Stars: ✭ 164 (-42.86%)
Mutual labels:  embedded, stm32
STM32 XPD
STM32 eXtensible Peripheral Drivers
Stars: ✭ 38 (-86.76%)
Mutual labels:  usb, stm32
OpenWare
Firmware for OWL devices
Stars: ✭ 23 (-91.99%)
Mutual labels:  embedded, stm32
STM32F10x Servo Library
Servo library with stm developed by the Liek Software Team. We are working on new versions.
Stars: ✭ 14 (-95.12%)
Mutual labels:  embedded, stm32
stm32f7xx-hal
A Rust embedded-hal HAL for all MCUs in the STM32 F7 family
Stars: ✭ 71 (-75.26%)
Mutual labels:  embedded, stm32
midi-grid
DIY midi controller project
Stars: ✭ 60 (-79.09%)
Mutual labels:  embedded, stm32
CapableRobot USBHub Driver
www.crowdsupply.com/capable-robot-components/programmable-usb-hub
Stars: ✭ 17 (-94.08%)
Mutual labels:  embedded, usb
CML
Fast, safe and easy to use Cortex-M HAL Library, written in C++ 17
Stars: ✭ 17 (-94.08%)
Mutual labels:  embedded, stm32
STM32Keyboard
No description or website provided.
Stars: ✭ 15 (-94.77%)
Mutual labels:  embedded, stm32
kikpad
KiKPad : the Midiplus SmartPad reinvented !
Stars: ✭ 31 (-89.2%)
Mutual labels:  usb, stm32
FreeRTOS-rust
Rust crate for FreeRTOS
Stars: ✭ 159 (-44.6%)
Mutual labels:  embedded, stm32
android-usb-script
An Android app that allows you to script USB gadgets (work-in-progress).
Stars: ✭ 15 (-94.77%)
Mutual labels:  usb, hid

Teeny USB

Build Status

一个简易的STM32 USB主机和设备协议栈

A teeny USB device and host stack for STM32 MCUs

关于TeenyUSB的实现细节和使用方式请阅读《STM32 USB设备开发指南》 Github下载 , 21IC下载

设备栈 Device Stack

  • HID class
  • MSC 大容量存储设备,U盘。 Mass storage class
  • CDC ACM 虚拟串口。 Communication device class, abstract control mode, known as virtual serial port.
  • CDC RNDIS 虚拟网口。 Communication device class, remote NDIS
  • Vendor 厂商自定义设备。 vendor class

USB描述符由TeenyDT生成。 在线试用TeenyDT

USB descriptor is generate by TeenyDT. Try TeenyDT online

USB设备例程 Demo for device

  • 复合设备,包含HID CDC(虚拟串口) WinUSB MSC(U盘) Composite device with HID+CDC+WinUSB+MSC
  • WinUSB设备,Bulk传输免驱动。 Bulk device with WinUSB support
  • CMSIS DAP on STM32F723 discovery
  • 虚拟网卡, CDC RNDIS device

主机栈 Host Stack

  • HUB class, 支持多设备级连, support multiple device and hub
  • HID class, 支持键盘、鼠标以及自定义HIDden设备。support keyboard, mouse, custom device
  • MSC class, 大容量存储类(U盘),使用BOT协议。 mass storage class with BOT protocol
  • CDC ACM class, 虚拟串口。 Communication device class, abstract control mode
  • CDC RNDIS class, 虚拟网口。 Communication device class, remote NDIS
  • Vendor class,厂商自定义设备

USB主机例程 Demo for host

  • 简易交互式主机,支持U盘、HUB、键盘、鼠标以及自定义设备 更多说明。 Interactive host, support HUB,MSC,Keyboard,Mouse and generic device. more info
  • rt-thread双角色设备, 支持运行时切换设备类行,支持动态mount U盘,更多说明。Dual role device with rt-thread, more info.

如何生成示例程序 How to make demo

编译工具为 arm-none-eabi-gcc is the compile toolchain.

调试使用VSCode+OpenOCD,如何在VSCode中配置STM32开发调试环境?

git clone https://github.com/xtoolbox/TeenyUSB.git
cd TeenyUSB
git submodule update --init
cd sample
make all -j8

如果更新mcu库很慢,可以使用gitee.com镜像。https://gitee.com/xtoolbox/st_driver.git

demo编译后各字段大小信息 Section size info of each demo

$ echo "   text    data     bss     dec     hex filename" && make all -j8 LOG_INFO=0 | grep '^[^l].*output/.*.elf'
   text    data     bss     dec     hex filename
  12072    1084   69296   82452   14214 output/f723dap.elf
   4480    1080    6068   11628    2d6c output/f072bulk.elf
   6392    1084    6416   13892    3644 output/f407bulk.elf
   5396    1084    6064   12544    3100 output/f303bulk.elf
   4972    1080    6068   12120    2f58 output/f103bulk.elf
   6524    1084    6416   14024    36c8 output/f723bulk.elf
   6284    1084    6416   13784    35d8 output/f767bulk.elf
   8100    3500    2200   13800    35e8 output/f103comp.elf
   8324    3500    2200   14024    36c8 output/f072comp.elf
  10132    3504    2588   16224    3f60 output/f407comp.elf
  10240    3504    2588   16332    3fcc output/f723comp.elf
   8528    3504    2196   14228    3794 output/f303comp.elf
  10000    3504    2588   16092    3edc output/f767comp.elf
  27560    1092   35776   64428    fbac output/f107host.elf
  28704    1092   28608   58404    e424 output/f407host.elf
  28860    1092   28832   58784    e5a0 output/f723host.elf
  28504    1092   28792   58388    e414 output/f767host.elf

目录结构说明 Folder

.
├── TeenyDT         # 基于lua的USB描述符生成工具 A lua based USB descriptor generator 
├── sample          # 示例代码 Sample projects
├── mcu_lib         # MCU文件子仓库,MCU library sub module
├── core            # USB核心文件, TeenyUSB core file
├── class           # USB设备类和主机类文件, TeenyUSB device and host class file
├── driver_stm32    # STM32驱动文件。 STM32 Driver file
├── pc_test_tool    # 基于lua Qt的Windows USB 测试程序 A luaQt based Windows program to test CDC/HID/WinUSB devices
└── third_part      # 第三方代码,如FatFs,rt-thread。 Third part source code, e.g. FatFs, rt-thread.

Demo测试用的开发板 Demo tested boards

Board Folder Board Type Chip HSE Freq USB Core
stm32f072c8t6 Custom board STM32F072C8T6 No HSE USB FS
stm32f103ret6 Custom board STM32F103RET6 8 MHz USB FS
stm32f107vc Custom board STM32F107VCT6 25 MHz OTG_FS
stm32f3_disco stm32f3 disco STM32F303VCT6 8 MHz USB FS
stm32f407_evk Waveshare EVK407I STM32F407IGT6 8 MHz OTG_FS/OTG_HS_ULPI
stm32f723e_disco stm32f723e discovery STM32F723IEK6 25 MHz OTG_FS/OTG_HS_Embed
stm32767zi_nucleo stm32f767zi nucleo STM32F767ZIT6 8 MHz OTG_FS
stm32h743_openmv stm32h743_openmv STM32H743VIT6 12 MHz OTG_FS

其它支持STM32的开源USB协议栈 Other open source USB stack for STM32

  • tinyusb 全静态内存分配,不支持多设备,不支持同一设备上使用多个同类型接口,暂时不支持STM32主机模式。
  • libopencm3 动态生成描述符,不依赖官方库。USB设备类型少,不支持主机模式。
  • libusb_stm32 资源占用极少的USB设备库,不支持主机模式。

其它嵌入式开源USB协议栈

  • lufa 运行于AVR的轻量级USB主机和从机栈。
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].