Merge branch 'bugfix/tw28146_make_wifi_iram_optimization_configurable_v3.2' into 'release/v3.2'
esp32: make WiFi IRAM optimization configurable (backport v3.2) See merge request idf/esp-idf!4040
This commit is contained in:
commit
9778549759
|
@ -72,6 +72,14 @@ else()
|
|||
register_component()
|
||||
|
||||
target_link_libraries(esp32 "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib")
|
||||
|
||||
# Add a different linker search path depending on WiFi optimisations
|
||||
if (CONFIG_ESP32_WIFI_IRAM_OPT)
|
||||
target_link_libraries(esp32 "-L ${CMAKE_CURRENT_SOURCE_DIR}/ld/wifi_iram_opt")
|
||||
else()
|
||||
target_link_libraries(esp32 "-L ${CMAKE_CURRENT_SOURCE_DIR}/ld/wifi_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()
|
||||
|
|
|
@ -1165,7 +1165,14 @@ config ESP32_WIFI_SOFTAP_BEACON_MAX_LEN
|
|||
932 (752+36*5).
|
||||
|
||||
Setting a longer beacon length also assists with debugging as the conflicting root nodes can be identified more quickly.
|
||||
|
||||
|
||||
config ESP32_WIFI_IRAM_OPT
|
||||
bool "WiFi IRAM speed optimization"
|
||||
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.
|
||||
|
||||
endmenu # Wi-Fi
|
||||
|
||||
menu PHY
|
||||
|
|
|
@ -18,6 +18,13 @@ endif
|
|||
#specifies its own scripts.
|
||||
LINKER_SCRIPTS += esp32.common.ld esp32.rom.ld esp32.peripherals.ld
|
||||
|
||||
# Add a different linker search path depending on WiFi optimisations
|
||||
ifdef CONFIG_ESP32_WIFI_IRAM_OPT
|
||||
COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/ld/wifi_iram_opt
|
||||
else
|
||||
COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/ld/wifi_iram_noopt
|
||||
endif
|
||||
|
||||
#Force pure functions from libgcc.a to be linked from ROM
|
||||
LINKER_SCRIPTS += esp32.rom.libgcc.ld
|
||||
|
||||
|
|
|
@ -159,6 +159,7 @@ SECTIONS
|
|||
*libheap.a:multi_heap_poisoning.*(.literal .text .literal.* .text.*)
|
||||
*libesp32.a:panic.*(.literal .text .literal.* .text.*)
|
||||
*libesp32.a:core_dump.*(.literal .text .literal.* .text.*)
|
||||
INCLUDE wifi_iram.ld
|
||||
*libapp_trace.a:(.literal .text .literal.* .text.*)
|
||||
*libxtensa-debug-module.a:eri.*(.literal .text .literal.* .text.*)
|
||||
*librtc.a:(.literal .text .literal.* .text.*)
|
||||
|
@ -326,6 +327,7 @@ SECTIONS
|
|||
_text_start = ABSOLUTE(.);
|
||||
*(.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 */
|
||||
*(.fini.literal)
|
||||
*(.fini)
|
||||
*(.gnu.version)
|
||||
|
|
2
components/esp32/ld/wifi_iram_noopt/wifi_iram.ld
Normal file
2
components/esp32/ld/wifi_iram_noopt/wifi_iram.ld
Normal file
|
@ -0,0 +1,2 @@
|
|||
/* This snippet does nothing, if WiFi IRAM optimisations
|
||||
are disabled. */
|
4
components/esp32/ld/wifi_iram_opt/wifi_iram.ld
Normal file
4
components/esp32/ld/wifi_iram_opt/wifi_iram.ld
Normal file
|
@ -0,0 +1,4 @@
|
|||
/* Link WiFi library .wifi0iram sections to IRAM
|
||||
if this snippet is included */
|
||||
*libnet80211.a:( .wifi0iram .wifi0iram.*)
|
||||
*libpp.a:( .wifi0iram .wifi0iram.*)
|
|
@ -1 +1 @@
|
|||
Subproject commit eb53491cf6eb18d6cfd98f7b3bb4e09fb241733c
|
||||
Subproject commit 4a4b8089b3ec47b7d59f69d39ccd0d82402b2597
|
Loading…
Reference in a new issue