mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(psram): support bss on psram on p4
This commit is contained in:
@@ -103,6 +103,9 @@ MEMORY
|
||||
This segment is placed at the beginning of LP RAM, as the end of LP RAM is occupied by LP ROM stack/data
|
||||
*/
|
||||
lp_reserved_seg(RW) : org = 0x50108000, len = RESERVE_RTC_MEM
|
||||
|
||||
/* PSRAM seg */
|
||||
extern_ram_seg(RWX) : org = 0x48000000, len = IDROM_SEG_SIZE
|
||||
}
|
||||
|
||||
/* Heap ends at top of dram0_0_seg */
|
||||
@@ -135,6 +138,12 @@ REGION_ALIAS("rtc_reserved_seg", lp_reserved_seg );
|
||||
REGION_ALIAS("rodata_seg_high", sram_high);
|
||||
#endif // CONFIG_APP_BUILD_USE_FLASH_SECTIONS
|
||||
|
||||
#if CONFIG_SPIRAM_XIP_FROM_PSRAM
|
||||
REGION_ALIAS("ext_ram_seg", drom_seg);
|
||||
#else
|
||||
REGION_ALIAS("ext_ram_seg", extern_ram_seg);
|
||||
#endif //#if CONFIG_SPIRAM_XIP_FROM_PSRAM
|
||||
|
||||
/**
|
||||
* If rodata default segment is placed in `drom_seg`, then flash's first rodata section must
|
||||
* also be first in the segment.
|
||||
|
||||
@@ -475,6 +475,28 @@ SECTIONS
|
||||
mapping[rodata_noload]
|
||||
} > rodata_seg_low
|
||||
|
||||
#if CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
|
||||
#if CONFIG_SPIRAM_XIP_FROM_PSRAM
|
||||
/**
|
||||
* This section is required to skip flash sections, because `extern_ram_seg`
|
||||
* and `drom_seg` / `irom_seg` are on the same bus when xip on psram
|
||||
*/
|
||||
.ext_ram.dummy (NOLOAD):
|
||||
{
|
||||
. = ORIGIN(ext_ram_seg) + (_rodata_reserved_end - _flash_rodata_dummy_start);
|
||||
. = ALIGN (0x10000);
|
||||
} > ext_ram_seg
|
||||
#endif //CONFIG_SPIRAM_XIP_FROM_PSRAM
|
||||
|
||||
/* This section holds .ext_ram.bss data, and will be put in PSRAM */
|
||||
.ext_ram.bss (NOLOAD) :
|
||||
{
|
||||
_ext_ram_bss_start = ABSOLUTE(.);
|
||||
mapping[extern_ram]
|
||||
ALIGNED_SYMBOL(4, _ext_ram_bss_end)
|
||||
} > ext_ram_seg
|
||||
#endif //CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
|
||||
|
||||
.dram0.bss (NOLOAD) :
|
||||
{
|
||||
ALIGNED_SYMBOL(4, _bss_start_low)
|
||||
|
||||
Reference in New Issue
Block a user