mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(esp_eth): added IRAM optimization option for internal EMAC
This commit is contained in:
parent
78af508654
commit
0ff10c3e06
@ -2,6 +2,7 @@ idf_build_get_property(components_to_build BUILD_COMPONENTS)
|
||||
|
||||
set(srcs)
|
||||
set(include)
|
||||
set(ld_fragments linker.lf)
|
||||
# As CONFIG_ETH_ENABLED comes from Kconfig, it is not evaluated yet
|
||||
# when components are being registered.
|
||||
# Thus, always add the (private) requirements, regardless of Kconfig
|
||||
@ -51,6 +52,7 @@ endif()
|
||||
|
||||
idf_component_register(SRCS "${srcs}"
|
||||
INCLUDE_DIRS ${include}
|
||||
LDFRAGMENTS ${ld_fragments}
|
||||
REQUIRES esp_event # For using "ESP_EVENT_DECLARE_BASE" in header file
|
||||
PRIV_REQUIRES ${priv_requires})
|
||||
if(CONFIG_ETH_ENABLED)
|
||||
|
@ -111,6 +111,13 @@ menu "Ethernet"
|
||||
cause obvious performance loss.
|
||||
endif
|
||||
|
||||
config ETH_IRAM_OPTIMIZATION
|
||||
bool "Enable IRAM optimization"
|
||||
default n
|
||||
help
|
||||
If enabled, functions related to RX/TX are placed into IRAM. It can improve Ethernet throughput.
|
||||
If disabled, all functions are placed into FLASH.
|
||||
|
||||
endif # ETH_USE_ESP32_EMAC
|
||||
|
||||
menuconfig ETH_USE_SPI_ETHERNET
|
||||
|
19
components/esp_eth/linker.lf
Normal file
19
components/esp_eth/linker.lf
Normal file
@ -0,0 +1,19 @@
|
||||
[mapping:esp_eth]
|
||||
archive: libesp_eth.a
|
||||
entries:
|
||||
if ETH_IRAM_OPTIMIZATION = y:
|
||||
esp_eth:esp_eth_transmit (noflash_text)
|
||||
esp_eth:esp_eth_transmit_vargs (noflash_text)
|
||||
esp_eth_mac_esp:emac_esp32_transmit (noflash_text)
|
||||
esp_eth_mac_esp:emac_esp32_transmit_multiple_bufs (noflash_text)
|
||||
esp_eth_mac_esp:emac_esp32_receive (noflash_text)
|
||||
esp_eth_mac_esp:emac_esp32_rx_task (noflash_text)
|
||||
|
||||
[mapping:esp_eth_hal]
|
||||
archive: libhal.a
|
||||
entries:
|
||||
if ETH_IRAM_OPTIMIZATION = y:
|
||||
emac_hal:emac_hal_transmit_frame (noflash)
|
||||
emac_hal:emac_hal_transmit_multiple_buf_frame (noflash)
|
||||
emac_hal:emac_hal_alloc_recv_buf (noflash)
|
||||
emac_hal:emac_hal_receive_frame (noflash)
|
@ -21,3 +21,6 @@ CONFIG_ESP_TASK_WDT_EN=n
|
||||
|
||||
# Enable lwIP IRAM optimization
|
||||
CONFIG_LWIP_IRAM_OPTIMIZATION=y
|
||||
|
||||
# Enable Ethernet IRAM optimization
|
||||
CONFIG_ETH_IRAM_OPTIMIZATION=y
|
||||
|
Loading…
Reference in New Issue
Block a user