mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(esp_system): riscv: refactor linker scripts to reduce duplicated code
This commit is contained in:
@@ -129,40 +129,27 @@ MEMORY
|
||||
/* Heap ends at top of sram_seg */
|
||||
_heap_end = 0x40000000;
|
||||
|
||||
_data_seg_org = ORIGIN(rtc_data_seg);
|
||||
|
||||
/**
|
||||
* The lines below define location alias for .rtc.data section
|
||||
* As H2 only has RTC fast memory, this is not configurable like on other targets
|
||||
*/
|
||||
REGION_ALIAS("rtc_iram_seg", lp_ram_seg );
|
||||
REGION_ALIAS("rtc_data_seg", rtc_iram_seg );
|
||||
REGION_ALIAS("rtc_slow_seg", rtc_iram_seg );
|
||||
REGION_ALIAS("rtc_data_location", rtc_iram_seg );
|
||||
REGION_ALIAS("rtc_text_seg", lp_ram_seg);
|
||||
REGION_ALIAS("rtc_data_seg", lp_ram_seg);
|
||||
REGION_ALIAS("rtc_slow_seg", lp_ram_seg);
|
||||
REGION_ALIAS("rtc_force_fast_seg", lp_ram_seg);
|
||||
REGION_ALIAS("rtc_force_slow_seg", lp_ram_seg);
|
||||
REGION_ALIAS("rtc_reserved_seg", lp_reserved_seg );
|
||||
|
||||
REGION_ALIAS("iram_text_seg", sram_seg);
|
||||
REGION_ALIAS("dram_seg", sram_seg);
|
||||
|
||||
#if CONFIG_APP_BUILD_USE_FLASH_SECTIONS
|
||||
REGION_ALIAS("default_code_seg", irom_seg);
|
||||
REGION_ALIAS("flash_text_seg", irom_seg);
|
||||
REGION_ALIAS("flash_rodata_seg", drom_seg);
|
||||
#else
|
||||
REGION_ALIAS("default_code_seg", sram_seg);
|
||||
REGION_ALIAS("flash_text_seg", sram_seg);
|
||||
REGION_ALIAS("flash_rodata_seg", sram_seg);
|
||||
#endif // CONFIG_APP_BUILD_USE_FLASH_SECTIONS
|
||||
|
||||
#if CONFIG_APP_BUILD_USE_FLASH_SECTIONS
|
||||
REGION_ALIAS("default_rodata_seg", drom_seg);
|
||||
#else
|
||||
REGION_ALIAS("default_rodata_seg", sram_seg);
|
||||
#endif // CONFIG_APP_BUILD_USE_FLASH_SECTIONS
|
||||
|
||||
/**
|
||||
* If rodata default segment is placed in `drom_seg`, then flash's first rodata section must
|
||||
* also be first in the segment.
|
||||
*/
|
||||
#if CONFIG_APP_BUILD_USE_FLASH_SECTIONS
|
||||
ASSERT(_flash_rodata_dummy_start == ORIGIN(default_rodata_seg),
|
||||
".flash_rodata_dummy section must be placed at the beginning of the rodata segment.")
|
||||
#endif
|
||||
|
||||
#if CONFIG_ESP_SYSTEM_USE_EH_FRAME
|
||||
ASSERT ((__eh_frame_end > __eh_frame), "Error: eh_frame size is null!");
|
||||
ASSERT ((__eh_frame_hdr_end > __eh_frame_hdr), "Error: eh_frame_hdr size is null!");
|
||||
#endif
|
||||
ALIGN_VECTOR_TABLE = 0x100;
|
||||
OFFSET_TEE = 0x2e0;
|
||||
|
||||
Reference in New Issue
Block a user