Statistics
| Branch: | Tag: | Revision:

mongoose / examples / TM4C129 / ccs / Mongoose_TM4C129_BM / lwipopts.h @ eaef5bd1

History | View | Annotate | Download (18.6 KB)

1
/* clang-format off */
2
//*****************************************************************************
3
//
4
// lwipopts.h - Configuration file for lwIP
5
//
6
// Copyright (c) 2013-2016 Texas Instruments Incorporated.  All rights reserved.
7
// Software License Agreement
8
// 
9
// Texas Instruments (TI) is supplying this software for use solely and
10
// exclusively on TI's microcontroller products. The software is owned by
11
// TI and/or its suppliers, and is protected under applicable copyright
12
// laws. You may not combine this software with "viral" open-source
13
// software in order to form a larger program.
14
// 
15
// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
16
// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
17
// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18
// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
19
// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
20
// DAMAGES, FOR ANY REASON WHATSOEVER.
21
// 
22
// This is part of revision 2.1.3.156 of the EK-TM4C129EXL Firmware Package.
23
//
24
//*****************************************************************************
25
//
26
// NOTE:  This file has been derived from the lwIP/src/include/lwip/opt.h
27
// header file.
28
//
29
// For additional details, refer to the original "opt.h" file, and lwIP
30
// documentation.
31
//
32
//*****************************************************************************
33

    
34
#ifndef __LWIPOPTS_H__
35
#define __LWIPOPTS_H__
36

    
37
//*****************************************************************************
38
//
39
// ---------- Stellaris / lwIP Port Options ----------
40
//
41
//*****************************************************************************
42
#define HOST_TMR_INTERVAL               100         // default is 0
43
//#define DHCP_EXPIRE_TIMER_MSECS         (60 * 1000)
44
//#define LWIP_HTTPD_SSI                  1
45
//#define LWIP_HTTPD_CGI                  1
46
#define LWIP_HTTPD_DYNAMIC_HEADERS      1
47
//#define HTTPD_DEBUG                     LWIP_DBG_ON
48
#define EMAC_PHY_CONFIG (EMAC_PHY_TYPE_INTERNAL | EMAC_PHY_INT_MDIX_EN |      \
49
                         EMAC_PHY_AN_100B_T_FULL_DUPLEX)
50
#define PHY_PHYS_ADDR      0
51
#define NUM_TX_DESCRIPTORS 24
52
#define NUM_RX_DESCRIPTORS 8
53

    
54
//*****************************************************************************
55
//
56
// ---------- Platform specific locking ----------
57
//
58
//*****************************************************************************
59
#define SYS_LIGHTWEIGHT_PROT            1           // default is 0
60
#define NO_SYS                          1           // default is 0
61
//#define MEMCPY(dst,src,len)             memcpy(dst,src,len)
62
//#define SMEMCPY(dst,src,len)            memcpy(dst,src,len)
63

    
64
//*****************************************************************************
65
//
66
// ---------- Memory options ----------
67
//
68
//*****************************************************************************
69
//#define MEM_LIBC_MALLOC                 0
70
#define MEM_ALIGNMENT                     4
71
#define MEM_SIZE                          (64 * 1024)
72
//#define MEMP_OVERFLOW_CHECK             0
73
//#define MEMP_SANITY_CHECK               0
74
//#define MEM_USE_POOLS                   0
75
//#define MEMP_USE_CUSTOM_POOLS           0
76

    
77
//*****************************************************************************
78
//
79
// ---------- Internal Memory Pool Sizes ----------
80
//
81
//*****************************************************************************
82
#define MEMP_NUM_PBUF                     48    // Default 16
83
//#define MEMP_NUM_RAW_PCB                4
84
//#define MEMP_NUM_UDP_PCB                4
85
#define MEMP_NUM_TCP_PCB                  16    // Default 5
86
//#define MEMP_NUM_TCP_PCB_LISTEN         8
87
//#define MEMP_NUM_TCP_SEG                16
88
//#define MEMP_NUM_REASSDATA              5
89
//#define MEMP_NUM_ARP_QUEUE              30
90
//#define MEMP_NUM_IGMP_GROUP             8
91
#define MEMP_NUM_SYS_TIMEOUT              8
92
//#define MEMP_NUM_NETBUF                 2
93
//#define MEMP_NUM_NETCONN                4
94
//#define MEMP_NUM_TCPIP_MSG_API          8
95
//#define MEMP_NUM_TCPIP_MSG_INPKT        8
96
#define PBUF_POOL_SIZE                    48    // Default 16
97

    
98
//*****************************************************************************
99
//
100
// ---------- ARP options ----------
101
//
102
//*****************************************************************************
103
//#define LWIP_ARP                        1
104
//#define ARP_TABLE_SIZE                  10
105
//#define ARP_QUEUEING                    1
106
//#define ETHARP_TRUST_IP_MAC             1
107

    
108
//*****************************************************************************
109
//
110
// ---------- IP options ----------
111
//
112
//*****************************************************************************
113
//#define IP_FORWARD                      0
114
//#define IP_OPTIONS_ALLOWED              1
115
#define IP_REASSEMBLY                   0           // default is 1
116
#define IP_FRAG                         0           // default is 1
117
//#define IP_REASS_MAXAGE                 3
118
//#define IP_REASS_MAX_PBUFS              10
119
//#define IP_FRAG_USES_STATIC_BUF         1
120
//#define IP_FRAG_MAX_MTU                 1500
121
//#define IP_DEFAULT_TTL                  255
122

    
123
//*****************************************************************************
124
//
125
// ---------- ICMP options ----------
126
//
127
//*****************************************************************************
128
//#define LWIP_ICMP                       1
129
//#define ICMP_TTL                       (IP_DEFAULT_TTL)
130

    
131
//*****************************************************************************
132
//
133
// ---------- RAW options ----------
134
//
135
//*****************************************************************************
136
//#define LWIP_RAW                        1
137
//#define RAW_TTL                        (IP_DEFAULT_TTL)
138

    
139
//*****************************************************************************
140
//
141
// ---------- DHCP options ----------
142
//
143
//*****************************************************************************
144
#define LWIP_DHCP                       1           // default is 0
145
//#define DHCP_DOES_ARP_CHECK             ((LWIP_DHCP) && (LWIP_ARP))
146

    
147
//*****************************************************************************
148
//
149
// ---------- UPNP options ----------
150
//
151
//*****************************************************************************
152
//#define LWIP_UPNP                       0
153

    
154
//*****************************************************************************
155
//
156
// ---------- PTPD options ----------
157
//
158
//*****************************************************************************
159
//#define LWIP_PTPD                       0
160

    
161
//*****************************************************************************
162
//
163
// ---------- AUTOIP options ----------
164
//
165
//*****************************************************************************
166
#define LWIP_AUTOIP                     1           // default is 0
167
#define LWIP_DHCP_AUTOIP_COOP           ((LWIP_DHCP) && (LWIP_AUTOIP))
168
                                                    // default is 0
169
#define LWIP_DHCP_AUTOIP_COOP_TRIES     5           // default is 9
170

    
171
//*****************************************************************************
172
//
173
// ---------- SNMP options ----------
174
//
175
//*****************************************************************************
176
//#define LWIP_SNMP                       0
177
//#define SNMP_CONCURRENT_REQUESTS        1
178
//#define SNMP_TRAP_DESTINATIONS          1
179
//#define SNMP_PRIVATE_MIB                0
180
//#define SNMP_SAFE_REQUESTS              1
181

    
182
//*****************************************************************************
183
//
184
// ---------- IGMP options ----------
185
//
186
//*****************************************************************************
187
//#define LWIP_IGMP                       0
188

    
189
//*****************************************************************************
190
//
191
// ---------- DNS options -----------
192
//
193
//*****************************************************************************
194
//#define LWIP_DNS                        0
195
//#define DNS_TABLE_SIZE                  4
196
//#define DNS_MAX_NAME_LENGTH             256
197
//#define DNS_MAX_SERVERS                 2
198
//#define DNS_DOES_NAME_CHECK             1
199
//#define DNS_USES_STATIC_BUF             1
200
//#define DNS_MSG_SIZE                    512
201

    
202
//*****************************************************************************
203
//
204
// ---------- UDP options ----------
205
//
206
//*****************************************************************************
207
//#define LWIP_UDP                        1
208
//#define LWIP_UDPLITE                    0
209
//#define UDP_TTL                         (IP_DEFAULT_TTL)
210

    
211
//*****************************************************************************
212
//
213
// ---------- TCP options ----------
214
//
215
//*****************************************************************************
216
#define LWIP_TCP                        1
217
//#define TCP_TTL                         (IP_DEFAULT_TTL)
218
#define TCP_WND                         4096   // default is 2048
219
//#define TCP_MAXRTX                      12
220
//#define TCP_SYNMAXRTX                   6
221
//#define TCP_QUEUE_OOSEQ                 1
222
#define TCP_MSS                        1500        // default is 128
223
//#define TCP_CALCULATE_EFF_SEND_MSS      1
224
#define TCP_SND_BUF                     (4 * TCP_MSS)
225
                                                    // default is 256, was 6 *
226
//#define TCP_SND_QUEUELEN                (4 * (TCP_SND_BUF/TCP_MSS))
227
//#define TCP_SNDLOWAT                    (TCP_SND_BUF/2)
228
//#define TCP_LISTEN_BACKLOG              0
229
//#define TCP_DEFAULT_LISTEN_BACKLOG      0xff
230

    
231
//*****************************************************************************
232
//
233
// ---------- API options ----------
234
//
235
//*****************************************************************************
236
//#define LWIP_EVENT_API                  0
237
//#define LWIP_CALLBACK_API               1
238

    
239
//*****************************************************************************
240
//
241
// ---------- Pbuf options ----------
242
//
243
//*****************************************************************************
244
#define PBUF_LINK_HLEN                  16          // default is 14
245
#define PBUF_POOL_BUFSIZE               512
246
                              // PBUF_POOL_BUFSIZE default is
247
                              // LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
248
#define ETH_PAD_SIZE                    0           // default is 0
249

    
250
//*****************************************************************************
251
//
252
// ---------- Network Interfaces options ----------
253
//
254
//*****************************************************************************
255
//#define LWIP_NETIF_HOSTNAME             0
256
//#define LWIP_NETIF_API                  0
257
//#define LWIP_NETIF_STATUS_CALLBACK      0
258
//#define LWIP_NETIF_LINK_CALLBACK        0
259
//#define LWIP_NETIF_HWADDRHINT           0
260

    
261
//*****************************************************************************
262
//
263
// ---------- LOOPIF options ----------
264
//
265
//*****************************************************************************
266
//#define LWIP_HAVE_LOOPIF                0
267
//#define LWIP_LOOPIF_MULTITHREADING      1
268

    
269
//*****************************************************************************
270
//
271
// ---------- Thread options ----------
272
//
273
//*****************************************************************************
274
//#define TCPIP_THREAD_NAME              "tcpip_thread"
275
//#define TCPIP_THREAD_STACKSIZE          0
276
//#define TCPIP_THREAD_PRIO               1
277
//#define TCPIP_MBOX_SIZE                 0
278
//#define SLIPIF_THREAD_NAME             "slipif_loop"
279
//#define SLIPIF_THREAD_STACKSIZE         0
280
//#define SLIPIF_THREAD_PRIO              1
281
//#define PPP_THREAD_NAME                "pppMain"
282
//#define PPP_THREAD_STACKSIZE            0
283
//#define PPP_THREAD_PRIO                 1
284
//#define DEFAULT_THREAD_NAME            "lwIP"
285
//#define DEFAULT_THREAD_STACKSIZE        0
286
//#define DEFAULT_THREAD_PRIO             1
287
//#define DEFAULT_RAW_RECVMBOX_SIZE       0
288
//#define DEFAULT_UDP_RECVMBOX_SIZE       0
289
//#define DEFAULT_TCP_RECVMBOX_SIZE       0
290
//#define DEFAULT_ACCEPTMBOX_SIZE         0
291

    
292
//*****************************************************************************
293
//
294
// ---------- Sequential layer options ----------
295
//
296
//*****************************************************************************
297
//#define LWIP_TCPIP_CORE_LOCKING         0
298
#define LWIP_NETCONN                    0           // default is 1
299

    
300
//*****************************************************************************
301
//
302
// ---------- Socket Options ----------
303
//
304
//*****************************************************************************
305
#define LWIP_SOCKET                     0           // default is 1
306
//#define LWIP_COMPAT_SOCKETS             1
307
//#define LWIP_POSIX_SOCKETS_IO_NAMES     1
308
#define LWIP_TCP_KEEPALIVE              1
309
//#define LWIP_SO_RCVTIMEO                0
310
//#define LWIP_SO_RCVBUF                  0
311
//#define SO_REUSE                        0
312

    
313
//*****************************************************************************
314
//
315
// ---------- Statistics options ----------
316
//
317
//*****************************************************************************
318
//#define LWIP_STATS                      1
319
//#define LWIP_STATS_DISPLAY              0
320
//#define LINK_STATS                      1
321
//#define ETHARP_STATS                    (LWIP_ARP)
322
//#define IP_STATS                        1
323
//#define IPFRAG_STATS                    (IP_REASSEMBLY || IP_FRAG)
324
//#define ICMP_STATS                      1
325
//#define IGMP_STATS                      (LWIP_IGMP)
326
//#define UDP_STATS                       (LWIP_UDP)
327
//#define TCP_STATS                       (LWIP_TCP)
328
//#define MEM_STATS                       1
329
//#define MEMP_STATS                      1
330
//#define SYS_STATS                       1
331

    
332
//*****************************************************************************
333
//
334
// ---------- PPP options ----------
335
//
336
//*****************************************************************************
337
//#define PPP_SUPPORT                     0
338
//#define PPPOE_SUPPORT                   0
339
//#define PPPOS_SUPPORT                   PPP_SUPPORT
340

    
341
#if PPP_SUPPORT
342
//#define NUM_PPP                         1
343
//#define PAP_SUPPORT                     0
344
//#define CHAP_SUPPORT                    0
345
//#define MSCHAP_SUPPORT                  0
346
//#define CBCP_SUPPORT                    0
347
//#define CCP_SUPPORT                     0
348
//#define VJ_SUPPORT                      0
349
//#define MD5_SUPPORT                     0
350
//#define FSM_DEFTIMEOUT                  6
351
//#define FSM_DEFMAXTERMREQS              2
352
//#define FSM_DEFMAXCONFREQS              10
353
//#define FSM_DEFMAXNAKLOOPS              5
354
//#define UPAP_DEFTIMEOUT                 6
355
//#define UPAP_DEFREQTIME                 30
356
//#define CHAP_DEFTIMEOUT                 6
357
//#define CHAP_DEFTRANSMITS               10
358
//#define LCP_ECHOINTERVAL                0
359
//#define LCP_MAXECHOFAILS                3
360
//#define PPP_MAXIDLEFLAG                 100
361

    
362
//#define PPP_MAXMTU                      1500
363
//#define PPP_DEFMRU                      296
364
#endif
365

    
366
//*****************************************************************************
367
//
368
// ---------- checksum options ----------
369
//
370
//*****************************************************************************
371
#define CHECKSUM_GEN_IP                 0
372
#define CHECKSUM_GEN_ICMP               0
373
#define CHECKSUM_GEN_UDP                0
374
#define CHECKSUM_GEN_TCP                0
375
#define CHECKSUM_CHECK_IP               0
376
#define CHECKSUM_CHECK_UDP              0
377
#define CHECKSUM_CHECK_TCP              0
378

    
379
//*****************************************************************************
380
//
381
// ---------- Debugging options ----------
382
//
383
//*****************************************************************************
384
#if 0
385
#define U8_F "c"
386
#define S8_F "c"
387
#define X8_F "x"
388
#define U16_F "u"
389
#define S16_F "d"
390
#define X16_F "x"
391
#define U32_F "u"
392
#define S32_F "d"
393
#define X32_F "x"
394
extern void UARTprintf(const char *pcString, ...);
395
#define LWIP_DEBUG
396
#endif
397

    
398
//#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_OFF
399
#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_OFF
400
//#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_WARNING
401
//#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_SERIOUS
402
//#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_SEVERE
403

    
404
//#define LWIP_DBG_TYPES_ON               LWIP_DBG_ON
405
#define LWIP_DBG_TYPES_ON               (LWIP_DBG_ON|LWIP_DBG_TRACE|          \
406
                                         LWIP_DBG_STATE|LWIP_DBG_FRESH)
407

    
408
//#define ETHARP_DEBUG                    LWIP_DBG_ON     // default is OFF
409
//#define NETIF_DEBUG                     LWIP_DBG_ON     // default is OFF
410
//#define PBUF_DEBUG                      LWIP_DBG_OFF
411
//#define API_LIB_DEBUG                   LWIP_DBG_OFF
412
//#define API_MSG_DEBUG                   LWIP_DBG_OFF
413
//#define SOCKETS_DEBUG                   LWIP_DBG_OFF
414
//#define ICMP_DEBUG                      LWIP_DBG_OFF
415
//#define IGMP_DEBUG                      LWIP_DBG_OFF
416
//#define INET_DEBUG                      LWIP_DBG_OFF
417
//#define IP_DEBUG                        LWIP_DBG_ON     // default is OFF
418
//#define IP_REASS_DEBUG                  LWIP_DBG_OFF
419
//#define RAW_DEBUG                       LWIP_DBG_OFF
420
//#define MEM_DEBUG                       LWIP_DBG_OFF
421
//#define MEMP_DEBUG                      LWIP_DBG_OFF
422
//#define SYS_DEBUG                       LWIP_DBG_OFF
423
//#define TCP_DEBUG                       LWIP_DBG_OFF
424
//#define TCP_INPUT_DEBUG                 LWIP_DBG_OFF
425
//#define TCP_FR_DEBUG                    LWIP_DBG_OFF
426
//#define TCP_RTO_DEBUG                   LWIP_DBG_OFF
427
//#define TCP_CWND_DEBUG                  LWIP_DBG_OFF
428
//#define TCP_WND_DEBUG                   LWIP_DBG_OFF
429
//#define TCP_OUTPUT_DEBUG                LWIP_DBG_OFF
430
//#define TCP_RST_DEBUG                   LWIP_DBG_OFF
431
//#define TCP_QLEN_DEBUG                  LWIP_DBG_OFF
432
//#define UDP_DEBUG                       LWIP_DBG_ON     // default is OFF
433
//#define TCPIP_DEBUG                     LWIP_DBG_OFF
434
//#define PPP_DEBUG                       LWIP_DBG_OFF
435
//#define SLIP_DEBUG                      LWIP_DBG_OFF
436
//#define DHCP_DEBUG                      LWIP_DBG_ON     // default is OFF
437
//#define AUTOIP_DEBUG                    LWIP_DBG_OFF
438
//#define SNMP_MSG_DEBUG                  LWIP_DBG_OFF
439
//#define SNMP_MIB_DEBUG                  LWIP_DBG_OFF
440
//#define DNS_DEBUG                       LWIP_DBG_OFF
441

    
442
#endif /* __LWIPOPTS_H__ */