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

emUSB-Device core5.4 KByte1.0 KByte
Bulk 2.0 KByte0.1 KByte
CDC 1.3 KByte0.1 KByte
CDC-ECM 3.0 KByte0.2 KByte + size of IP stack
HID 1.6 KByte0.1 KByte
MSD 4.7 KByte0.5 KByte+ size of FS stack
+ configurable sector buffer of minimum 512 bytes (RAM)
MTP 14.7 KByte1.6 KByte+ size of FS stack
+ configurable file data buffer of minimum 512 bytes RAM
+ configurable object buffer (typically 4 kBytes RAM)
PrinterClass 900 Byte2.1 KByte
RNDIS 5.6 KByte1.4 KByte + size of IP stack
VirtualMSD 8.2 KByte1.0 KByte+ heap of minimum 1700 bytes RAM
IP over USB7.5 KByte1.6 KByte+ size of IP stack
Audio2.5 KByte0.1 KByte
DFU1 KByte0 KByte
USB target driver1.3 - 3.5 KByte0 - 8 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.