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 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.8 KByte900 Byte
Bulk 2.0 KByte100 Byte
CDC 1.3 KByte100 Byte
CDC-ECM 2.8 KByte200 Byte + size of IP stack
HID 1.6 KByte100 Byte
MSD 4.8 KByte300 Byte+ size of FS stack
+ configurable sector buffer of minimum 512 bytes (RAM)
MTP 14.6 KByte1.6 KByte+ size of FS stack
+ configurable file data buffer of minimum 512 bytes RAM
+ configurable object buffer (typically 4 kBytes RAM)
PrinterClass 800 Byte2.1 KByte
RNDIS 5.5 KByte1.4 KByte + size of IP stack
SmartMSD 8.3 KByte800 Byte+ heap of minimum 1700 bytes RAM
IP over USB7.3 KByte1.6 KByte+ size of IP stack
USB target driver1.3 - 3.5 KByte0 - 8 KByte

Additionally 64 or 512 Byte (64 for Full Speed and 512 for High Speed devices) of RAM are necessary for each OUT-endpoint as a data buffer. This buffer is assigned within the application.