diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 5a6c800be6..7378667002 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -723,4 +723,43 @@ menu "LWIP" Enable this option allows lwip to check assert. It is recommended to keep it open, do not close it. + menu "Debug" + + config LWIP_NETIF_DEBUG + bool "Enable netif debug messages" + default n + + config LWIP_PBUF_DEBUG + bool "Enable pbuf debug messages" + default n + + config LWIP_ETHARP_DEBUG + bool "Enable etharp debug messages" + default n + + config LWIP_API_LIB_DEBUG + bool "Enable api lib debug messages" + default n + + config LWIP_SOCKETS_DEBUG + bool "Enable socket debug messages" + default n + + config LWIP_IP_DEBUG + bool "Enable IP debug messages" + default n + + config LWIP_ICMP_DEBUG + bool "Enable ICMP debug messages" + default n + + config LWIP_IP6_DEBUG + bool "Enable IP6 debug messages" + default n + + config LWIP_ICMP6_DEBUG + bool "Enable ICMP6 debug messages" + default n + + endmenu #debug endmenu diff --git a/components/lwip/port/esp32/include/lwipopts.h b/components/lwip/port/esp32/include/lwipopts.h index cc7df91b97..ea35bb89ca 100644 --- a/components/lwip/port/esp32/include/lwipopts.h +++ b/components/lwip/port/esp32/include/lwipopts.h @@ -759,37 +759,82 @@ /** * ETHARP_DEBUG: Enable debugging in etharp.c. */ -#define ETHARP_DEBUG LWIP_DBG_OFF +#ifdef CONFIG_LWIP_ETHARP_DEBUG +#define ETHARP_DEBUG LWIP_DBG_ON +#else +#define ETHARP_DEBUG LWIP_DBG_OFF +#endif + /** * NETIF_DEBUG: Enable debugging in netif.c. */ +#ifdef CONFIG_LWIP_NETIF_DEBUG +#define NETIF_DEBUG LWIP_DBG_ON +#else #define NETIF_DEBUG LWIP_DBG_OFF +#endif /** * PBUF_DEBUG: Enable debugging in pbuf.c. */ -#define PBUF_DEBUG LWIP_DBG_OFF +#ifdef CONFIG_LWIP_PBUF_DEBUG +#define PBUF_DEBUG LWIP_DBG_ON +#else +#define PBUF_DEBUG LWIP_DBG_OFF +#endif /** * API_LIB_DEBUG: Enable debugging in api_lib.c. */ -#define API_LIB_DEBUG LWIP_DBG_OFF +#ifdef CONFIG_LWIP_API_LIB_DEBUG +#define API_LIB_DEBUG LWIP_DBG_ON +#else +#define API_LIB_DEBUG LWIP_DBG_OFF +#endif + /** * SOCKETS_DEBUG: Enable debugging in sockets.c. */ +#ifdef CONFIG_LWIP_SOCKETS_DEBUG +#define SOCKETS_DEBUG LWIP_DBG_ON +#else #define SOCKETS_DEBUG LWIP_DBG_OFF +#endif /** * ICMP_DEBUG: Enable debugging in icmp.c. */ +#ifdef CONFIG_LWIP_ICMP_DEBUG +#define ICMP_DEBUG LWIP_DBG_ON +#else #define ICMP_DEBUG LWIP_DBG_OFF +#endif + +#ifdef CONFIG_LWIP_ICMP6_DEBUG +#define ICMP6_DEBUG LWIP_DBG_ON +#else +#define ICMP6_DEBUG LWIP_DBG_OFF +#endif /** * IP_DEBUG: Enable debugging for IP. */ +#ifdef CONFIG_LWIP_IP_DEBUG +#define IP_DEBUG LWIP_DBG_ON +#else #define IP_DEBUG LWIP_DBG_OFF +#endif + +/** + * IP_DEBUG: Enable debugging for IP. + */ +#ifdef CONFIG_LWIP_IP6_DEBUG +#define IP6_DEBUG LWIP_DBG_ON +#else +#define IP6_DEBUG LWIP_DBG_OFF +#endif /** * MEMP_DEBUG: Enable debugging in memp.c.