Chapter 152. Configuration

This chapter shows how to include the lwIP networking support into an eCos configuration, and how to configure it once installed. This subject was briefly covered in the Section called Quick Start in Chapter 150.

Configuration Overview

The lwIP networking stack is contained in a single eCos package CYGPKG_NET_LWIP. However, it depends on the services of a collection of other packages for complete functionality:


The main eCos kernel package. This provides the main run-time infrastructure as needed by the lwIP stack. For example, support for threads, semaphores, mailboxes, etc.


ISO C and POSIX standards infrastructure package. This provides access to many run-time utility routines. For example rand_r().


Error package. This provides access to the common eCos error and status codes.


General support library. This provides general ISO C utility functions to the lwIP system.


Strings library. This provides the string and memory move and compare routines used by the lwIP system.


Internationalization library. This provides character interpretation support routines.


The common ethernet device driver support package. This is only required when lwIP is being configured for ethernet support.


The serial device driver support package. This is only required when lwIP is being configured for SLIP or PPPoS support.

To add the lwIP support to a configuration, it is necessary to add the packages listed above as appropriate. This is best done by using a template file. Two examples of such templates files are provided


Provides a current.ect file containing the packages necessary to add ethernet lwIP support to any configuration.


Provides a current.ect file containing the packages necessary to add lwIP serial-based interface support to any configuration.

In addition to the packages listed above, hardware-specific device driver packages will be needed for ethernet devices to be used. These device drivers are usually part of the target description in the eCos database and will be enabled if the CYGPKG_IO_ETH_DRIVERS package is included.

For some target platforms a choice of device driver will be available. The “lwIP driver model” section of the CYGPKG_IO_ETH_DRIVERS_LWIP option may allow either a Direct or Standard driver to be selected. Direct are lwIP only device drivers designed for better performance on lower resource systems, but with some limitations on features supported (for example remote network debugging as mentioned in the Section called GDB/RedBoot in Chapter 155). The Standard drivers use the eCos standard ethernet driver interface allowing the device driver to be used for configurations using other TCP/IP stacks (e.g. FreeBSD) as well as for lwIP configurations.

Note: If lwIP is being configured to provide POSIX-style names for some socket support operations then the eCos package CYGPKG_IO_FILEIO should not normally be enabled in the eCos configuration at the same time, since care needs to be taken to avoid name-space clashes.

Documentation license for this page: eCosPro License