feat(tcm): added tcm basic support on esp32p4

This commit is contained in:
Armando 2023-07-11 16:07:39 +08:00 committed by Armando (Dou Yiwen)
parent a336b94527
commit 756c36504a
3 changed files with 25 additions and 0 deletions

View File

@ -25,6 +25,9 @@ extern "C" {
// Forces data into DRAM instead of flash // Forces data into DRAM instead of flash
#define DRAM_ATTR _SECTION_ATTR_IMPL(".dram1", __COUNTER__) #define DRAM_ATTR _SECTION_ATTR_IMPL(".dram1", __COUNTER__)
// Forces code into TCM instead of flash
#define TCM_IRAM_ATTR _SECTION_ATTR_IMPL(".tcm.text", __COUNTER__)
// IRAM can only be accessed as an 8-bit memory on ESP32, when CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY is set // IRAM can only be accessed as an 8-bit memory on ESP32, when CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY is set
#define IRAM_8BIT_ACCESSIBLE (CONFIG_IDF_TARGET_ESP32 && CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY) #define IRAM_8BIT_ACCESSIBLE (CONFIG_IDF_TARGET_ESP32 && CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY)

View File

@ -41,3 +41,15 @@ entries:
[sections:extram_bss] [sections:extram_bss]
entries: entries:
.ext_ram.bss+ .ext_ram.bss+
[sections:tcm_text]
entries:
.tcm.text+
[sections:tcm_data]
entries:
.tcm.data+
[sections:tcm_bss]
entries:
.tcm.bss+

View File

@ -22,6 +22,8 @@ entries:
rtc_data -> rtc_data rtc_data -> rtc_data
rtc_rodata -> rtc_data rtc_rodata -> rtc_data
rtc_bss -> rtc_bss rtc_bss -> rtc_bss
tcm_text -> tcm_text
tcm_data -> tcm_data
[scheme:rtc] [scheme:rtc]
entries: entries:
@ -44,6 +46,14 @@ entries:
entries: entries:
text -> iram0_text text -> iram0_text
[scheme:tcm]
entries:
text -> tcm_text
data -> tcm_data
rodata -> tcm_data
bss -> tcm_bss
common -> tcm_bss
[mapping:default] [mapping:default]
archive: * archive: *
entries: entries: