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
175 lines
7.2 KiB
/* USER CODE BEGIN Header */
|
|
/**
|
|
******************************************************************************
|
|
* File Name : lwipopts.h
|
|
* Description : This file overrides LwIP stack default configuration
|
|
* done in opt.h file.
|
|
******************************************************************************
|
|
* @attention
|
|
*
|
|
* Copyright (c) 2023 STMicroelectronics.
|
|
* All rights reserved.
|
|
*
|
|
* This software is licensed under terms that can be found in the LICENSE file
|
|
* in the root directory of this software component.
|
|
* If no LICENSE file comes with this software, it is provided AS-IS.
|
|
*
|
|
******************************************************************************
|
|
*/
|
|
/* USER CODE END Header */
|
|
|
|
/* Define to prevent recursive inclusion --------------------------------------*/
|
|
#ifndef __LWIPOPTS__H__
|
|
#define __LWIPOPTS__H__
|
|
|
|
#include "main.h"
|
|
|
|
/*-----------------------------------------------------------------------------*/
|
|
/* Current version of LwIP supported by CubeMx: 2.1.2 -*/
|
|
/*-----------------------------------------------------------------------------*/
|
|
|
|
/* Within 'USER CODE' section, code will be kept by default at each generation */
|
|
/* USER CODE BEGIN 0 */
|
|
|
|
/* USER CODE END 0 */
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* STM32CubeMX Specific Parameters (not defined in opt.h) ---------------------*/
|
|
/* Parameters set in STM32CubeMX LwIP Configuration GUI -*/
|
|
/*----- WITH_RTOS enabled (Since FREERTOS is set) -----*/
|
|
#define WITH_RTOS 1
|
|
/* Temporary workaround to avoid conflict on errno defined in STM32CubeIDE and lwip sys_arch.c errno */
|
|
#undef LWIP_PROVIDE_ERRNO
|
|
/*----- CHECKSUM_BY_HARDWARE enabled -----*/
|
|
#define CHECKSUM_BY_HARDWARE 1
|
|
/*-----------------------------------------------------------------------------*/
|
|
|
|
/* LwIP Stack Parameters (modified compared to initialization value in opt.h) -*/
|
|
/* Parameters set in STM32CubeMX LwIP Configuration GUI -*/
|
|
/*----- Value in opt.h for LWIP_DHCP: 0 -----*/
|
|
#define LWIP_DHCP 1
|
|
/*----- Default Value for LWIP_DNS: 0 ---*/
|
|
#define LWIP_DNS 1
|
|
/*----- Value in opt.h for MEM_ALIGNMENT: 1 -----*/
|
|
#define MEM_ALIGNMENT 4
|
|
/*----- Value in opt.h for LWIP_ETHERNET: LWIP_ARP || PPPOE_SUPPORT -*/
|
|
#define LWIP_ETHERNET 1
|
|
/*----- Default Value for LWIP_AUTOIP: 0 ---*/
|
|
#define LWIP_AUTOIP 1
|
|
/*----- Default Value for LWIP_DHCP_AUTOIP_COOP: 0 ---*/
|
|
#define LWIP_DHCP_AUTOIP_COOP 1
|
|
/*----- Default Value for LWIP_DHCP_AUTOIP_COOP_TRIES: 9 ---*/
|
|
#define LWIP_DHCP_AUTOIP_COOP_TRIES 0
|
|
/*----- 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) -*/
|
|
#define LWIP_DNS_SECURE 7
|
|
/*----- Value in opt.h for TCP_SND_QUEUELEN: (4*TCP_SND_BUF + (TCP_MSS - 1))/TCP_MSS -----*/
|
|
#define TCP_SND_QUEUELEN 9
|
|
/*----- Value in opt.h for TCP_SNDLOWAT: LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) -*/
|
|
#define TCP_SNDLOWAT 1071
|
|
/*----- Value in opt.h for TCP_SNDQUEUELOWAT: LWIP_MAX(TCP_SND_QUEUELEN)/2, 5) -*/
|
|
#define TCP_SNDQUEUELOWAT 5
|
|
/*----- Value in opt.h for TCP_WND_UPDATE_THRESHOLD: LWIP_MIN(TCP_WND/4, TCP_MSS*4) -----*/
|
|
#define TCP_WND_UPDATE_THRESHOLD 536
|
|
/*----- Default Value for LWIP_NETIF_HOSTNAME: 0 ---*/
|
|
#define LWIP_NETIF_HOSTNAME 1
|
|
/*----- Default Value for LWIP_NETIF_STATUS_CALLBACK: 0 ---*/
|
|
#define LWIP_NETIF_STATUS_CALLBACK 1
|
|
/*----- Default Value for LWIP_NETIF_EXT_STATUS_CALLBACK: 0 ---*/
|
|
#define LWIP_NETIF_EXT_STATUS_CALLBACK 1
|
|
/*----- Value in opt.h for LWIP_NETIF_LINK_CALLBACK: 0 -----*/
|
|
#define LWIP_NETIF_LINK_CALLBACK 1
|
|
/*----- Value in opt.h for TCPIP_THREAD_STACKSIZE: 0 -----*/
|
|
#define TCPIP_THREAD_STACKSIZE 1024
|
|
/*----- Value in opt.h for TCPIP_THREAD_PRIO: 1 -----*/
|
|
#define TCPIP_THREAD_PRIO osPriorityNormal
|
|
/*----- Value in opt.h for TCPIP_MBOX_SIZE: 0 -----*/
|
|
#define TCPIP_MBOX_SIZE 6
|
|
/*----- Value in opt.h for SLIPIF_THREAD_STACKSIZE: 0 -----*/
|
|
#define SLIPIF_THREAD_STACKSIZE 1024
|
|
/*----- Value in opt.h for SLIPIF_THREAD_PRIO: 1 -----*/
|
|
#define SLIPIF_THREAD_PRIO 3
|
|
/*----- Value in opt.h for DEFAULT_THREAD_STACKSIZE: 0 -----*/
|
|
#define DEFAULT_THREAD_STACKSIZE 1024
|
|
/*----- Value in opt.h for DEFAULT_THREAD_PRIO: 1 -----*/
|
|
#define DEFAULT_THREAD_PRIO 3
|
|
/*----- Value in opt.h for DEFAULT_UDP_RECVMBOX_SIZE: 0 -----*/
|
|
#define DEFAULT_UDP_RECVMBOX_SIZE 6
|
|
/*----- Value in opt.h for DEFAULT_TCP_RECVMBOX_SIZE: 0 -----*/
|
|
#define DEFAULT_TCP_RECVMBOX_SIZE 6
|
|
/*----- Value in opt.h for DEFAULT_ACCEPTMBOX_SIZE: 0 -----*/
|
|
#define DEFAULT_ACCEPTMBOX_SIZE 6
|
|
/*----- Default Value for LWIP_SO_SNDTIMEO: 0 ---*/
|
|
#define LWIP_SO_SNDTIMEO 1
|
|
/*----- Default Value for LWIP_SO_RCVTIMEO: 0 ---*/
|
|
#define LWIP_SO_RCVTIMEO 1
|
|
/*----- Value in opt.h for RECV_BUFSIZE_DEFAULT: INT_MAX -----*/
|
|
#define RECV_BUFSIZE_DEFAULT 2000000000
|
|
/*----- Value in opt.h for LWIP_STATS: 1 -----*/
|
|
#define LWIP_STATS 0
|
|
/*----- Value in opt.h for CHECKSUM_GEN_IP: 1 -----*/
|
|
#define CHECKSUM_GEN_IP 0
|
|
/*----- Value in opt.h for CHECKSUM_GEN_UDP: 1 -----*/
|
|
#define CHECKSUM_GEN_UDP 0
|
|
/*----- Value in opt.h for CHECKSUM_GEN_TCP: 1 -----*/
|
|
#define CHECKSUM_GEN_TCP 0
|
|
/*----- Value in opt.h for CHECKSUM_GEN_ICMP: 1 -----*/
|
|
#define CHECKSUM_GEN_ICMP 0
|
|
/*----- Value in opt.h for CHECKSUM_GEN_ICMP6: 1 -----*/
|
|
#define CHECKSUM_GEN_ICMP6 0
|
|
/*----- Value in opt.h for CHECKSUM_CHECK_IP: 1 -----*/
|
|
#define CHECKSUM_CHECK_IP 0
|
|
/*----- Value in opt.h for CHECKSUM_CHECK_UDP: 1 -----*/
|
|
#define CHECKSUM_CHECK_UDP 0
|
|
/*----- Value in opt.h for CHECKSUM_CHECK_TCP: 1 -----*/
|
|
#define CHECKSUM_CHECK_TCP 0
|
|
/*----- Value in opt.h for CHECKSUM_CHECK_ICMP: 1 -----*/
|
|
#define CHECKSUM_CHECK_ICMP 0
|
|
/*----- Value in opt.h for CHECKSUM_CHECK_ICMP6: 1 -----*/
|
|
#define CHECKSUM_CHECK_ICMP6 0
|
|
/*-----------------------------------------------------------------------------*/
|
|
/* USER CODE BEGIN 1 */
|
|
// #define LWIP_DEBUG
|
|
#define LWIP_IPV6_SCOPES_DEBUG LWIP_DBG_ON
|
|
#define ETHARP_DEBUG LWIP_DBG_ON
|
|
#define NETIF_DEBUG LWIP_DBG_ON
|
|
#define PBUF_DEBUG LWIP_DBG_ON
|
|
#define API_LIB_DEBUG LWIP_DBG_ON
|
|
#define API_MSG_DEBUG LWIP_DBG_ON
|
|
#define SOCKETS_DEBUG LWIP_DBG_ON
|
|
#define ICMP_DEBUG LWIP_DBG_ON
|
|
#define IGMP_DEBUG LWIP_DBG_ON
|
|
#define INET_DEBUG LWIP_DBG_ON
|
|
#define IP_DEBUG LWIP_DBG_ON
|
|
#define IP_REASS_DEBUG LWIP_DBG_ON
|
|
#define RAW_DEBUG LWIP_DBG_ON
|
|
#define MEM_DEBUG LWIP_DBG_ON
|
|
#define MEMP_DEBUG LWIP_DBG_ON
|
|
#define SYS_DEBUG LWIP_DBG_ON
|
|
#define TIMERS_DEBUG LWIP_DBG_ON
|
|
#define TCP_DEBUG LWIP_DBG_ON
|
|
#define TCP_INPUT_DEBUG LWIP_DBG_ON
|
|
#define TCP_FR_DEBUG LWIP_DBG_ON
|
|
#define TCP_RTO_DEBUG LWIP_DBG_ON
|
|
#define TCP_CWND_DEBUG LWIP_DBG_ON
|
|
#define TCP_WND_DEBUG LWIP_DBG_ON
|
|
#define TCP_OUTPUT_DEBUG LWIP_DBG_ON
|
|
#define TCP_RST_DEBUG LWIP_DBG_ON
|
|
#define TCP_QLEN_DEBUG LWIP_DBG_ON
|
|
#define UDP_DEBUG LWIP_DBG_ON
|
|
#define TCPIP_DEBUG LWIP_DBG_ON
|
|
#define SLIP_DEBUG LWIP_DBG_ON
|
|
#define DHCP_DEBUG LWIP_DBG_ON
|
|
#define AUTOIP_DEBUG LWIP_DBG_ON
|
|
#define DNS_DEBUG LWIP_DBG_ON
|
|
#define IP6_DEBUG LWIP_DBG_ON
|
|
#define DHCP6_DEBUG LWIP_DBG_ON
|
|
/* USER CODE END 1 */
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /*__LWIPOPTS__H__ */
|