/********************************************************************** * $Id$ lwipopts.h 2011-11-20 *//** * @file lwipopts.h * @brief LWIP option overrides * @version 1.0 * @date 20. Nov. 2011 * @author NXP MCU SW Application Team * * Copyright(C) 2011, NXP Semiconductor * All rights reserved. * *********************************************************************** * Software that is described herein is for illustrative purposes only * which provides customers with programming information regarding the * products. This software is supplied "AS IS" without any warranties. * NXP Semiconductors assumes no responsibility or liability for the * use of the software, conveys no license or title under any patent, * copyright, or mask work right to the product. NXP Semiconductors * reserves the right to make changes in the software without * notification. NXP Semiconductors also make no representation or * warranty that such application will be suitable for the specified * use without further testing or modification. **********************************************************************/ #ifndef __LWIP_USER_OPT_H__ #define __LWIP_USER_OPT_H__ //#warning "Included lwipopts.h!" //#include "FreeRTOSConfig.h" /** * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that * this option does not affect outgoing packet sizes, which can be controlled * via IP_FRAG. */ #define MEM_USE_POOLS 1 #define MEMP_USE_CUSTOM_POOLS 1 //#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 /** * MEM_SIZE: the size of the heap memory. If the application will send * a lot of data that needs to be copied, this should be set high. */ //#define MEM_SIZE (10*1024) #define MEM_SIZE (8) #define MIN_SIZE (8) #define IP_REASSEMBLY 0 /* Standalone build */ #define NO_SYS 0 /* Use LWIP timers */ #define NO_SYS_NO_TIMERS 0 /* Need for memory protection */ #define SYS_LIGHTWEIGHT_PROT 1 /* 32-bit alignment */ #define MEM_ALIGNMENT 4 /* pbuf buffers in pool. In zero-copy mode, these buffers are located in peripheral RAM. In copied mode, they are located in internal IRAM */ /* No padding needed */ #define ETH_PAD_SIZE 0 #define IP_SOF_BROADCAST 1 #define IP_SOF_BROADCAST_RECV 1 /* The ethernet FCS is performed in hardware. The IP, TCP, and UDP CRCs still need to be done in hardware. */ #define CHECKSUM_GEN_IP 1 #define CHECKSUM_GEN_UDP 1 #define CHECKSUM_GEN_TCP 1 #define CHECKSUM_CHECK_IP 1 #define CHECKSUM_CHECK_UDP 1 #define CHECKSUM_CHECK_TCP 1 #define LWIP_CHECKSUM_ON_COPY 1 #define TCP_CHECKSUM_ON_COPY_SANITY_CHECK 1 /* Use LWIP version of htonx() to allow generic functionality across all platforms. If you are using the Cortex Mx devices, you might be able to use the Cortex __rev instruction instead. */ #define LWIP_PLATFORM_BYTESWAP 0 /* Raw interface not needed */ #define LWIP_RAW 0 /* DHCP is ok, UDP is required with DHCP */ #define LWIP_DHCP 0 #define LWIP_UDP 1 #define ETHARP_SUPPORT_VLAN 1 #define LWIP_SO_RCVTIMEO 1 #define LWIP_SO_SNDTIMEO 1 /* Hostname can be used */ #define LWIP_NETIF_HOSTNAME 1 #define LWIP_BROADCAST_PING 1 //#define TCP_OVERSIZE 128 #define TCP_OVERSIZE 128 /* MSS should match the hardware packet size */ #define TCP_MSS 1460 #define TCP_SND_BUF (3 * TCP_MSS) #define TCP_WND (4 * TCP_MSS) #define LWIP_SOCKET 0 #define LWIP_NETCONN 4 #define MEMP_NUM_SYS_TIMEOUT 15 #define MEMP_NUM_TCP_PCB 30 #define MEMP_NUM_TCP_PCB_LISTEN 2 #define MEMP_NUM_TCP_SEG 20 #define MEMP_NUM_FRAG_PBUF 3 #define MEMP_NUM_TCPIP_MSG_API 10 #define MEMP_NUM_TCPIP_MSG_INPKT 10 #define MEMP_NUM_NETCONN 10 #define PBUF_POOL_SIZE 4 #define MEMP_NUM_PBUF 20 #define LWIP_STATS 1 #define LWIP_STATS_DISPLAY 1 #define TCP_STATS 0 #define UDP_STATS 0 #define ICMP_STATS 0 #define IGMP_STATS 0 #define IP_STATS 0 #define IPFRAG_STATS 0 #define ETHARP_STATS 0 #define LINK_STATS 0 #define MEM_STATS 1 #define MEMP_STATS 1 #define SYS_STATS 0 #define MEMP_OVERFLOW_CHECK 1 /* There are more *_DEBUG options that can be selected. See opts.h. Make sure that LWIP_DEBUG is defined when building the code to use debug. */ #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL #define MEM_DEBUG LWIP_DBG_OFF #define ETHARP_DEBUG LWIP_DBG_OFF #define PBUF_DEBUG LWIP_DBG_OFF #define IP_DEBUG LWIP_DBG_OFF #define TCPIP_DEBUG LWIP_DBG_ON #define DHCP_DEBUG LWIP_DBG_OFF #define UDP_DEBUG LWIP_DBG_OFF #define TCP_RST_DEBUG LWIP_DBG_OFF #define API_MSG_DEBUG LWIP_DBG_OFF #define LWIP_DEBUG LWIP_DBG_ON #define TCP_DEBUG LWIP_DBG_OFF #define TCP_INPUT_LIGHT_DEBUG LWIP_DBG_OFF #define HTTPD_DEBUG LWIP_DBG_ON //#define TCP_INPUT_DEBUG LWIP_DBG_ON #define TCP_OUTPUT_DEBUG LWIP_DBG_ON #define TCP_RTO_DEBUG LWIP_DBG_OFF #define TCP_CWND_DEBUG LWIP_DBG_OFF #define TCP_WND_DEBUG LWIP_DBG_OFF #define TCP_FR_DEBUG LWIP_DBG_OFF #define TCP_QLEN_DEBUG LWIP_DBG_OFF /* This define is custom for the LPC EMAC driver. Enabled it to get debug messages for the driver. */ #define UDP_LPC_EMAC LWIP_DBG_OFF //#define LWIP_DBG_TRACE LWIP_DBG_ON #define DEFAULT_THREAD_PRIO (0 + 2) #define DEFAULT_THREAD_STACKSIZE 400 // 1024 //(configMINIMAL_STACK_SIZE) #define DEFAULT_ACCEPTMBOX_SIZE 6 #define DEFAULT_ACCEPTMBOX_SIZE 6 #define DEFAULT_TCP_RECVMBOX_SIZE 6 #define DEFAULT_UDP_RECVMBOX_SIZE 6 #define TCPIP_THREAD_PRIO (DEFAULT_THREAD_PRIO + configMAX_PRIORITIES - 1) #define TCPIP_THREAD_STACKSIZE 1024 //(configMINIMAL_STACK_SIZE) // #define TCPIP_THREAD_STACKSIZE (configMINIMAL_STACK_SIZE) #define TCPIP_MBOX_SIZE 6 #endif /* __LWIP_USER_OPT_H__ */