this repository aim to make the official ST DISCO F746NG demo from STM32Cube_FW_F7_V1.2.0 working on mbed.
Dependencies: BSP_DISCO_F746NG_patch mbed-rtos mbed
Config/lwipopts.h@0:c00e6c923941, 2015-11-02 (annotated)
- Committer:
- NirT
- Date:
- Mon Nov 02 23:38:08 2015 +0000
- Revision:
- 0:c00e6c923941
Error: Incomplete type is not allowed in "patch/LwIP/src/include/lwip/dhcp.h", Line: 83, Col: 4; ; and more like this.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
NirT | 0:c00e6c923941 | 1 | /** |
NirT | 0:c00e6c923941 | 2 | ****************************************************************************** |
NirT | 0:c00e6c923941 | 3 | * @file LwIP/LwIP_HTTP_Server_Netconn_RTOS/Inc/lwipopts.h |
NirT | 0:c00e6c923941 | 4 | * @author MCD Application Team |
NirT | 0:c00e6c923941 | 5 | * @version V1.1.0 |
NirT | 0:c00e6c923941 | 6 | * @date 21-September-2015 |
NirT | 0:c00e6c923941 | 7 | * @brief lwIP Options Configuration. |
NirT | 0:c00e6c923941 | 8 | ****************************************************************************** |
NirT | 0:c00e6c923941 | 9 | * @attention |
NirT | 0:c00e6c923941 | 10 | * |
NirT | 0:c00e6c923941 | 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
NirT | 0:c00e6c923941 | 12 | * |
NirT | 0:c00e6c923941 | 13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); |
NirT | 0:c00e6c923941 | 14 | * You may not use this file except in compliance with the License. |
NirT | 0:c00e6c923941 | 15 | * You may obtain a copy of the License at: |
NirT | 0:c00e6c923941 | 16 | * |
NirT | 0:c00e6c923941 | 17 | * http://www.st.com/software_license_agreement_liberty_v2 |
NirT | 0:c00e6c923941 | 18 | * |
NirT | 0:c00e6c923941 | 19 | * Unless required by applicable law or agreed to in writing, software |
NirT | 0:c00e6c923941 | 20 | * distributed under the License is distributed on an "AS IS" BASIS, |
NirT | 0:c00e6c923941 | 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
NirT | 0:c00e6c923941 | 22 | * See the License for the specific language governing permissions and |
NirT | 0:c00e6c923941 | 23 | * limitations under the License. |
NirT | 0:c00e6c923941 | 24 | * |
NirT | 0:c00e6c923941 | 25 | ****************************************************************************** |
NirT | 0:c00e6c923941 | 26 | */ |
NirT | 0:c00e6c923941 | 27 | |
NirT | 0:c00e6c923941 | 28 | #ifndef __LWIPOPTS_H__ |
NirT | 0:c00e6c923941 | 29 | #define __LWIPOPTS_H__ |
NirT | 0:c00e6c923941 | 30 | |
NirT | 0:c00e6c923941 | 31 | /** |
NirT | 0:c00e6c923941 | 32 | * SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain |
NirT | 0:c00e6c923941 | 33 | * critical regions during buffer allocation, deallocation and memory |
NirT | 0:c00e6c923941 | 34 | * allocation and deallocation. |
NirT | 0:c00e6c923941 | 35 | */ |
NirT | 0:c00e6c923941 | 36 | #define SYS_LIGHTWEIGHT_PROT 0 |
NirT | 0:c00e6c923941 | 37 | |
NirT | 0:c00e6c923941 | 38 | #define ETHARP_TRUST_IP_MAC 0 |
NirT | 0:c00e6c923941 | 39 | #define IP_REASSEMBLY 0 |
NirT | 0:c00e6c923941 | 40 | #define IP_FRAG 0 |
NirT | 0:c00e6c923941 | 41 | #define ARP_QUEUEING 0 |
NirT | 0:c00e6c923941 | 42 | |
NirT | 0:c00e6c923941 | 43 | /** |
NirT | 0:c00e6c923941 | 44 | * NO_SYS==1: Provides VERY minimal functionality. Otherwise, |
NirT | 0:c00e6c923941 | 45 | * use lwIP facilities. |
NirT | 0:c00e6c923941 | 46 | */ |
NirT | 0:c00e6c923941 | 47 | #define NO_SYS 0 |
NirT | 0:c00e6c923941 | 48 | |
NirT | 0:c00e6c923941 | 49 | /* ---------- Memory options ---------- */ |
NirT | 0:c00e6c923941 | 50 | /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which |
NirT | 0:c00e6c923941 | 51 | lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2 |
NirT | 0:c00e6c923941 | 52 | byte alignment -> define MEM_ALIGNMENT to 2. */ |
NirT | 0:c00e6c923941 | 53 | #define MEM_ALIGNMENT 4 |
NirT | 0:c00e6c923941 | 54 | |
NirT | 0:c00e6c923941 | 55 | /* MEM_SIZE: the size of the heap memory. If the application will send |
NirT | 0:c00e6c923941 | 56 | a lot of data that needs to be copied, this should be set high. */ |
NirT | 0:c00e6c923941 | 57 | #define MEM_SIZE (5*1024) |
NirT | 0:c00e6c923941 | 58 | |
NirT | 0:c00e6c923941 | 59 | /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application |
NirT | 0:c00e6c923941 | 60 | sends a lot of data out of ROM (or other static memory), this |
NirT | 0:c00e6c923941 | 61 | should be set high. */ |
NirT | 0:c00e6c923941 | 62 | #define MEMP_NUM_PBUF 100 |
NirT | 0:c00e6c923941 | 63 | /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One |
NirT | 0:c00e6c923941 | 64 | per active UDP "connection". */ |
NirT | 0:c00e6c923941 | 65 | #define MEMP_NUM_UDP_PCB 6 |
NirT | 0:c00e6c923941 | 66 | /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP |
NirT | 0:c00e6c923941 | 67 | connections. */ |
NirT | 0:c00e6c923941 | 68 | #define MEMP_NUM_TCP_PCB 10 |
NirT | 0:c00e6c923941 | 69 | /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP |
NirT | 0:c00e6c923941 | 70 | connections. */ |
NirT | 0:c00e6c923941 | 71 | #define MEMP_NUM_TCP_PCB_LISTEN 5 |
NirT | 0:c00e6c923941 | 72 | /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP |
NirT | 0:c00e6c923941 | 73 | segments. */ |
NirT | 0:c00e6c923941 | 74 | #define MEMP_NUM_TCP_SEG 12 |
NirT | 0:c00e6c923941 | 75 | /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active |
NirT | 0:c00e6c923941 | 76 | timeouts. */ |
NirT | 0:c00e6c923941 | 77 | #define MEMP_NUM_SYS_TIMEOUT 10 |
NirT | 0:c00e6c923941 | 78 | |
NirT | 0:c00e6c923941 | 79 | |
NirT | 0:c00e6c923941 | 80 | /* ---------- Pbuf options ---------- */ |
NirT | 0:c00e6c923941 | 81 | /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ |
NirT | 0:c00e6c923941 | 82 | #define PBUF_POOL_SIZE 10 |
NirT | 0:c00e6c923941 | 83 | |
NirT | 0:c00e6c923941 | 84 | /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ |
NirT | 0:c00e6c923941 | 85 | #define PBUF_POOL_BUFSIZE 1524 |
NirT | 0:c00e6c923941 | 86 | |
NirT | 0:c00e6c923941 | 87 | |
NirT | 0:c00e6c923941 | 88 | /* ---------- TCP options ---------- */ |
NirT | 0:c00e6c923941 | 89 | #define LWIP_TCP 1 |
NirT | 0:c00e6c923941 | 90 | #define TCP_TTL 255 |
NirT | 0:c00e6c923941 | 91 | |
NirT | 0:c00e6c923941 | 92 | /* Controls if TCP should queue segments that arrive out of |
NirT | 0:c00e6c923941 | 93 | order. Define to 0 if your device is low on memory. */ |
NirT | 0:c00e6c923941 | 94 | #define TCP_QUEUE_OOSEQ 0 |
NirT | 0:c00e6c923941 | 95 | |
NirT | 0:c00e6c923941 | 96 | /* TCP Maximum segment size. */ |
NirT | 0:c00e6c923941 | 97 | #define TCP_MSS (1500 - 40) /* TCP_MSS = (Ethernet MTU - IP header size - TCP header size) */ |
NirT | 0:c00e6c923941 | 98 | |
NirT | 0:c00e6c923941 | 99 | /* TCP sender buffer space (bytes). */ |
NirT | 0:c00e6c923941 | 100 | #define TCP_SND_BUF (4*TCP_MSS) |
NirT | 0:c00e6c923941 | 101 | |
NirT | 0:c00e6c923941 | 102 | /* TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least |
NirT | 0:c00e6c923941 | 103 | as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. */ |
NirT | 0:c00e6c923941 | 104 | |
NirT | 0:c00e6c923941 | 105 | #define TCP_SND_QUEUELEN (2* TCP_SND_BUF/TCP_MSS) |
NirT | 0:c00e6c923941 | 106 | |
NirT | 0:c00e6c923941 | 107 | /* TCP receive window. */ |
NirT | 0:c00e6c923941 | 108 | #define TCP_WND (2*TCP_MSS) |
NirT | 0:c00e6c923941 | 109 | |
NirT | 0:c00e6c923941 | 110 | |
NirT | 0:c00e6c923941 | 111 | /* ---------- ICMP options ---------- */ |
NirT | 0:c00e6c923941 | 112 | #define LWIP_ICMP 1 |
NirT | 0:c00e6c923941 | 113 | |
NirT | 0:c00e6c923941 | 114 | |
NirT | 0:c00e6c923941 | 115 | /* ---------- DHCP options ---------- */ |
NirT | 0:c00e6c923941 | 116 | /* Define LWIP_DHCP to 1 if you want DHCP configuration of |
NirT | 0:c00e6c923941 | 117 | interfaces. DHCP is not implemented in lwIP 0.5.1, however, so |
NirT | 0:c00e6c923941 | 118 | turning this on does currently not work. */ |
NirT | 0:c00e6c923941 | 119 | #define LWIP_DHCP 1 |
NirT | 0:c00e6c923941 | 120 | |
NirT | 0:c00e6c923941 | 121 | |
NirT | 0:c00e6c923941 | 122 | /* ---------- UDP options ---------- */ |
NirT | 0:c00e6c923941 | 123 | #define LWIP_UDP 1 |
NirT | 0:c00e6c923941 | 124 | #define UDP_TTL 255 |
NirT | 0:c00e6c923941 | 125 | |
NirT | 0:c00e6c923941 | 126 | |
NirT | 0:c00e6c923941 | 127 | /* ---------- Statistics options ---------- */ |
NirT | 0:c00e6c923941 | 128 | #define LWIP_STATS 0 |
NirT | 0:c00e6c923941 | 129 | #define LWIP_PROVIDE_ERRNO 1 |
NirT | 0:c00e6c923941 | 130 | |
NirT | 0:c00e6c923941 | 131 | /* ---------- link callback options ---------- */ |
NirT | 0:c00e6c923941 | 132 | /* LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface |
NirT | 0:c00e6c923941 | 133 | * whenever the link changes (i.e., link down) |
NirT | 0:c00e6c923941 | 134 | */ |
NirT | 0:c00e6c923941 | 135 | #define LWIP_NETIF_LINK_CALLBACK 1 |
NirT | 0:c00e6c923941 | 136 | |
NirT | 0:c00e6c923941 | 137 | /* |
NirT | 0:c00e6c923941 | 138 | -------------------------------------- |
NirT | 0:c00e6c923941 | 139 | ---------- Checksum options ---------- |
NirT | 0:c00e6c923941 | 140 | -------------------------------------- |
NirT | 0:c00e6c923941 | 141 | */ |
NirT | 0:c00e6c923941 | 142 | |
NirT | 0:c00e6c923941 | 143 | /* |
NirT | 0:c00e6c923941 | 144 | The STM32F4x7 allows computing and verifying the IP, UDP, TCP and ICMP checksums by hardware: |
NirT | 0:c00e6c923941 | 145 | - To use this feature let the following define uncommented. |
NirT | 0:c00e6c923941 | 146 | - To disable it and process by CPU comment the the checksum. |
NirT | 0:c00e6c923941 | 147 | */ |
NirT | 0:c00e6c923941 | 148 | #define CHECKSUM_BY_HARDWARE |
NirT | 0:c00e6c923941 | 149 | |
NirT | 0:c00e6c923941 | 150 | |
NirT | 0:c00e6c923941 | 151 | #ifdef CHECKSUM_BY_HARDWARE |
NirT | 0:c00e6c923941 | 152 | /* CHECKSUM_GEN_IP==0: Generate checksums by hardware for outgoing IP packets.*/ |
NirT | 0:c00e6c923941 | 153 | #define CHECKSUM_GEN_IP 0 |
NirT | 0:c00e6c923941 | 154 | /* CHECKSUM_GEN_UDP==0: Generate checksums by hardware for outgoing UDP packets.*/ |
NirT | 0:c00e6c923941 | 155 | #define CHECKSUM_GEN_UDP 0 |
NirT | 0:c00e6c923941 | 156 | /* CHECKSUM_GEN_TCP==0: Generate checksums by hardware for outgoing TCP packets.*/ |
NirT | 0:c00e6c923941 | 157 | #define CHECKSUM_GEN_TCP 0 |
NirT | 0:c00e6c923941 | 158 | /* CHECKSUM_CHECK_IP==0: Check checksums by hardware for incoming IP packets.*/ |
NirT | 0:c00e6c923941 | 159 | #define CHECKSUM_CHECK_IP 0 |
NirT | 0:c00e6c923941 | 160 | /* CHECKSUM_CHECK_UDP==0: Check checksums by hardware for incoming UDP packets.*/ |
NirT | 0:c00e6c923941 | 161 | #define CHECKSUM_CHECK_UDP 0 |
NirT | 0:c00e6c923941 | 162 | /* CHECKSUM_CHECK_TCP==0: Check checksums by hardware for incoming TCP packets.*/ |
NirT | 0:c00e6c923941 | 163 | #define CHECKSUM_CHECK_TCP 0 |
NirT | 0:c00e6c923941 | 164 | /* CHECKSUM_CHECK_ICMP==0: Check checksums by hardware for incoming ICMP packets.*/ |
NirT | 0:c00e6c923941 | 165 | #define CHECKSUM_GEN_ICMP 0 |
NirT | 0:c00e6c923941 | 166 | #else |
NirT | 0:c00e6c923941 | 167 | /* CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.*/ |
NirT | 0:c00e6c923941 | 168 | #define CHECKSUM_GEN_IP 1 |
NirT | 0:c00e6c923941 | 169 | /* CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.*/ |
NirT | 0:c00e6c923941 | 170 | #define CHECKSUM_GEN_UDP 1 |
NirT | 0:c00e6c923941 | 171 | /* CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.*/ |
NirT | 0:c00e6c923941 | 172 | #define CHECKSUM_GEN_TCP 1 |
NirT | 0:c00e6c923941 | 173 | /* CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.*/ |
NirT | 0:c00e6c923941 | 174 | #define CHECKSUM_CHECK_IP 1 |
NirT | 0:c00e6c923941 | 175 | /* CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.*/ |
NirT | 0:c00e6c923941 | 176 | #define CHECKSUM_CHECK_UDP 1 |
NirT | 0:c00e6c923941 | 177 | /* CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.*/ |
NirT | 0:c00e6c923941 | 178 | #define CHECKSUM_CHECK_TCP 1 |
NirT | 0:c00e6c923941 | 179 | /* CHECKSUM_CHECK_ICMP==1: Check checksums by hardware for incoming ICMP packets.*/ |
NirT | 0:c00e6c923941 | 180 | #define CHECKSUM_GEN_ICMP 1 |
NirT | 0:c00e6c923941 | 181 | #endif |
NirT | 0:c00e6c923941 | 182 | |
NirT | 0:c00e6c923941 | 183 | |
NirT | 0:c00e6c923941 | 184 | /* |
NirT | 0:c00e6c923941 | 185 | ---------------------------------------------- |
NirT | 0:c00e6c923941 | 186 | ---------- Sequential layer options ---------- |
NirT | 0:c00e6c923941 | 187 | ---------------------------------------------- |
NirT | 0:c00e6c923941 | 188 | */ |
NirT | 0:c00e6c923941 | 189 | /** |
NirT | 0:c00e6c923941 | 190 | * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) |
NirT | 0:c00e6c923941 | 191 | */ |
NirT | 0:c00e6c923941 | 192 | #define LWIP_NETCONN 1 |
NirT | 0:c00e6c923941 | 193 | |
NirT | 0:c00e6c923941 | 194 | /* |
NirT | 0:c00e6c923941 | 195 | ------------------------------------ |
NirT | 0:c00e6c923941 | 196 | ---------- Socket options ---------- |
NirT | 0:c00e6c923941 | 197 | ------------------------------------ |
NirT | 0:c00e6c923941 | 198 | */ |
NirT | 0:c00e6c923941 | 199 | /** |
NirT | 0:c00e6c923941 | 200 | * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) |
NirT | 0:c00e6c923941 | 201 | */ |
NirT | 0:c00e6c923941 | 202 | #define LWIP_SOCKET 1 |
NirT | 0:c00e6c923941 | 203 | |
NirT | 0:c00e6c923941 | 204 | /* |
NirT | 0:c00e6c923941 | 205 | ----------------------------------- |
NirT | 0:c00e6c923941 | 206 | ---------- DEBUG options ---------- |
NirT | 0:c00e6c923941 | 207 | ----------------------------------- |
NirT | 0:c00e6c923941 | 208 | */ |
NirT | 0:c00e6c923941 | 209 | |
NirT | 0:c00e6c923941 | 210 | #define LWIP_DEBUG 0 |
NirT | 0:c00e6c923941 | 211 | |
NirT | 0:c00e6c923941 | 212 | |
NirT | 0:c00e6c923941 | 213 | /* |
NirT | 0:c00e6c923941 | 214 | --------------------------------- |
NirT | 0:c00e6c923941 | 215 | ---------- OS options ---------- |
NirT | 0:c00e6c923941 | 216 | --------------------------------- |
NirT | 0:c00e6c923941 | 217 | */ |
NirT | 0:c00e6c923941 | 218 | |
NirT | 0:c00e6c923941 | 219 | #define TCPIP_THREAD_NAME "TCP/IP" |
NirT | 0:c00e6c923941 | 220 | #define TCPIP_THREAD_STACKSIZE 256 |
NirT | 0:c00e6c923941 | 221 | #define TCPIP_MBOX_SIZE 100 |
NirT | 0:c00e6c923941 | 222 | #define DEFAULT_UDP_RECVMBOX_SIZE 2000 |
NirT | 0:c00e6c923941 | 223 | #define DEFAULT_TCP_RECVMBOX_SIZE 2000 |
NirT | 0:c00e6c923941 | 224 | #define DEFAULT_ACCEPTMBOX_SIZE 2000 |
NirT | 0:c00e6c923941 | 225 | #define DEFAULT_THREAD_STACKSIZE 500 |
NirT | 0:c00e6c923941 | 226 | #define TCPIP_THREAD_PRIO (2) |
NirT | 0:c00e6c923941 | 227 | #define LWIP_COMPAT_MUTEX 1 |
NirT | 0:c00e6c923941 | 228 | |
NirT | 0:c00e6c923941 | 229 | |
NirT | 0:c00e6c923941 | 230 | |
NirT | 0:c00e6c923941 | 231 | #endif /* __LWIPOPTS_H__ */ |
NirT | 0:c00e6c923941 | 232 | |
NirT | 0:c00e6c923941 | 233 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |