soc: esp32: Fix WiFi allocations to SPIRAM
Fix allocations of large buffers if SPIRAM and WiFi alloc to SPIRAM are both enabled. Signed-off-by: Marek Matej <marek.matej@espressif.com>
This commit is contained in:
parent
e9b86891e1
commit
cf73e90acd
1 changed files with 28 additions and 5 deletions
|
@ -680,10 +680,27 @@ SECTIONS
|
||||||
|
|
||||||
.dram0.noinit (NOLOAD) :
|
.dram0.noinit (NOLOAD) :
|
||||||
{
|
{
|
||||||
. = ALIGN (8);
|
. = ALIGN (4);
|
||||||
|
__dram_noinit_start = ABSOLUTE(.);
|
||||||
|
#ifdef CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM
|
||||||
|
*(EXCLUDE_FILE(
|
||||||
|
*libdrivers__wifi.a:*
|
||||||
|
*libsubsys__net__l2__ethernet.a:*
|
||||||
|
*libsubsys__net__lib__config.a:*
|
||||||
|
*libsubsys__net__ip.a:*
|
||||||
|
*libsubsys__net.a:* ) .noinit)
|
||||||
|
*(EXCLUDE_FILE(
|
||||||
|
*libdrivers__wifi.a:*
|
||||||
|
*libsubsys__net__l2__ethernet.a:*
|
||||||
|
*libsubsys__net__lib__config.a:*
|
||||||
|
*libsubsys__net__ip.a:*
|
||||||
|
*libsubsys__net.a:* ) .noinit.*)
|
||||||
|
#else
|
||||||
*(.noinit)
|
*(.noinit)
|
||||||
*(.noinit.*)
|
*(.noinit.*)
|
||||||
. = ALIGN (8);
|
#endif /* CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM */
|
||||||
|
__dram_noinit_end = ABSOLUTE(.);
|
||||||
|
. = ALIGN (4);
|
||||||
} GROUP_LINK_IN(RAMABLE_REGION)
|
} GROUP_LINK_IN(RAMABLE_REGION)
|
||||||
|
|
||||||
/* Provide total SRAM usage, including IRAM and DRAM */
|
/* Provide total SRAM usage, including IRAM and DRAM */
|
||||||
|
@ -700,7 +717,8 @@ SECTIONS
|
||||||
#ifdef CONFIG_ESP_SPIRAM
|
#ifdef CONFIG_ESP_SPIRAM
|
||||||
.ext_ram.bss (NOLOAD):
|
.ext_ram.bss (NOLOAD):
|
||||||
{
|
{
|
||||||
_ext_ram_data_start = ABSOLUTE(.);
|
_ext_ram_start = ABSOLUTE(.);
|
||||||
|
_ext_ram_noinit_start = ABSOLUTE(.);
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM
|
#ifdef CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM
|
||||||
*libdrivers__wifi.a:(.noinit .noinit.*)
|
*libdrivers__wifi.a:(.noinit .noinit.*)
|
||||||
|
@ -709,14 +727,19 @@ SECTIONS
|
||||||
*libsubsys__net__ip.a:(.noinit .noinit.*)
|
*libsubsys__net__ip.a:(.noinit .noinit.*)
|
||||||
*libsubsys__net.a:(.noinit .noinit.*)
|
*libsubsys__net.a:(.noinit .noinit.*)
|
||||||
#endif /* CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM */
|
#endif /* CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM */
|
||||||
|
. = ALIGN(16);
|
||||||
|
_ext_ram_noinit_end = ABSOLUTE(.);
|
||||||
|
|
||||||
_ext_ram_bss_start = ABSOLUTE(.);
|
_ext_ram_bss_start = ABSOLUTE(.);
|
||||||
*(.ext_ram.bss*)
|
*(.ext_ram.bss*)
|
||||||
|
. = ALIGN(16);
|
||||||
_ext_ram_bss_end = ABSOLUTE(.);
|
_ext_ram_bss_end = ABSOLUTE(.);
|
||||||
|
|
||||||
_spiram_heap_start = ABSOLUTE(.);
|
_spiram_heap_start = ABSOLUTE(.);
|
||||||
. = . + CONFIG_ESP_SPIRAM_HEAP_SIZE;
|
. = . + CONFIG_ESP_SPIRAM_HEAP_SIZE;
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
_ext_ram_data_end = ABSOLUTE(.);
|
_ext_ram_end = ABSOLUTE(.);
|
||||||
} GROUP_LINK_IN(ext_ram_seg)
|
} GROUP_LINK_IN(ext_ram_seg)
|
||||||
#endif /* CONFIG_ESP_SPIRAM */
|
#endif /* CONFIG_ESP_SPIRAM */
|
||||||
|
|
||||||
|
@ -900,6 +923,6 @@ SECTIONS
|
||||||
/* --- XTENSA GLUE AND DEBUG END --- */
|
/* --- XTENSA GLUE AND DEBUG END --- */
|
||||||
|
|
||||||
#ifdef CONFIG_ESP_SPIRAM
|
#ifdef CONFIG_ESP_SPIRAM
|
||||||
ASSERT(((_ext_ram_data_end - _ext_ram_data_start) <= CONFIG_ESP_SPIRAM_SIZE),
|
ASSERT(((_ext_ram_end - _ext_ram_start) <= CONFIG_ESP_SPIRAM_SIZE),
|
||||||
"External SPIRAM overflowed.")
|
"External SPIRAM overflowed.")
|
||||||
#endif /* CONFIG_ESP_SPIRAM */
|
#endif /* CONFIG_ESP_SPIRAM */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue