You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
7.2 KiB

2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * File Name : lwipopts.h
  5. * Description : This file overrides LwIP stack default configuration
  6. * done in opt.h file.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2023 STMicroelectronics.
  11. * All rights reserved.
  12. *
  13. * This software is licensed under terms that can be found in the LICENSE file
  14. * in the root directory of this software component.
  15. * If no LICENSE file comes with this software, it is provided AS-IS.
  16. *
  17. ******************************************************************************
  18. */
  19. /* USER CODE END Header */
  20. /* Define to prevent recursive inclusion --------------------------------------*/
  21. #ifndef __LWIPOPTS__H__
  22. #define __LWIPOPTS__H__
  23. #include "main.h"
  24. /*-----------------------------------------------------------------------------*/
  25. /* Current version of LwIP supported by CubeMx: 2.1.2 -*/
  26. /*-----------------------------------------------------------------------------*/
  27. /* Within 'USER CODE' section, code will be kept by default at each generation */
  28. /* USER CODE BEGIN 0 */
  29. /* USER CODE END 0 */
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. /* STM32CubeMX Specific Parameters (not defined in opt.h) ---------------------*/
  34. /* Parameters set in STM32CubeMX LwIP Configuration GUI -*/
  35. /*----- WITH_RTOS enabled (Since FREERTOS is set) -----*/
  36. #define WITH_RTOS 1
  37. /* Temporary workaround to avoid conflict on errno defined in STM32CubeIDE and lwip sys_arch.c errno */
  38. #undef LWIP_PROVIDE_ERRNO
  39. /*----- CHECKSUM_BY_HARDWARE enabled -----*/
  40. #define CHECKSUM_BY_HARDWARE 1
  41. /*-----------------------------------------------------------------------------*/
  42. /* LwIP Stack Parameters (modified compared to initialization value in opt.h) -*/
  43. /* Parameters set in STM32CubeMX LwIP Configuration GUI -*/
  44. /*----- Value in opt.h for LWIP_DHCP: 0 -----*/
  45. #define LWIP_DHCP 1
  46. /*----- Default Value for LWIP_DNS: 0 ---*/
  47. #define LWIP_DNS 1
  48. /*----- Value in opt.h for MEM_ALIGNMENT: 1 -----*/
  49. #define MEM_ALIGNMENT 4
  50. /*----- Value in opt.h for LWIP_ETHERNET: LWIP_ARP || PPPOE_SUPPORT -*/
  51. #define LWIP_ETHERNET 1
  52. /*----- Default Value for LWIP_AUTOIP: 0 ---*/
  53. #define LWIP_AUTOIP 1
  54. /*----- Default Value for LWIP_DHCP_AUTOIP_COOP: 0 ---*/
  55. #define LWIP_DHCP_AUTOIP_COOP 1
  56. /*----- Default Value for LWIP_DHCP_AUTOIP_COOP_TRIES: 9 ---*/
  57. #define LWIP_DHCP_AUTOIP_COOP_TRIES 0
  58. /*----- Value in opt.h for LWIP_DNS_SECURE: (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) -*/
  59. #define LWIP_DNS_SECURE 7
  60. /*----- Value in opt.h for TCP_SND_QUEUELEN: (4*TCP_SND_BUF + (TCP_MSS - 1))/TCP_MSS -----*/
  61. #define TCP_SND_QUEUELEN 9
  62. /*----- Value in opt.h for TCP_SNDLOWAT: LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) -*/
  63. #define TCP_SNDLOWAT 1071
  64. /*----- Value in opt.h for TCP_SNDQUEUELOWAT: LWIP_MAX(TCP_SND_QUEUELEN)/2, 5) -*/
  65. #define TCP_SNDQUEUELOWAT 5
  66. /*----- Value in opt.h for TCP_WND_UPDATE_THRESHOLD: LWIP_MIN(TCP_WND/4, TCP_MSS*4) -----*/
  67. #define TCP_WND_UPDATE_THRESHOLD 536
  68. /*----- Default Value for LWIP_NETIF_HOSTNAME: 0 ---*/
  69. #define LWIP_NETIF_HOSTNAME 1
  70. /*----- Default Value for LWIP_NETIF_STATUS_CALLBACK: 0 ---*/
  71. #define LWIP_NETIF_STATUS_CALLBACK 1
  72. /*----- Default Value for LWIP_NETIF_EXT_STATUS_CALLBACK: 0 ---*/
  73. #define LWIP_NETIF_EXT_STATUS_CALLBACK 1
  74. /*----- Value in opt.h for LWIP_NETIF_LINK_CALLBACK: 0 -----*/
  75. #define LWIP_NETIF_LINK_CALLBACK 1
  76. /*----- Value in opt.h for TCPIP_THREAD_STACKSIZE: 0 -----*/
  77. #define TCPIP_THREAD_STACKSIZE 1024
  78. /*----- Value in opt.h for TCPIP_THREAD_PRIO: 1 -----*/
  79. #define TCPIP_THREAD_PRIO osPriorityNormal
  80. /*----- Value in opt.h for TCPIP_MBOX_SIZE: 0 -----*/
  81. #define TCPIP_MBOX_SIZE 6
  82. /*----- Value in opt.h for SLIPIF_THREAD_STACKSIZE: 0 -----*/
  83. #define SLIPIF_THREAD_STACKSIZE 1024
  84. /*----- Value in opt.h for SLIPIF_THREAD_PRIO: 1 -----*/
  85. #define SLIPIF_THREAD_PRIO 3
  86. /*----- Value in opt.h for DEFAULT_THREAD_STACKSIZE: 0 -----*/
  87. #define DEFAULT_THREAD_STACKSIZE 1024
  88. /*----- Value in opt.h for DEFAULT_THREAD_PRIO: 1 -----*/
  89. #define DEFAULT_THREAD_PRIO 3
  90. /*----- Value in opt.h for DEFAULT_UDP_RECVMBOX_SIZE: 0 -----*/
  91. #define DEFAULT_UDP_RECVMBOX_SIZE 6
  92. /*----- Value in opt.h for DEFAULT_TCP_RECVMBOX_SIZE: 0 -----*/
  93. #define DEFAULT_TCP_RECVMBOX_SIZE 6
  94. /*----- Value in opt.h for DEFAULT_ACCEPTMBOX_SIZE: 0 -----*/
  95. #define DEFAULT_ACCEPTMBOX_SIZE 6
  96. /*----- Default Value for LWIP_SO_SNDTIMEO: 0 ---*/
  97. #define LWIP_SO_SNDTIMEO 1
  98. /*----- Default Value for LWIP_SO_RCVTIMEO: 0 ---*/
  99. #define LWIP_SO_RCVTIMEO 1
  100. /*----- Value in opt.h for RECV_BUFSIZE_DEFAULT: INT_MAX -----*/
  101. #define RECV_BUFSIZE_DEFAULT 2000000000
  102. /*----- Value in opt.h for LWIP_STATS: 1 -----*/
  103. #define LWIP_STATS 0
  104. /*----- Value in opt.h for CHECKSUM_GEN_IP: 1 -----*/
  105. #define CHECKSUM_GEN_IP 0
  106. /*----- Value in opt.h for CHECKSUM_GEN_UDP: 1 -----*/
  107. #define CHECKSUM_GEN_UDP 0
  108. /*----- Value in opt.h for CHECKSUM_GEN_TCP: 1 -----*/
  109. #define CHECKSUM_GEN_TCP 0
  110. /*----- Value in opt.h for CHECKSUM_GEN_ICMP: 1 -----*/
  111. #define CHECKSUM_GEN_ICMP 0
  112. /*----- Value in opt.h for CHECKSUM_GEN_ICMP6: 1 -----*/
  113. #define CHECKSUM_GEN_ICMP6 0
  114. /*----- Value in opt.h for CHECKSUM_CHECK_IP: 1 -----*/
  115. #define CHECKSUM_CHECK_IP 0
  116. /*----- Value in opt.h for CHECKSUM_CHECK_UDP: 1 -----*/
  117. #define CHECKSUM_CHECK_UDP 0
  118. /*----- Value in opt.h for CHECKSUM_CHECK_TCP: 1 -----*/
  119. #define CHECKSUM_CHECK_TCP 0
  120. /*----- Value in opt.h for CHECKSUM_CHECK_ICMP: 1 -----*/
  121. #define CHECKSUM_CHECK_ICMP 0
  122. /*----- Value in opt.h for CHECKSUM_CHECK_ICMP6: 1 -----*/
  123. #define CHECKSUM_CHECK_ICMP6 0
  124. /*-----------------------------------------------------------------------------*/
  125. /* USER CODE BEGIN 1 */
  126. // #define LWIP_DEBUG
  127. #define LWIP_IPV6_SCOPES_DEBUG LWIP_DBG_ON
  128. #define ETHARP_DEBUG LWIP_DBG_ON
  129. #define NETIF_DEBUG LWIP_DBG_ON
  130. #define PBUF_DEBUG LWIP_DBG_ON
  131. #define API_LIB_DEBUG LWIP_DBG_ON
  132. #define API_MSG_DEBUG LWIP_DBG_ON
  133. #define SOCKETS_DEBUG LWIP_DBG_ON
  134. #define ICMP_DEBUG LWIP_DBG_ON
  135. #define IGMP_DEBUG LWIP_DBG_ON
  136. #define INET_DEBUG LWIP_DBG_ON
  137. #define IP_DEBUG LWIP_DBG_ON
  138. #define IP_REASS_DEBUG LWIP_DBG_ON
  139. #define RAW_DEBUG LWIP_DBG_ON
  140. #define MEM_DEBUG LWIP_DBG_ON
  141. #define MEMP_DEBUG LWIP_DBG_ON
  142. #define SYS_DEBUG LWIP_DBG_ON
  143. #define TIMERS_DEBUG LWIP_DBG_ON
  144. #define TCP_DEBUG LWIP_DBG_ON
  145. #define TCP_INPUT_DEBUG LWIP_DBG_ON
  146. #define TCP_FR_DEBUG LWIP_DBG_ON
  147. #define TCP_RTO_DEBUG LWIP_DBG_ON
  148. #define TCP_CWND_DEBUG LWIP_DBG_ON
  149. #define TCP_WND_DEBUG LWIP_DBG_ON
  150. #define TCP_OUTPUT_DEBUG LWIP_DBG_ON
  151. #define TCP_RST_DEBUG LWIP_DBG_ON
  152. #define TCP_QLEN_DEBUG LWIP_DBG_ON
  153. #define UDP_DEBUG LWIP_DBG_ON
  154. #define TCPIP_DEBUG LWIP_DBG_ON
  155. #define SLIP_DEBUG LWIP_DBG_ON
  156. #define DHCP_DEBUG LWIP_DBG_ON
  157. #define AUTOIP_DEBUG LWIP_DBG_ON
  158. #define DNS_DEBUG LWIP_DBG_ON
  159. #define IP6_DEBUG LWIP_DBG_ON
  160. #define DHCP6_DEBUG LWIP_DBG_ON
  161. /* USER CODE END 1 */
  162. #ifdef __cplusplus
  163. }
  164. #endif
  165. #endif /*__LWIPOPTS__H__ */