ethernet: can build without enable esp32 emac

Closes https://github.com/espressif/esp-idf/issues/3770
This commit is contained in:
suda-morris 2019-07-12 17:58:45 +08:00
parent 97ad2bcb86
commit 018de8101f
5 changed files with 14 additions and 9 deletions

View file

@ -4,7 +4,7 @@ set(esp_eth_srcs "src/esp_eth.c"
"src/esp_eth_phy_lan8720.c"
"src/esp_eth_phy_rtl8201.c")
if(CONFIG_IDF_TARGET_ESP32)
if(CONFIG_ETH_USE_ESP32_EMAC)
list(APPEND esp_eth_srcs "src/esp_eth_mac_esp32.c")
endif()

View file

@ -5,7 +5,7 @@ COMPONENT_ADD_INCLUDEDIRS := include
COMPONENT_SRCDIRS := src
COMPONENT_ADD_LDFRAGMENTS += linker.lf
ifndef CONFIG_IDF_TARGET_ESP32
ifndef CONFIG_ETH_USE_ESP32_EMAC
COMPONENT_OBJEXCLUDE += src/esp_eth_mac_esp32.o
endif

View file

@ -1 +1,5 @@
ifndef CONFIG_ETH_USE_ESP32_EMAC
COMPONENT_OBJEXCLUDE += esp32/emac_hal.o
endif
esp32/rtc_clk.o: CFLAGS += -fno-jump-tables -fno-tree-switch-conversion

View file

@ -13,7 +13,7 @@ set(SOC_SRCS "cpu_util.c"
"soc_memory_layout.c"
"spi_periph.c")
if(NOT BOOTLOADER_BUILD)
if(NOT BOOTLOADER_BUILD AND CONFIG_ETH_USE_ESP32_EMAC)
list(APPEND SOC_SRCS "emac_hal.c")
endif()

View file

@ -14,9 +14,10 @@ entries:
spi_slave_hal_iram (noflash_text)
spi_flash_hal_iram (noflash)
lldesc (noflash_text)
emac_hal:emac_hal_isr (noflash_text)
emac_hal:emac_hal_tx_complete_cb (noflash_text)
emac_hal:emac_hal_tx_unavail_cb (noflash_text)
emac_hal:emac_hal_rx_complete_cb (noflash_text)
emac_hal:emac_hal_rx_early_cb (noflash_text)
emac_hal:emac_hal_rx_unavail_cb (noflash_text)
if ETH_USE_ESP32_EMAC = y:
emac_hal:emac_hal_isr (noflash_text)
emac_hal:emac_hal_tx_complete_cb (noflash_text)
emac_hal:emac_hal_tx_unavail_cb (noflash_text)
emac_hal:emac_hal_rx_complete_cb (noflash_text)
emac_hal:emac_hal_rx_early_cb (noflash_text)
emac_hal:emac_hal_rx_unavail_cb (noflash_text)