Memory Requirements

Stack and Heap

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


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


netlib Code Section

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 instructions

Example linker command file: Refer to Example Linker Command File

#define NETSECFAST RAML1
#define NETSECSLOW POFFCHIP
.nettextfast > NETSECFAST /* fast netlib code */
.nettextslow > NETSECSLOW /* slow netlib code */




Common Modules Code Section

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:

#define COMMONSECTIONS POFFCHIP // all common modules linked to external RAM
.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 6670 bytes
ARP 1754 bytes
Sockets 4662 bytes
IP 1220 bytes
ICMP 802 bytes
UDP 1266 bytes
TCP 7632 bytes
DNS 686 bytes
DHCP 2604 bytes
Stack Size: 1024 words
Heap Size:
Adapter/PHY 236 bytes
per UDP/ICMP Socket 504 bytes
per TCP Socket 644 bytes
Static RAM:
ARP Cache 2768 bytes
TCP sequence number cache 2688 bytes