Skip navigation

emUSB-Device Resource Usage



Memory footprint

emUSB-Device is designed to fit many kinds of embedded design requirements. Several features can be excluded from a build to get a minimal system.  The code size depends on the API functions called by the application. The code was compiled with gcc for a Cortex-M4 CPU with size optimization. Note that the values are only valid for an average configuration.



The following table shows the approximate ROM and RAM requirements of emUSB-Device

USB core 5.3 KByte 1.0 KByte
Bulk 2.0 KByte 0.1 KByte
CDC 1.3 KByte 0.1 KByte
HID 1.6 KByte 0.1 KByte
MSD 4.8 KByte 0.5 KByte + size of file system
+ configurable sector buffer of minimum 512 bytes (RAM)
MTP 14.7 KByte 1.7 KByte + size of file system
+ configurable file data buffer of minimum 512 bytes RAM)
+ configurable object buffer (typically 4 kBytes RAM)
Printer 0.9 KByte 2.1 KByte
RNDIS 5.5 KByte 1.5 KByte + size of the IP stack
ECM 3.0 KByte 0.2 KByte + size of the IP stack
IP-Over-USB 7.5 KByte 1.6 KByte + size of the IP stack
VirtualMSD 8.2 KByte 1.0 KByte + heap of minimum 1700 bytes RAM
DFU 1.0 KByte 0.0 KByte
AUDIO 2.5 KByte 0.1 KByte
MIDI 1.8 KByte 0.0 KByte
CCID 1.2 KByte 0.0 KByte
USB target driver 1.4 - 3.6 KByte 0.0 - 7.6 KByte

Additionally 64, 512 or 1024 Byte (for full-speed, high-speed and SuperSpeed devices, respectively) of RAM are necessary for each OUT-endpoint as a data buffer. This buffer is assigned within the application.