AR# 36574


12.1 EDK - How do I add additional parameter definitions for lwIP?


There are many options in the lwIP source code that are not supported in the default BSP and library generation through LibGen and MSS. I would like to use those lwIP features at my own risk. How do I turn them on in the EDK tool flow?


In order to support additional parameter definitions, both the MLD and Tcl files in the data folder under the lwIP source directory need to be modified.

  1. Copy the lwIP library from the installation area:

    to a sw_services directory in your project directory:
    < project >\sw_services

    or to a sw_services directory in your global repository:
    < Global_Repository >\< library >\sw_services
  2. If you copy the lwIP library into a global repository, be sure to set the global repository in XPS by selecting Edit > Preferences > Application and filling in the data entry field with the location of your global repository.
  3. Make modifications to the newly copied lwIP library files.

    • Edit the lwip130_v2_1_0.mld file

      BEGIN CATEGORY igmp_options
      PARAM name = lwip_igmp, desc = "Turn on lwIP IGMP?", type = bool, default = false, permit = none;

      The above code adds a new parameter name called lwip_igmp of type Boolean.
    • Edit the lwip130_v2_1_0.tcl file

      # IGMP options
      set lwip_igmp [expr [xget_value $libhandle "PARAMETER" "lwip_igmp"] == true]
      puts $lwipopts_fd "\#define LWIP_IGMP $lwip_igmp"
      puts $lwipopts_fd ""

      The above code sources the lwip_igmp option from the MSS defintion and write it into the lwipopts.h file.

      For more details on the syntax of the MLD file, refer to the Platform Specification Format Guide (psf_rm.pdf).
AR# 36574
日期 08/30/2012
状态 Active
Type 综合文章
People Also Viewed