]> granicus.if.org Git - esp-idf/commitdiff
esp32: make WiFi IRAM optimization configurable
authorLiu Zhi Fu <liuzhifu@espressif.com>
Thu, 27 Dec 2018 12:53:45 +0000 (20:53 +0800)
committerLiu Zhi Fu <liuzhifu@espressif.com>
Tue, 26 Feb 2019 11:55:57 +0000 (19:55 +0800)
With this feature, the WiFi IRAM optimization can be disabled/enabled via menuconfig.

components/esp32/Kconfig
components/esp32/ld/esp32_fragments.lf
components/esp32/lib
components/esp32/linker.lf

index df8b31c73d0a7ff75afeeed1f0b5e8a8dce5527e..eedd14607d03ec4e5a050344d5ef97e237f884de 100644 (file)
@@ -1204,6 +1204,14 @@ menu Wi-Fi
         bool "WiFi Debug Log Submodule Scan"
         default n
 
+    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
index 0132a11aa4b007bdf1dd74f4ea8497dea4f4f467..932197caf022e8ba538fe464a869effd0fc2e9b6 100644 (file)
@@ -44,6 +44,10 @@ entries:
 entries:
     .dram1+
 
+[sections:wifi_iram]
+entries:
+    .wifi0iram+
+
 [scheme:default]
 entries:
     text -> flash_text
@@ -57,6 +61,7 @@ entries:
     rtc_data -> rtc_data
     rtc_rodata -> rtc_data
     rtc_bss -> rtc_bss
+    wifi_iram -> flash_text
 
 [scheme:rtc]
 entries:
@@ -78,3 +83,7 @@ entries:
 [scheme:noflash_text]
 entries:
     text -> iram0_text
+
+[scheme:wifi_iram]
+entries:
+    wifi_iram -> iram0_text
index 3cedb7f33e4f86d61427912cae6f6ffe598df2b9..2d497667233a118384a79aec9428a042fbebd366 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 3cedb7f33e4f86d61427912cae6f6ffe598df2b9
+Subproject commit 2d497667233a118384a79aec9428a042fbebd366
index c9a1c275dd431b9023d29c8ffa7b836cd96dbf94..040e29336e9ec7b936e1ef4c1cb766ec12f7718e 100644 (file)
@@ -27,3 +27,16 @@ entries:
 archive: libgcov.a
 entries: 
     * (noflash)
+
+[mapping]
+archive: libpp.a
+entries: 
+    : ESP32_WIFI_IRAM_OPT = y
+    * (wifi_iram)
+[mapping]
+archive: libnet80211.a
+entries: 
+    : ESP32_WIFI_IRAM_OPT = y
+    * (wifi_iram)