Skip to content

Commit fd7bde7

Browse files
linker: place const custom sections in RAM
The custom const sections are placed in FLASH and being copied from .dinit to Flash again, We can avoid that by placing the section in RAM to begin with Signed-off-by: Muhammed Zamroodh <[email protected]>
1 parent 2576c04 commit fd7bde7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/zephyr/linker/linker-tool-gcc.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@
118118
#define GROUP_ROM_LINK_IN(vregion, lregion)
119119
#elif defined(K_MEM_IS_VM_KERNEL)
120120
#define GROUP_ROM_LINK_IN(vregion, lregion) > vregion AT > lregion
121+
#elif defined(__XC_DSC__) || defined(__XCDSC_LINKER_CMD__)
122+
#define GROUP_ROM_LINK_IN(vregion, lregion) > vregion
121123
#else
122124
#define GROUP_ROM_LINK_IN(vregion, lregion) > lregion
123125
#endif
@@ -138,6 +140,8 @@
138140
#define GROUP_DATA_LINK_IN(vregion, lregion)
139141
#elif defined(CONFIG_XIP) || defined(K_MEM_IS_VM_KERNEL)
140142
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion AT > lregion
143+
#elif defined(__XC_DSC__) || defined(__XCDSC_LINKER_CMD__)
144+
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
141145
#else
142146
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
143147
#endif
@@ -158,6 +162,8 @@
158162
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion AT > lregion
159163
#elif defined(CONFIG_XIP)
160164
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion AT > vregion
165+
#elif defined(__XC_DSC__) || defined(__XCDSC_LINKER_CMD__)
166+
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion
161167
#else
162168
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion
163169
#endif

0 commit comments

Comments
 (0)