Ethernet peripheral will depend on IDF_TARGET

esp32 has EMAC controller, but esp32s2 doesn't
This commit is contained in:
suda-morris
2019-04-09 19:34:38 +08:00
parent 12f00d9a5e
commit f14a6cf51b
5 changed files with 19 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
require_idf_targets(esp32)
set(COMPONENT_SRCS "emac_dev.c"
"emac_main.c"
"eth_phy/phy_common.c"

View File

@@ -1,4 +1,5 @@
menu Ethernet
depends on IDF_TARGET_ESP32
config ETH_DMA_RX_BUF_NUM
int "Number of DMA RX buffers"

View File

@@ -2,4 +2,8 @@
# Component Makefile
#
COMPONENT_SRCDIRS := . eth_phy
ifdef CONFIG_IDF_TARGET_ESP32
COMPONENT_SRCDIRS := . eth_phy
else
COMPONENT_CONFIG_ONLY := 1
endif

View File

@@ -86,10 +86,17 @@ set(COMPONENT_SRCS "apps/dhcpserver/dhcpserver.c"
"port/esp32/debug/lwip_debug.c"
"port/esp32/freertos/sys_arch.c"
"port/esp32/netif/dhcp_state.c"
<<<<<<< bce8b14e7324423a5caad1c6a240e97fdc45afe2
"port/esp32/netif/ethernetif.c"
"port/esp32/netif/nettestif.c"
=======
>>>>>>> Ethernet peripheral will depend on IDF_TARGET
"port/esp32/netif/wlanif.c")
if(CONFIG_IDF_TARGET_ESP32)
list(APPEND COMPONENT_SRCS "port/esp32/netif/ethernetif.c")
endif()
if(CONFIG_LWIP_PPP_SUPPORT)
list(APPEND COMPONENT_SRCS "lwip/src/netif/ppp/auth.c"
"lwip/src/netif/ppp/ccp.c"

View File

@@ -25,6 +25,10 @@ COMPONENT_SRCDIRS := \
port/esp32/netif \
port/esp32/debug
ifndef CONFIG_IDF_TARGET_ESP32
COMPONENT_OBJEXCLUDE := port/esp32/netif/ethernetif.o
endif
ifdef CONFIG_LWIP_PPP_SUPPORT
COMPONENT_SRCDIRS += lwip/src/netif/ppp lwip/src/netif/ppp/polarssl
endif