Memory Requirements

Table of Contents

Memory Map

Minimum stack size should be 2048 bytes, minimum heap size should be at least 2048 bytes.

All other memories (buffers, etc.) are user-defined and application specific and may be allocated statically or dynamically.

The net.lib library uses two special code sections:

  • .nettextfast
  • .nettextslow

Performance critical functions are located in .nettextfast and should be mapped to fastest memory in the linker command file. .nettextslow can be linked to slower memory without noticeable performance penalties.

Example linker command file: Refer to Example Linker Command File

.nettextfast > IRAM /* fast netlib code */
.nettextslow > IRAM /* slow netlib code */

The Common Support Modules included with the Support SW can also be linked to external memory, since no time-critical function is defined within these modules. Use the following linker instruction to link these modules to external memory:

.uarttext > SDRAM /* UART code */
.cprintftext > SDRAM /* CPrintf section */
.commontext > SDRAM /* common code */



Code and Data Size

Required Code and Data size depends on used protocols and sockets:

Code Size:
Adapter + MAC + PHY 23040 bytes
ARP 4032 bytes
Sockets 13792 bytes
IP 2624 bytes
ICMP 2272 bytes
UDP 3488 bytes
TCP 15424 bytes
DNS 2560 bytes
DHCP 4800 bytes
Stack Size: 2048 bytes
Heap Size:
Adapter/PHY 228 bytes
per UDP/ICMP Socket 496 bytes
per TCP Socket 604 bytes
Static RAM:
ARP Cache 2444 bytes
TCP sequence number cache 4646 bytes