change(mem): deprecated tcm and added scp memory utils

This commit is contained in:
armando
2026-03-11 10:40:57 +08:00
parent fe2cc0a64c
commit 01942e4eef
30 changed files with 165 additions and 120 deletions

View File

@@ -22,8 +22,8 @@ entries:
rtc_data -> rtc_data
rtc_rodata -> rtc_data
rtc_bss -> rtc_bss
tcm_text -> tcm_text
tcm_data -> tcm_data
scp_text -> scp_text
scp_data -> scp_data
[scheme:rtc]
entries:
@@ -46,13 +46,13 @@ entries:
entries:
text -> iram0_text
[scheme:tcm]
[scheme:scp]
entries:
text -> tcm_text
data -> tcm_data
rodata -> tcm_data
bss -> tcm_bss
common -> tcm_bss
text -> scp_text
data -> scp_data
rodata -> scp_data
bss -> scp_bss
common -> scp_bss
[mapping:default]
archive: *

View File

@@ -52,8 +52,8 @@ MEMORY
* of the various regions. The 'data access port' dram/drom regions map to the same iram/irom regions but
* are connected to the data port of the CPU and eg allow byte-wise access.
*/
/* TCM */
tcm_idram_seg (RX) : org = 0x30100000, len = 0x2000
/* SCP */
scp_idram_seg (RX) : org = 0x30100000, len = 0x2000
#if CONFIG_APP_BUILD_USE_FLASH_SECTIONS
#if CONFIG_SPIRAM_FETCH_INSTRUCTIONS

View File

@@ -157,26 +157,26 @@ SECTIONS
ASSERT((_rtc_fast_length <= LENGTH(rtc_data_seg)),
"RTC_FAST segment data does not fit.")
.tcm.text :
.scp.text :
{
/* Code marked as running out of TCM */
_tcm_text_start = ABSOLUTE(.);
/* Code marked as running out of SCP */
_scp_text_start = ABSOLUTE(.);
arrays[tcm_text]
mapping[tcm_text]
arrays[scp_text]
mapping[scp_text]
_tcm_text_end = ABSOLUTE(.);
} > tcm_idram_seg
_scp_text_end = ABSOLUTE(.);
} > scp_idram_seg
.tcm.data :
.scp.data :
{
_tcm_data_start = ABSOLUTE(.);
_scp_data_start = ABSOLUTE(.);
arrays[tcm_data]
mapping[tcm_data]
arrays[scp_data]
mapping[scp_data]
_tcm_data_end = ABSOLUTE(.);
} > tcm_idram_seg
_scp_data_end = ABSOLUTE(.);
} > scp_idram_seg
.iram0.text :
{

View File

@@ -166,26 +166,26 @@ SECTIONS
ASSERT((_rtc_fast_length <= LENGTH(rtc_data_seg)),
"RTC_FAST segment data does not fit.")
.tcm.text :
.scp.text :
{
/* Code marked as running out of TCM */
_tcm_text_start = ABSOLUTE(.);
/* Code marked as running out of SCP */
_scp_text_start = ABSOLUTE(.);
arrays[tcm_text]
mapping[tcm_text]
arrays[scp_text]
mapping[scp_text]
_tcm_text_end = ABSOLUTE(.);
} > tcm_idram_seg
_scp_text_end = ABSOLUTE(.);
} > scp_idram_seg
.tcm.data :
.scp.data :
{
_tcm_data_start = ABSOLUTE(.);
_scp_data_start = ABSOLUTE(.);
arrays[tcm_data]
mapping[tcm_data]
arrays[scp_data]
mapping[scp_data]
_tcm_data_end = ABSOLUTE(.);
} > tcm_idram_seg
_scp_data_end = ABSOLUTE(.);
} > scp_idram_seg
.iram0.text :
{

View File

@@ -0,0 +1,15 @@
#include "ld.common"
.scp.text :
{
/* Code marked as running out of scp */
_scp_text_start = ABSOLUTE(.);
SECTION_MAPPINGS(scp_text)
_scp_text_end = ABSOLUTE(.);
} > scp_idram_seg
.scp.data :
{
_scp_data_start = ABSOLUTE(.);
SECTION_MAPPINGS(scp_data)
_scp_data_end = ABSOLUTE(.);
} > scp_idram_seg