ethernet: can build without enable esp32 emac
Closes https://github.com/espressif/esp-idf/issues/3770
This commit is contained in:
parent
97ad2bcb86
commit
018de8101f
|
@ -4,7 +4,7 @@ set(esp_eth_srcs "src/esp_eth.c"
|
||||||
"src/esp_eth_phy_lan8720.c"
|
"src/esp_eth_phy_lan8720.c"
|
||||||
"src/esp_eth_phy_rtl8201.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")
|
list(APPEND esp_eth_srcs "src/esp_eth_mac_esp32.c")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ COMPONENT_ADD_INCLUDEDIRS := include
|
||||||
COMPONENT_SRCDIRS := src
|
COMPONENT_SRCDIRS := src
|
||||||
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
||||||
|
|
||||||
ifndef CONFIG_IDF_TARGET_ESP32
|
ifndef CONFIG_ETH_USE_ESP32_EMAC
|
||||||
COMPONENT_OBJEXCLUDE += src/esp_eth_mac_esp32.o
|
COMPONENT_OBJEXCLUDE += src/esp_eth_mac_esp32.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -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
|
esp32/rtc_clk.o: CFLAGS += -fno-jump-tables -fno-tree-switch-conversion
|
||||||
|
|
|
@ -13,7 +13,7 @@ set(SOC_SRCS "cpu_util.c"
|
||||||
"soc_memory_layout.c"
|
"soc_memory_layout.c"
|
||||||
"spi_periph.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")
|
list(APPEND SOC_SRCS "emac_hal.c")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ entries:
|
||||||
spi_slave_hal_iram (noflash_text)
|
spi_slave_hal_iram (noflash_text)
|
||||||
spi_flash_hal_iram (noflash)
|
spi_flash_hal_iram (noflash)
|
||||||
lldesc (noflash_text)
|
lldesc (noflash_text)
|
||||||
|
if ETH_USE_ESP32_EMAC = y:
|
||||||
emac_hal:emac_hal_isr (noflash_text)
|
emac_hal:emac_hal_isr (noflash_text)
|
||||||
emac_hal:emac_hal_tx_complete_cb (noflash_text)
|
emac_hal:emac_hal_tx_complete_cb (noflash_text)
|
||||||
emac_hal:emac_hal_tx_unavail_cb (noflash_text)
|
emac_hal:emac_hal_tx_unavail_cb (noflash_text)
|
||||||
|
|
Loading…
Reference in a new issue