Skip to content

Commit

Permalink
soc: esp32s3: add dram.noinit labels
Browse files Browse the repository at this point in the history
Fixing wifi alloc to spiram.

Signed-off-by: Marek Matej <[email protected]>
  • Loading branch information
Marek Matej committed Dec 10, 2024
1 parent b8782a7 commit e309224
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions soc/espressif/esp32s3/default.ld
Original file line number Diff line number Diff line change
Expand Up @@ -709,18 +709,25 @@ SECTIONS
.dram0.noinit (NOLOAD):
{
. = 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 .noinit.*)
*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.*)
#endif /* CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM */
__dram_noinit_end = ABSOLUTE(.);
. = ALIGN(4) ;
} GROUP_LINK_IN(RAMABLE_REGION)

Expand Down Expand Up @@ -923,12 +930,7 @@ SECTIONS
/* This section holds .ext_ram.bss data, and will be put in PSRAM */
.ext_ram.bss (NOLOAD) :
{
_ext_ram_bss_start = ABSOLUTE(.);
*(.ext_ram.bss*)
. = ALIGN(4);
_ext_ram_bss_end = ABSOLUTE(.);

_ext_ram_data_start = ABSOLUTE(.);
_ext_ram_noinit_start = ABSOLUTE(.);

#ifdef CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM
*libdrivers__wifi.a:(.noinit .noinit.*)
Expand All @@ -937,8 +939,19 @@ SECTIONS
*libsubsys__net__ip.a:(.noinit .noinit.*)
*libsubsys__net.a:(.noinit .noinit.*)
#endif /* CONFIG_ESP32_WIFI_NET_ALLOC_SPIRAM */
. = ALIGN(16);

_ext_ram_noinit_end = ABSOLUTE(.);

_ext_ram_bss_start = ABSOLUTE(.);

*(.ext_ram.bss*)
. = ALIGN(16);

_ext_ram_bss_end = ABSOLUTE(.);

_spiram_heap_start = ABSOLUTE(.);

. = . + CONFIG_ESP_SPIRAM_HEAP_SIZE - (_spiram_heap_start - _ext_ram_bss_start);
. = ALIGN(4);

Expand Down

0 comments on commit e309224

Please sign in to comment.