Merge branch 'bugfix/put_more_rx_code_to_iram_v3.1' into 'release/v3.1'

wifi: Put some rx code to iram (backport v3.1)

See merge request espressif/esp-idf!7013
This commit is contained in:
Jiang Jiang Jian 2019-12-18 15:28:45 +08:00
commit 9d8fef2220
8 changed files with 33 additions and 1 deletions

View file

@ -77,6 +77,13 @@ else()
target_link_libraries(esp32 "-L ${CMAKE_CURRENT_SOURCE_DIR}/ld/wifi_iram_noopt")
endif()
# Add a different linker search path depending on WiFi RX optimisations
if (CONFIG_ESP32_WIFI_RX_IRAM_OPT)
target_link_libraries(esp32 "-L ${CMAKE_CURRENT_SOURCE_DIR}/ld/wifi_rx_iram_opt")
else()
target_link_libraries(esp32 "-L ${CMAKE_CURRENT_SOURCE_DIR}/ld/wifi_rx_iram_noopt")
endif()
if(NOT CONFIG_NO_BLOBS)
target_link_libraries(esp32 coexist core espnow mesh net80211 phy pp rtc smartconfig wpa2 wpa wps)
endif()

View file

@ -1098,11 +1098,20 @@ config ESP32_WIFI_SOFTAP_BEACON_MAX_LEN
config ESP32_WIFI_IRAM_OPT
bool "WiFi IRAM speed optimization"
default n if (BT_ENABLED && SPIRAM_SUPPORT)
default y
help
Select this option to place frequently called Wi-Fi library functions in IRAM. When this option is disabled,
more than 10Kbytes of IRAM memory will be saved but Wi-Fi throughput will be reduced.
config ESP32_WIFI_RX_IRAM_OPT
bool "WiFi RX IRAM speed optimization"
default n if (BT_ENABLED && SPIRAM_SUPPORT)
default y
help
Select this option to place frequently called Wi-Fi library RX functions in IRAM.When this option is disabled,
more than 17Kbytes of IRAM memory will be saved but Wi-Fi performance will be reduced.
config ESP32_WIFI_MGMT_SBUF_NUM
int "WiFi mgmt short buffer number"
range 6 32

View file

@ -20,6 +20,13 @@ else
COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/ld/wifi_iram_noopt
endif
# Add a different linker search path depending on WiFi RX optimisations
ifdef CONFIG_ESP32_WIFI_RX_IRAM_OPT
COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/ld/wifi_rx_iram_opt
else
COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/ld/wifi_rx_iram_noopt
endif
#Force pure functions from libgcc.a to be linked from ROM
LINKER_SCRIPTS += esp32.rom.libgcc.ld

View file

@ -102,6 +102,7 @@ SECTIONS
*libesp32.a:panic.*(.literal .text .literal.* .text.*)
*libesp32.a:core_dump.*(.literal .text .literal.* .text.*)
INCLUDE wifi_iram.ld
INCLUDE wifi_rx_iram.ld
*libapp_trace.a:(.literal .text .literal.* .text.*)
*libxtensa-debug-module.a:eri.*(.literal .text .literal.* .text.*)
*librtc.a:(.literal .text .literal.* .text.*)
@ -240,6 +241,7 @@ SECTIONS
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.irom0.text) /* catch stray ICACHE_RODATA_ATTR */
*(.wifi0iram .wifi0iram.*) /* catch stray WIFI_IRAM_ATTR */
*(.wifirxiram .wifirxiram.*) /* catch stray WIFI_RX_IRAM_ATTR */
*(.fini.literal)
*(.fini)
*(.gnu.version)

View file

@ -0,0 +1,2 @@
/* This snippet does nothing, if WiFi RX IRAM optimisations
are disabled. */

View file

@ -0,0 +1,4 @@
/* Link WiFi library .wifi0iram sections to IRAM
if this snippet is included */
*libnet80211.a:( .wifirxiram .wifirxiram.*)
*libpp.a:( .wifirxiram .wifirxiram.*)

@ -1 +1 @@
Subproject commit deea532dc8e532f30154193df7ac4087f7d4ab55
Subproject commit f5b9bcb0d0f9b3052e4aeb6407916b97dbe7be4e

View file

@ -1,2 +1,3 @@
EXCLUDE_COMPONENTS=libsodium bt
CONFIG_SPIRAM_SUPPORT=y
CONFIG_ESP32_WIFI_RX_IRAM_OPT=n