Skip to content

Commit deaa4fa

Browse files
author
Cruz Monrreal
authored
Merge pull request #8374 from TomoYamanaka/improve_armcc_linkerscript
Renesas : Improve ARMCC linker script
2 parents 8ac60bc + 182a3a8 commit deaa4fa

File tree

3 files changed

+69
-3
lines changed
  • targets/TARGET_RENESAS/TARGET_RZ_A1XX

3 files changed

+69
-3
lines changed

targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/device/TOOLCHAIN_ARM_STD/MBRZA1LU.sct

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,21 @@
77

88
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
99

10-
#include "mem_RZ_A1LU.h"
10+
#define __RAM_BASE 0x20000000
11+
#define __RAM_SIZE 0x00300000
12+
#define __NC_RAM_SIZE 0x00100000
13+
#define __NM_RAM_SIZE (__RAM_SIZE - __NC_RAM_SIZE)
14+
#define __DATA_NC_BASE (__RAM_BASE + __NM_RAM_SIZE + 0x40000000)
15+
16+
#define __UND_STACK_SIZE 0x00000100
17+
#define __SVC_STACK_SIZE 0x00008000
18+
#define __ABT_STACK_SIZE 0x00000100
19+
#define __FIQ_STACK_SIZE 0x00000100
20+
#define __IRQ_STACK_SIZE 0x0000F000
21+
#define __STACK_SIZE (__UND_STACK_SIZE + __SVC_STACK_SIZE + __ABT_STACK_SIZE + __FIQ_STACK_SIZE + __IRQ_STACK_SIZE)
22+
23+
#define __TTB_BASE 0x20000000
24+
#define __TTB_SIZE 0x00004000
1125

1226
#if !defined(MBED_APP_START)
1327
#define MBED_APP_START 0x18000000

targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/device/TOOLCHAIN_ARM_STD/MBRZA1H.sct

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,21 @@
77

88
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
99

10-
#include "mem_RZ_A1H.h"
10+
#define __RAM_BASE 0x20000000
11+
#define __RAM_SIZE 0x00A00000
12+
#define __NC_RAM_SIZE 0x00100000
13+
#define __NM_RAM_SIZE (__RAM_SIZE - __NC_RAM_SIZE)
14+
#define __DATA_NC_BASE (__RAM_BASE + __NM_RAM_SIZE + 0x40000000)
15+
16+
#define __UND_STACK_SIZE 0x00000100
17+
#define __SVC_STACK_SIZE 0x00008000
18+
#define __ABT_STACK_SIZE 0x00000100
19+
#define __FIQ_STACK_SIZE 0x00000100
20+
#define __IRQ_STACK_SIZE 0x0000F000
21+
#define __STACK_SIZE (__UND_STACK_SIZE + __SVC_STACK_SIZE + __ABT_STACK_SIZE + __FIQ_STACK_SIZE + __IRQ_STACK_SIZE)
22+
23+
#define __TTB_BASE 0x20000000
24+
#define __TTB_SIZE 0x00004000
1125

1226
#if !defined(MBED_APP_START)
1327
#define MBED_APP_START 0x18000000

targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_VK_RZ_A1H/device/TOOLCHAIN_ARM_STD/VKRZA1H.sct

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,45 @@
88
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
99

1010
#include "mbed_config.h"
11-
#include "mem_VK_RZ_A1H.h"
11+
12+
#ifdef RUN_FROM_SDRAM
13+
#define __ROM_BASE 0x08000000
14+
#define __ROM_SIZE 0x02000000
15+
#define __VECTOR_BASE 0x08000000
16+
#define __DATA_BASE +0 ALIGN 0x100000
17+
#elif defined (RUN_FROM_SRAM)
18+
#define __ROM_BASE 0x200A0000
19+
#define __ROM_SIZE 0x00960000
20+
#define __VECTOR_BASE 0x200A0000
21+
#define __DATA_BASE +0 ALIGN 0x100000 NOCOMPRESS
22+
#else
23+
#define __ROM_BASE 0x18020000
24+
#define __ROM_SIZE 0x01FE0000
25+
#define __VECTOR_BASE 0x18020000
26+
#define __DATA_BASE 0x20020000
27+
#endif
28+
29+
#ifdef RUN_FROM_SDRAM
30+
#define __RAM_BASE 0x08000000
31+
#define __RAM_SIZE 0x02000000
32+
#define __NC_RAM_SIZE 0x00200000
33+
#else
34+
#define __RAM_BASE 0x20000000
35+
#define __RAM_SIZE 0x00A00000
36+
#define __NC_RAM_SIZE 0x00100000
37+
#endif
38+
#define __NM_RAM_SIZE (__RAM_SIZE - __NC_RAM_SIZE)
39+
#define __DATA_NC_BASE (__RAM_BASE + __NM_RAM_SIZE + 0x40000000)
40+
41+
#define __UND_STACK_SIZE 0x00000100
42+
#define __SVC_STACK_SIZE 0x00008000
43+
#define __ABT_STACK_SIZE 0x00000100
44+
#define __FIQ_STACK_SIZE 0x00000100
45+
#define __IRQ_STACK_SIZE 0x0000F000
46+
#define __STACK_SIZE (__UND_STACK_SIZE + __SVC_STACK_SIZE + __ABT_STACK_SIZE + __FIQ_STACK_SIZE + __IRQ_STACK_SIZE)
47+
48+
#define __TTB_BASE 0x20000000
49+
#define __TTB_SIZE 0x00004000
1250

1351
LOAD_TTB __TTB_BASE __TTB_SIZE ; Page 0 of On-Chip Data Retention RAM
1452
{

0 commit comments

Comments
 (0)