| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
lwipopts.h
Go to the documentation of this file.
1 /*
2 * @brief LWIP build option override file
3 *
4 * @note
5 * Copyright(C) NXP Semiconductors, 2012
6 * All rights reserved.
7 *
8 * @par
9 * Software that is described herein is for illustrative purposes only
10 * which provides customers with programming information regarding the
11 * LPC products. This software is supplied "AS IS" without any warranties of
12 * any kind, and NXP Semiconductors and its licensor disclaim any and
13 * all warranties, express or implied, including all implied warranties of
14 * merchantability, fitness for a particular purpose and non-infringement of
15 * intellectual property rights. NXP Semiconductors assumes no responsibility
16 * or liability for the use of the software, conveys no license or rights under any
17 * patent, copyright, mask work right, or any other intellectual property rights in
18 * or to any products. NXP Semiconductors reserves the right to make changes
19 * in the software without notification. NXP Semiconductors also makes no
20 * representation or warranty that such application will be suitable for the
21 * specified use without further testing or modification.
22 *
23 * @par
24 * Permission to use, copy, modify, and distribute this software and its
25 * documentation is hereby granted, under NXP Semiconductors' and its
26 * licensor's relevant copyrights in the software, without fee, provided that it
27 * is used in conjunction with NXP Semiconductors microcontrollers. This
28 * copyright, permission, and disclaimer notice must appear in all copies of
29 * this code.
30 */
31
32 #ifndef __LWIPOPTS_H_
33 #define __LWIPOPTS_H_
34
35 /* RTOS build */
36 #define NO_SYS 0
37
38 /* Use LWIP timers */
39 #define NO_SYS_NO_TIMERS 0
40
41 /* Need for memory protection */
42 #define SYS_LIGHTWEIGHT_PROT 1
43
44 /* 32-bit alignment */
45 #define MEM_ALIGNMENT 4
46
47 /* pbuf buffers in pool. In zero-copy mode, these buffers are
48 located in peripheral RAM. In copied mode, they are located in
49 internal IRAM */
50 #define PBUF_POOL_SIZE 17
51
52 /* No padding needed */
53 #define ETH_PAD_SIZE 0
54
55 #define IP_SOF_BROADCAST 1
56 #define IP_SOF_BROADCAST_RECV 1
57
58 /* The ethernet FCS is performed in hardware. The IP, TCP, and UDP
59 CRCs still need to be done in hardware. */
60 #define CHECKSUM_GEN_IP 1
61 #define CHECKSUM_GEN_UDP 1
62 #define CHECKSUM_GEN_TCP 1
63 #define CHECKSUM_CHECK_IP 1
64 #define CHECKSUM_CHECK_UDP 1
65 #define CHECKSUM_CHECK_TCP 1
66 #define LWIP_CHECKSUM_ON_COPY 1
67
68 /* Use LWIP version of htonx() to allow generic functionality across
69 all platforms. If you are using the Cortex Mx devices, you might
70 be able to use the Cortex __rev instruction instead. */
71 #define LWIP_PLATFORM_BYTESWAP 0
72
73 /* Non-static memory, used with DMA pool */
74 #ifdef __CODE_RED
75 #define MEM_SIZE (12 * 1024)
76 #else
77 #define MEM_SIZE (24 * 1024)
78 #endif
79
80 /* Raw interface not needed */
81 #define LWIP_RAW 0
82
83 /* DHCP is ok, UDP is required with DHCP */
84 #define LWIP_DHCP 1
85 #define LWIP_UDP 1
86
87 /* Hostname can be used */
88 #define LWIP_NETIF_HOSTNAME 1
89
90 #define LWIP_BROADCAST_PING 1
91
92 /* MSS should match the hardware packet size */
93 #define TCP_MSS 1460
94 #define TCP_SND_BUF (2 * TCP_MSS)
95
96 #define LWIP_SOCKET 0
97 #define LWIP_NETCONN 1
98 #define MEMP_NUM_SYS_TIMEOUT 300
99
100 #define LWIP_STATS 0
101 #define LINK_STATS 0
102 #define LWIP_STATS_DISPLAY 0
103
104 /* There are more *_DEBUG options that can be selected.
105 See opts.h. Make sure that LWIP_DEBUG is defined when
106 building the code to use debug. */
107 #define TCP_DEBUG LWIP_DBG_OFF
108 #define ETHARP_DEBUG LWIP_DBG_OFF
109 #define PBUF_DEBUG LWIP_DBG_OFF
110 #define IP_DEBUG LWIP_DBG_OFF
111 #define TCPIP_DEBUG LWIP_DBG_OFF
112 #define DHCP_DEBUG LWIP_DBG_OFF
113 #define UDP_DEBUG LWIP_DBG_OFF
114
115 /* This define is custom for the LPC EMAC driver. Enabled it to
116 get debug messages for the driver. */
117 #define EMAC_DEBUG LWIP_DBG_OFF
118
119 #define DEFAULT_THREAD_PRIO (tskIDLE_PRIORITY + 1)
120 #ifdef __CODE_RED
121 #define DEFAULT_THREAD_STACKSIZE (512)
122 #else
123 #define DEFAULT_THREAD_STACKSIZE (128)
124 #endif
125 #define DEFAULT_ACCEPTMBOX_SIZE 6
126 #define DEFAULT_ACCEPTMBOX_SIZE 6
127 #define DEFAULT_TCP_RECVMBOX_SIZE 6
128 #define DEFAULT_UDP_RECVMBOX_SIZE 6
129
130 /* TCPIP thread must run at higher priority than MAC threads! */
131 #define TCPIP_THREAD_PRIO (DEFAULT_THREAD_PRIO + configMAX_PRIORITIES - 1)
132
133 #ifdef __CODE_RED
134 #define TCPIP_THREAD_STACKSIZE (512)
135 #else
136 #define TCPIP_THREAD_STACKSIZE (256)
137 #endif
138
139 #define TCPIP_MBOX_SIZE 6
140
141 #endif /* __LWIPOPTS_H_ */