Resource usage
The embedded USB Host stack emUSB-Host has been specifically designed for resource-constrained platforms. On a typical system emUSB-Host requires 20 KByte of flash memory and 10 KByte of RAM.
emUSB-Host has been designed to fit many kinds of embedded design requirements. Several features can be excluded from a build to get a minimal system that can efficiently act as a USB host. In the following section the memory usage of typical 32-bit embedded systems is listed.
Please note that the values shown below are approximate values and features selected can influence the final size. The measurement were made using a project for an ARM Cortex-M4 CPU with size optimization and SEGGER compiler 10.6.3.
ROM
The following table shows the approximate ROM requirement of emUSB-Host:
| Component | ROM |
|---|---|
| Core Components | |
| USB core | 6.2 KByte |
| HUB Support | 3.4 KByte |
| Class Components | |
| CDC | 4.5 KByte |
| Vendor class | 3.8 KByte |
| CCID | 5.2 KByte |
| FT232 | 4.6 KByte |
| HID Generic | 4.9 KByte |
| HID Mouse Keyboard | 6.0 KByte |
| MSD | 5.2 KByte + sizeof(file system) |
| MTP | 11.7 KByte |
| Printer | 4.7 KByte |
| MIDI | 4.8 KByte |
| AUDIO | 6.7 KByte |
| LAN using ASIX | 8.5 KByte + sizeof(emNET) |
| LAN using CDC-ECM | 6.5 KByte + sizeof(emNET) |
| LAN using RNDIS | 6.8 KByte + sizeof(emNET) |
| VIDEO | 7.6 KByte |
| Drivers | |
| Driver EHCI | 4.4 KByte |
| Driver OHCI | 5.7 KByte |
| Driver STM32F4 FS | 4.0 KByte |
| Driver STM32F4 HS | 4.5 KByte |
| Driver STM32F7 HS | 4.7 KByte |
| Driver Kinetis FS | 2.7 KByte |
| Driver Renesas RX64 | 4.4 KByte |
| Driver LPC54xxx HS | 2.2 KByte |
| Driver LPC54xxx FS | 6.2 KByte |
| Driver MUSB | 2.3 KByte |
| Driver SAMV70 | 2.7 KByte |
RAM
The following table shows the average RAM requirement of emUSB-Host: *
| Component | RAM |
|---|---|
| emUSB-Host core incl. one driver | 3.8 KByte + (ca. 3 KByte stack for the managing tasks) |
| For each connected generic HID device | 2.8 KByte |
| For each connected CDC ACM device | 4.1 KByte |
| For each connected MSD device | 2.3 KByte |
| For each connected Mouse | 4.4 KByte |
| For each connected Vendor device | 3.5 KByte |
| For each connected external HUB | 1.9 KByte |
| For each connected LAN (ASIX) device | 13.5 KByte |
| For each connected LAN (CDC-ECM) device | 11.1 KByte |
| For each connected LAN (RNDIS) device | 18.1 KByte |
* The actual RAM usage may vary depending on the USB host controller used, the memory architecture of the target, the USB devices connected to emUSB-Host and the type of operations performed with that devices.