From a133dbd848ea911161478fa9d826c29978e74d8e Mon Sep 17 00:00:00 2001 From: xiehang Date: Thu, 19 Mar 2020 14:41:07 +0800 Subject: [PATCH] LWIP: Add lwip assert control --- components/lwip/Kconfig | 7 +++++++ components/lwip/port/esp32/include/arch/cc.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 1d8be501de..1414ec290e 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -643,4 +643,11 @@ menu "LWIP" endmenu # SNTP + config LWIP_ESP_LWIP_ASSERT + bool "Enable LWIP ASSERT checks" + default y + help + Enable this option allows lwip to check assert. + It is recommended to keep it open, do not close it. + endmenu diff --git a/components/lwip/port/esp32/include/arch/cc.h b/components/lwip/port/esp32/include/arch/cc.h index 300291f3bf..348cae35ad 100644 --- a/components/lwip/port/esp32/include/arch/cc.h +++ b/components/lwip/port/esp32/include/arch/cc.h @@ -45,6 +45,10 @@ #define BYTE_ORDER LITTLE_ENDIAN #endif // BYTE_ORDER +#ifndef CONFIG_LWIP_ESP_LWIP_ASSERT +#define LWIP_NOASSERT 1 +#endif + typedef uint8_t u8_t; typedef int8_t s8_t; typedef uint16_t u16_t;