soc: esp32: allow wifi and net stack into spiram
This PR adds a KConfig option that allows moving
all .noinit content related to wifi a net stack into external
ram. This free dram space to application.
Linker script files are also modified so that the content
are mapped into external ram.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
diff --git a/drivers/wifi/esp32/Kconfig.esp32 b/drivers/wifi/esp32/Kconfig.esp32
index 067681e..7434fde 100644
--- a/drivers/wifi/esp32/Kconfig.esp32
+++ b/drivers/wifi/esp32/Kconfig.esp32
@@ -231,4 +231,11 @@
When this option is disabled, more than 17Kbytes of IRAM memory will be saved
but Wi-Fi performance will be reduced.
+config ESP32_WIFI_NET_ALLOC_SPIRAM
+ bool "Allocate memory of WiFi and NET in SPIRAM"
+ depends on ESP_SPIRAM
+ help
+ Allocate memory of WiFi and NET stack in SPIRAM, increasing available RAM memory space
+ for application stack.
+
endif # WIFI_ESP32