3-2-4 µC/TCP-IP DATA FOOTPRINT
Memory footprints were obtained by compiling the code on a popular 32-bit CPU architecture. Compiler optimization was set to maximum optimization for size or speed as indicated. µC/TCP-IP options are set for most disabled or all enabled. The numbers are provided as orders of magnitude for design purposes. The table excludes NIC, PHY, ISR and BSP layers since these are NIC and board specific.
To see additional information regarding options, refer to Chapter 19, “Debug Management” on page 379, Chapter 20, “Statistics and Error Counters” on page 381, and Appendix C, “µC/TCP-IP Configuration and Optimization” on page 701.
3-2-5 µC/TCP-IP ADD-ON OPTIONS CODE FOOTPRINT
As seen in Layers 5-6-7 – The Application, services and standard application software modules found at the Application layer can be used in the product design to provide certain functionalities. Such application modules are offered as options for µC/TCP-IP. Although an in-depth discussion of memory footprint is outside the scope of this book, the memory footprint for the optional modules is included below for planning purposes. Chapter 9, “Services and Applications” on page 223 describes what some of these applications and services do and how they do it.
The footprints below were obtained by compiling the code on a popular 32-bit CPU architecture. The numbers are provided as orders of magnitude for design purposes.
3-2-6 µC/TCP-IP DATA FOOTPRINT
Cutting protocols out of the code will reduce the code footprint with little impact on the data (i.e., RAM) footprint. The greatest impact on the data footprint is a result of the number of “objects” such as network buffers and connections, and most specifically from network buffers. See a detailed explanation on buffers and how to use them appropriately in Chapter 7, “Transport Protocols” on page 167 and in Chapter 15, “Buffer Management” on page 337.
Data usage estimates are provided to complement the code footprint discussion. There are multiple modules requiring data to operate as shown in Table 3-5. Many of the data sizes calculated in the following sub-sections assume 4-byte pointers. The data requirements for each of the objects must be added, as needed by the configuration of the TCP/IP stack. The configuration of the objects is represented in a formula for each. The equation variables all in upper case are #define configuration parameters found in Appendix C, “µC/TCP-IP Configuration and Optimization” on page 701. Calculation methods follow.
µC/TCP-IP stores transmitted and received data in data structures known as network buffers. µC/TCP-IP’s buffer management is designed with embedded system constraints in mind. The most important factor on the RAM footprint is the number of buffers. For this reason, three types of buffers are defined: large receive, large transmit and small transmit buffers.
The data space for EACH network interface's buffers is calculated as:
These calculations do not account for additional space that may be required for additional alignment requirements. Also, the (minimum) recommended defaults for network buffer sizes:
Network Interface Requirements
Chapters of "µC/TCP-IP, the embedded protocol" are provided to UBM for users download and consultation, not for resale. Users wanting to know more about TCP/IP and Micrium can visit Micrium