@@ -25,7 +25,8 @@ user_sram_org = HPSRAM_START;
25
25
user_sram_size = (user_sram_end - user_sram_org);
26
26
27
27
/* Aliases */
28
- #define CACHED_REGION mmap0_0_seg
28
+ #define FLASH_CODE_REGION irom0_0_seg
29
+ #define RODATA_REGION drom0_0_seg
29
30
#define RAMABLE_REGION sram0_0_seg
30
31
#define ROMABLE_REGION FLASH
31
32
@@ -38,7 +39,7 @@ user_sram_size = (user_sram_end - user_sram_org);
38
39
/* Flash segments (rodata and text) should be mapped in the virtual address spaces.
39
40
* Executing directly from LMA is not possible. */
40
41
#undef GROUP_ROM_LINK_IN
41
- #define GROUP_ROM_LINK_IN(vregion, lregion) > CACHED_REGION AT > lregion
42
+ #define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
42
43
43
44
/* Make sure new sections have consistent alignment between input and output sections */
44
45
#undef SECTION_DATA_PROLOGUE
65
66
66
67
sram0_0_seg (RW) : org = user_sram_org, len = user_sram_size
67
68
68
- mmap0_0_seg (R) : org = CACHED_ORG, len = CACHED_SIZE
69
+ irom0_0_seg (RX) : org = IROM_SEG_ORG, len = IROM_SEG_LEN
70
+ drom0_0_seg (R) : org = DROM_SEG_ORG, len = DROM_SEG_LEN
69
71
70
72
lp_ram_seg (RW) : org = LPSRAM_IRAM_START,
71
73
len = 0x2000 - RESERVE_RTC_MEM
@@ -770,7 +772,7 @@ SECTIONS
770
772
__rom_region_end = ABSOLUTE (.);
771
773
_etext = .;
772
774
773
- } GROUP_DATA_LINK_IN(CACHED_REGION , ROMABLE_REGION)
775
+ } GROUP_DATA_LINK_IN(FLASH_CODE_REGION , ROMABLE_REGION)
774
776
775
777
/* --- END OF .flash.text --- */
776
778
@@ -782,12 +784,6 @@ SECTIONS
782
784
. = ALIGN (CACHE_ALIGN);
783
785
} GROUP_LINK_IN(ROMABLE_REGION)
784
786
785
- .flash.align_rodata (NOLOAD) :
786
- {
787
- /* Subsequent segment lma and vma align */
788
- . = ALIGN (CACHE_ALIGN);
789
- } GROUP_LINK_IN(CACHED_REGION)
790
-
791
787
/* Symbols used during the application memory mapping */
792
788
_image_drom_start = LOADADDR (.flash.rodata);
793
789
_image_drom_size = _image_rodata_end - _image_rodata_start;
@@ -844,7 +840,7 @@ SECTIONS
844
840
*(.rodata_wlog)
845
841
*(.rodata_wlog*)
846
842
. = ALIGN (4);
847
- } GROUP_DATA_LINK_IN(CACHED_REGION , ROMABLE_REGION)
843
+ } GROUP_DATA_LINK_IN(RODATA_REGION , ROMABLE_REGION)
848
844
849
845
#include <zephyr/linker/cplusplus-rom.ld>
850
846
#include <zephyr/linker/common-rom/common-rom-init.ld>
@@ -864,7 +860,7 @@ SECTIONS
864
860
. = ALIGN (4);
865
861
_rodata_reserved_end = ABSOLUTE (.);
866
862
_image_rodata_end = ABSOLUTE (.);
867
- } GROUP_DATA_LINK_IN(CACHED_REGION , ROMABLE_REGION)
863
+ } GROUP_DATA_LINK_IN(RODATA_REGION , ROMABLE_REGION)
868
864
869
865
/* --- END OF .rodata --- */
870
866
0 commit comments