Skip to content

Commit d5d4d57

Browse files
Simon Maurerkartben
authored andcommitted
arch: arm: cortex_a_r/cortex_m: fix text region overlap with ram in !XIP
ROM_ADDR and RAM_ADDR is same when CONFIG_XIP is not defined. If we reset the location for RAMABLE region to RAM_ADDR text region, which is part of rom, overlaps with initial ram region. This commit tries to avoid this incorrect behaviour for cortex_a and cortex_m Signed-off-by: Simon Maurer <[email protected]>
1 parent fa45beb commit d5d4d57

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

include/zephyr/arch/arm/cortex_a_r/scripts/linker.ld

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@ SECTIONS
257257

258258
GROUP_START(RAMABLE_REGION)
259259

260+
#ifdef CONFIG_XIP
260261
. = RAM_ADDR;
262+
#endif
263+
261264
/* Align the start of image RAM with the
262265
* minimum granularity required by MPU.
263266
*/

include/zephyr/arch/arm/cortex_m/scripts/linker.ld

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@ SECTIONS
257257

258258
GROUP_START(RAMABLE_REGION)
259259

260+
#ifdef CONFIG_XIP
260261
. = RAM_ADDR;
262+
#endif
263+
261264
/* Align the start of image RAM with the
262265
* minimum granularity required by MPU.
263266
*/

0 commit comments

Comments
 (0)