Memory Requirements

Stack and Heap

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.


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

Definition in application linker command file App.cmd:

.nettextfast > SRAM /* fast netlib code */
.nettextslow > SRAM /* 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:


Definition in application linker command file App.cmd:

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




Code and Data Size

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

Netlib 2.53
Code Size:
Adapter + MAC + PHY 7729 words
ARP 690 words
Sockets 2194 words
IP 368 words
ICMP 288 words
UDP 495 words
TCP 2531 words
DNS 351 words
DHCP 662 words
Stack Size: 1024 words
Heap Size:
Adapter/PHY 228 bytes
per UDP/ICMP Socket 496 bytes
per TCP Socket 604 bytes
Static RAM:
ARP Cache 984 words
TCP sequence number cache 1715 words