1#! armcc -E
2; command above MUST be in first line (no comment above!)
3
4/*
5;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
6*/
7
8/*--------------------- Flash Configuration ----------------------------------
9; <h> Flash Configuration
10;   <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
11;   <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
12; </h>
13 *----------------------------------------------------------------------------*/
14#define __ROM_BASE      0x08000000
15#define __ROM_SIZE      0x00012C00
16
17/*--------------------- RAMCODE Section Configuration ------------------------
18; <h> RAMCODE Configuration
19;   <o0.27..28> RAMCODE in which MCU
20;               <3=> TAE32F5300
21;               <2=> TAE32F5600
22;               <i> RAMCODE Base Address is different in different MCUs
23;               <i> Unsupported if your MCU is not in the list
24;   <o1> RAMCODE Size (in Bytes) <0x0-0xFFFFFFFF:8>
25; </h>
26 *----------------------------------------------------------------------------*/
27#define __RAMCODE_BASE  0x18000000
28#define __RAMCODE_SIZE  0x00000000
29
30/*--------------------- Embedded RAMA Configuration --------------------------
31; <h> RAMA Configuration
32;   <o0> RAMA Base Address    <0x0-0xFFFFFFFF:8>
33;   <o1> RAMA Size (in Bytes) <0x0-0xFFFFFFFF:8>
34; </h>
35 *----------------------------------------------------------------------------*/
36#define __RAMA_BASE     0x20000000
37#define __RAMA_SIZE     0x00004000
38
39/*--------------------- Embedded RAMB Configuration --------------------------
40; <h> RAMB Configuration
41;   <o0> RAMB Base Address    <0x0-0xFFFFFFFF:8>
42;   <o1> RAMB Size (in Bytes) <0x0-0xFFFFFFFF:8>
43; </h>
44 *----------------------------------------------------------------------------*/
45#define __RAMB_BASE     0x20004000
46#define __RAMB_SIZE     0x00001000
47
48/*--------------------- Embedded RAMC Configuration --------------------------
49; <h> RAMC Configuration
50;   <o0> RAMC Base Address    <0x0-0xFFFFFFFF:8>
51;   <o1> RAMC Size (in Bytes) <0x0-0xFFFFFFFF:8>
52; </h>
53 *----------------------------------------------------------------------------*/
54#define __RAMC_BASE     0x20005000
55#define __RAMC_SIZE     0x00001000
56
57/*--------------------- Stack / Heap Configuration ---------------------------
58; <h> Stack / Heap Configuration
59;   <i> Stack and Heap will be placed in RAMA
60;   <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
61;   <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
62; </h>
63 *----------------------------------------------------------------------------*/
64#define __STACK_SIZE    0x00000400
65#define __HEAP_SIZE     0x00000000
66
67/*
68;------------- <<< end of configuration section >>> ---------------------------
69*/
70
71
72/*----------------------------------------------------------------------------
73  User Stack & Heap boundary definition
74 *----------------------------------------------------------------------------*/
75#define __STACK_TOP    (__RAMA_BASE + __RAMA_SIZE)   /* starts at end of RAMA */
76#define __HEAP_BASE    (AlignExpr(+0, 8))           /* starts after RW_RAMA section, 8 byte aligned */
77
78
79/*----------------------------------------------------------------------------
80  Scatter File Definitions definition
81 *----------------------------------------------------------------------------*/
82#define __RO_BASE       __ROM_BASE
83#define __RO_SIZE       __ROM_SIZE
84
85#define __RW_CODE_BASE  __RAMCODE_BASE
86#define __RW_CODE_SIZE  __RAMCODE_SIZE
87
88#define __RW_BASE      (__RAMA_BASE + __RAMCODE_SIZE)
89#define __RW_SIZE      (__RAMA_SIZE - __RAMCODE_SIZE - __STACK_SIZE - __HEAP_SIZE)
90
91
92LR_ROM __RO_BASE __RO_SIZE  {                       ; load region size_region
93  ER_ROM __RO_BASE __RO_SIZE  {                     ; load address = execution address
94    *.o (RESET, +First)
95    *(InRoot$$Sections)
96    .ANY (+RO)
97    .ANY (+XO)
98  }
99
100#if __RW_CODE_SIZE > 0
101  RW_CODE __RW_CODE_BASE __RW_CODE_SIZE {
102    *.o (RAMCODE)
103  }
104#endif
105
106  RW_RAMA __RW_BASE __RW_SIZE  {                        ; RWA data
107    *.o (SECTION_RAMA)
108    .ANY (+RW +ZI)
109  }
110
111#if __HEAP_SIZE > 0
112  ARM_LIB_HEAP  __HEAP_BASE EMPTY  __HEAP_SIZE  {   ; Reserve empty region for heap
113  }
114#endif
115
116  ARM_LIB_STACK __STACK_TOP EMPTY -__STACK_SIZE {   ; Reserve empty region for stack
117  }
118
119  RW_RAMB __RAMB_BASE __RAMB_SIZE  {                    ; RWB region
120    *.o (SECTION_RAMB)
121  }
122
123  RW_RAMC __RAMC_BASE __RAMC_SIZE  {                    ; RWC region
124    *.o (SECTION_RAMC)
125  }
126}
127
128