Skip to content

Commit 30c8dec

Browse files
committed
Added espressif open feature for wifi stack spi ram
+ see zephyrproject-rtos#88073
1 parent c99f82c commit 30c8dec

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

drivers/wifi/esp32/Kconfig.esp32

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ choice ESP_WIFI_HEAP
3434
config ESP_WIFI_HEAP_SYSTEM
3535
bool "Wi-Fi adapter use kernel mempool heap (k_malloc)"
3636

37+
config ESP_WIFI_HEAP_SPIRAM
38+
bool "Wi-Fi adapter use SPIRAM shared memory head"
39+
3740
endchoice # ESP_WIFI_HEAP
3841

3942
config NET_TCP_WORKQ_STACK_SIZE
@@ -74,6 +77,7 @@ config ESP32_WIFI_STA_SCAN_ALL
7477
config ESP32_WIFI_NET_ALLOC_SPIRAM
7578
bool "Allocate memory of WiFi and NET in SPIRAM"
7679
depends on ESP_SPIRAM
80+
default y if ESP_WIFI_HEAP_SPIRAM
7781
help
7882
Allocate memory of WiFi and NET stack in SPIRAM, increasing available RAM memory space
7983
for application stack.

soc/espressif/esp32s3/default.ld

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,9 @@ SECTIONS
409409
*libzephyr.a:systimer_hal.*(.literal .text .literal.* .text.*)
410410
*libzephyr.a:spi_flash_hal_gpspi.*(.literal .text .literal.* .text.*)
411411

412+
*libzephyr.a:spi_flash_hal.*(.literal .literal.* .text .text.*)
413+
*libzephyr.a:spi_flash_hal_common.*(.literal .literal.* .text .text.*)
414+
412415
/* [mapping:soc] */
413416
*libzephyr.a:lldesc.*(.literal .literal.* .text .text.*)
414417

@@ -651,6 +654,9 @@ SECTIONS
651654
*libzephyr.a:systimer_hal.*(.rodata .rodata.*)
652655
*libzephyr.a:spi_flash_hal_gpspi.*(.rodata .rodata.*)
653656

657+
*libzephyr.a:spi_flash_hal.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*)
658+
*libzephyr.a:spi_flash_hal_common.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*)
659+
654660
/* [mapping:soc] */
655661
*libzephyr.a:lldesc.*(.rodata .rodata.*)
656662

@@ -1000,6 +1006,7 @@ SECTIONS
10001006
.ext_ram.data (NOLOAD) :
10011007
{
10021008
_ext_ram_start = ABSOLUTE(.);
1009+
10031010
_ext_ram_noinit_start = ABSOLUTE(.);
10041011

10051012
#ifdef CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM
@@ -1012,18 +1019,19 @@ SECTIONS
10121019
. = ALIGN(16);
10131020
*(.ext_ram_noinit.*)
10141021
. = ALIGN(16);
1022+
#ifdef CONFIG_ESP_SPIRAM_HEAP_SIZE
1023+
_ext_ram_heap_start = ABSOLUTE(.);
1024+
. += CONFIG_ESP_SPIRAM_HEAP_SIZE;
1025+
. = ALIGN(16);
1026+
_ext_ram_heap_end = ABSOLUTE(.);
1027+
#endif
10151028
_ext_ram_noinit_end = ABSOLUTE(.);
10161029

10171030
_ext_ram_bss_start = ABSOLUTE(.);
10181031
*(.ext_ram.bss*)
10191032
. = ALIGN(16);
10201033
_ext_ram_bss_end = ABSOLUTE(.);
10211034

1022-
_ext_ram_heap_start = ABSOLUTE(.);
1023-
. += CONFIG_ESP_SPIRAM_HEAP_SIZE;
1024-
. = ALIGN(16);
1025-
_ext_ram_heap_end = ABSOLUTE(.);
1026-
10271035
_ext_ram_end = ABSOLUTE(.);
10281036
} GROUP_LINK_IN(EXT_DRAM_REGION)
10291037
#endif /* CONFIG_ESP_SPIRAM */

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ manifest:
162162
groups:
163163
- hal
164164
- name: hal_espressif
165-
revision: 202c59552dc98e5cd02386313e1977ecb17a131f
165+
revision: 1f6173020fb5490eee010bddf184dd2841fc0c89
166166
path: modules/hal/espressif
167167
west-commands: west/west-commands.yml
168168
groups:

0 commit comments

Comments
 (0)