Getting started with LwIP ¶
Folder structure ¶
The original LwIP folder structure is modified to add files needed by the STM32CubeMX tool for configuration and code generation.
src: LwIP stack source files.
api: Netconn and Socket LwIP API files (require RTOS).
apps: This folder holds a set of network applicative protocols.
core: LwIP core files: fundamental functions, data structures and protocols (IP, UDP, TCP, etc.).
include: header files for the other folders.
netif: generic management of network interfaces.
.config: CubeMX configuration UI and templates files
app_samples: application example (how to configure the interfaces, start LwIP, …)
interfaces: common files for implementation of Low-level interface between LwIP and hardware interfaces
Configuration options & files ¶
configuration file: lwipopts.h
|
lwipopts.h flag name |
Description |
|---|---|
|
NO_SYS |
Disable (NO_SYS=1) or enable (NO_SYS=0) RTOS support. Netconn and Socket APIs require RTOS support (NO_SYS=0). |
|
MEM_SIZE |
LwIP heap size. Used for transmit buffers allocation. |
|
PBUF_POOL_SIZE |
Number of buffers in the “PBUF” pool. Used for reception buffers. |
|
LWIP_IPV4 |
Enable Internet protocol version 4 (default) |
|
LWIP_TCP |
Enable TCP protocol |
|
LWIP_UDP |
Enable UDP protocol |
|
LWIP_ARP |
Address Resolution Protocol for IP and Ethernet addresses |
|
LWIP_SOCKET |
Enable BSD-style Socket API |
|
TCP_MSS |
TCP maximum segment size |
|
TCP_WND |
TCP window (at least 2 * TCP_MSS) |
|
MEMP_NUM_TCP_PCB |
The number of simultaneously active TCP connections |
LwIP APIs Description table ¶
|
LwIP API Functions | Link |
|
|---|---|
|
main page |
|
Warning
This page is currently under development and may be incomplete or subject to change.