| 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 /* Some configurations like priority etc comes from here */
36 #include "lpc43xx_dualcore_config.h"
37
38 /* Select NO_SYS based on OS or Non OS configuration */
39 #if (defined(OS_FREE_RTOS) || defined(OS_UCOS_III))
40 #define NO_SYS 0
41 #else
42 #define NO_SYS 1
43 #endif
44
45 /* Use LWIP timers */
46 #define NO_SYS_NO_TIMERS 0
47
48 #define LWIP_HTTPD_DYNAMIC_HEADERS 1
49
50 /* Need for memory protection */
51 #define SYS_LIGHTWEIGHT_PROT (NO_SYS == 0)
52
53 /* 32-bit alignment */
54 #define MEM_ALIGNMENT 4
55
56 /* pbuf buffers in pool. In zero-copy mode, these buffers are
57 located in peripheral RAM. In copied mode, they are located in
58 internal IRAM */
59 #define PBUF_POOL_SIZE 11
60
61 /* No padding needed */
62 #define ETH_PAD_SIZE 0
63
64 #define IP_SOF_BROADCAST 1
65 #define IP_SOF_BROADCAST_RECV 1
66
67 /* The ethernet FCS is performed in hardware. The IP, TCP, and UDP
68 CRCs still need to be done in hardware. */
69 #define CHECKSUM_GEN_IP 1
70 #define CHECKSUM_GEN_UDP 1
71 #define CHECKSUM_GEN_TCP 1
72 #define CHECKSUM_CHECK_IP 1
73 #define CHECKSUM_CHECK_UDP 1
74 #define CHECKSUM_CHECK_TCP 1
75 #define LWIP_CHECKSUM_ON_COPY 1
76
77 /* Use LWIP version of htonx() to allow generic functionality across
78 all platforms. If you are using the Cortex Mx devices, you might
79 be able to use the Cortex __rev instruction instead. */
80 #define LWIP_PLATFORM_BYTESWAP 0
81
82 /* Non-static memory, used with DMA pool */
83 #define MEM_SIZE (12 * 1024)
84
85 /* Raw interface not needed */
86 #define LWIP_RAW 1
87
88 /* DHCP is ok, UDP is required with DHCP */
89 #define LWIP_DHCP 1
90 #define LWIP_UDP 1
91
92 /* Hostname can be used */
93 #define LWIP_NETIF_HOSTNAME 1
94
95 #define LWIP_BROADCAST_PING 1
96
97 /* MSS should match the hardware packet size */
98 #define TCP_MSS 1460
99 #define TCP_SND_BUF (2 * TCP_MSS)
100
101 #define LWIP_SOCKET 0
102 #define LWIP_NETCONN (NO_SYS == 0)
103 #define MEMP_NUM_SYS_TIMEOUT 300
104
105 #define LWIP_STATS 0
106 #define LINK_STATS 0
107 #define LWIP_STATS_DISPLAY 0
108
109 /* There are more *_DEBUG options that can be selected.
110 See opts.h. Make sure that LWIP_DEBUG is defined when
111 building the code to use debug. */
112 #define TCP_DEBUG LWIP_DBG_OFF
113 #define ETHARP_DEBUG LWIP_DBG_OFF
114 #define PBUF_DEBUG LWIP_DBG_OFF
115 #define IP_DEBUG LWIP_DBG_OFF
116 #define TCPIP_DEBUG LWIP_DBG_OFF
117 #define DHCP_DEBUG LWIP_DBG_OFF
118 #define UDP_DEBUG LWIP_DBG_OFF
119
120 /* This define is custom for the LPC EMAC driver. Enabled it to
121 get debug messages for the driver. */
122 #define EMAC_DEBUG LWIP_DBG_OFF
123
124 #define DEFAULT_THREAD_PRIO (tskIDLE_PRIORITY + 1)
125 #define DEFAULT_THREAD_STACKSIZE (configMINIMAL_STACK_SIZE)
126 #define DEFAULT_ACCEPTMBOX_SIZE 6
127 #define DEFAULT_ACCEPTMBOX_SIZE 6
128 #define DEFAULT_TCP_RECVMBOX_SIZE 6
129 #define DEFAULT_UDP_RECVMBOX_SIZE 6
130
131 /* TCPIP thread must run at higher priority than MAC threads! */
132 #define TCPIP_THREAD_PRIO (DEFAULT_THREAD_PRIO + 2)
133 #define TCPIP_THREAD_STACKSIZE (configMINIMAL_STACK_SIZE + 256)
134 #define TCPIP_MBOX_SIZE 6
135
136 #define MEM_LIBC_MALLOC 1
137 #define MEMP_MEM_MALLOC 1
138
139 /* Required for malloc/free */
140 #include <stdlib.h>
141
142 #endif /* __LWIPOPTS_H_ */