From 4002c6060a70f7372bcf2b65a6af6c21f8d1a3b8 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Mon, 12 Aug 2019 11:04:30 +1000 Subject: [PATCH] lwip: Enable ethernet for both ESP32 & ESP32-S2Beta (SPI ethernet) --- components/lwip/CMakeLists.txt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/components/lwip/CMakeLists.txt b/components/lwip/CMakeLists.txt index db2dea2040..df4bb7f3aa 100644 --- a/components/lwip/CMakeLists.txt +++ b/components/lwip/CMakeLists.txt @@ -87,6 +87,7 @@ set(srcs "port/esp32/freertos/sys_arch.c" "port/esp32/netif/dhcp_state.c" "port/esp32/netif/nettestif.c" + "port/esp32/netif/ethernetif.c" "port/esp32/netif/wlanif.c") if(CONFIG_LWIP_PPP_SUPPORT) @@ -123,19 +124,11 @@ if(CONFIG_LWIP_PPP_SUPPORT) "lwip/src/netif/ppp/polarssl/sha1.c") endif() -# Ethernet support for ESP32 only -if (IDF_TARGET_ESP32) - set(priv_requires esp_eth) - list(APPEND srcs "port/esp32/netif/ethernetif.c") -else() - set(priv_requires) -endif() - idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "${include_dirs}" LDFRAGMENTS linker.lf REQUIRES vfs esp_wifi - PRIV_REQUIRES ${priv_requires} tcpip_adapter nvs_flash) + PRIV_REQUIRES ${priv_requires} esp_eth tcpip_adapter nvs_flash) # lots of LWIP source files evaluate macros that check address of stack variables target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-address)