~efargaspro/+junk/codeblocks-16.01-release

« back to all changes in this revision

Viewing changes to src/plugins/scriptedwizard/resources/tricore/templates/TriBoard-TC1762/targetIntResources.ld

  • Committer: damienlmoore at gmail
  • Date: 2016-02-02 02:43:22 UTC
  • Revision ID: damienlmoore@gmail.com-20160202024322-yql5qmtbwdyamdwd
Code::BlocksĀ 16.01

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Default linker script, for normal executables */
 
2
OUTPUT_FORMAT("elf32-tricore")
 
3
OUTPUT_ARCH(tricore)
 
4
ENTRY(_start)
 
5
 
 
6
/* __TC1762__ __TC13__ with Core TC1.3 */
 
7
__TRICORE_DERIVATE_MEMORY_MAP__ = 0x1762;
 
8
 
 
9
/* the internal FLASH description */
 
10
__EXT_CODE_RAM_BEGIN = 0xa0000000;
 
11
__EXT_CODE_RAM_SIZE = 1024K ;
 
12
/* the internal ram description */
 
13
__INT_CODE_RAM_BEGIN = 0xd4000000;
 
14
__INT_CODE_RAM_SIZE = 8K;
 
15
__INT_DATA_RAM_BEGIN = 0xd0000000;
 
16
__INT_DATA_RAM_SIZE = 32K;
 
17
__RAM_END = __INT_DATA_RAM_BEGIN + __INT_DATA_RAM_SIZE;
 
18
 
 
19
 
 
20
MEMORY
 
21
{
 
22
  ext_cram (rx!p):      org = 0xa0000000, len = 1024K
 
23
  int_cram (rx!p):      org = 0xd4000000, len = 8K
 
24
  int_dram (w!xp):      org = 0xd0002000, len = 24K
 
25
}
 
26
/*
 
27
 * Define the sizes of the user and system stacks.
 
28
 */
 
29
__ISTACK_SIZE = DEFINED (__ISTACK_SIZE) ? __ISTACK_SIZE : 64 ;
 
30
__USTACK_SIZE = DEFINED (__USTACK_SIZE) ? __USTACK_SIZE : 1K ;
 
31
/*
 
32
 * The heap is the memory between the top of the user stack and
 
33
 * __RAM_END (as defined above); programs can dynamically allocate
 
34
 * space in this area using malloc() and various other functions.
 
35
 * Below you can define the minimum amount of memory that the heap
 
36
 * should provide.
 
37
 */
 
38
__HEAP_MIN = DEFINED (__HEAP_MIN) ? __HEAP_MIN : 512 ;
 
39
/*
 
40
 * Define the start address and the size of the context save area.
 
41
 */
 
42
__CSA_BEGIN = DEFINED (__CSA_BEGIN) ? __CSA_BEGIN : 0xd0000000 ;
 
43
__CSA_SIZE = DEFINED (__CSA_SIZE) ? __CSA_SIZE : 8k ;
 
44
__CSA_END = __CSA_BEGIN + __CSA_SIZE ;
 
45
 
 
46
SECTIONS
 
47
{
 
48
  /*
 
49
   * The startup code should be placed where the CPU expects it after a reset,
 
50
   * so we try to locate it first, no matter where it appears in the list of
 
51
   * objects and libraries (note: because the wildcard pattern doesn't match
 
52
   * directories, we'll try to find crt0.o in various (sub)directories).
 
53
   */
 
54
  .startup :
 
55
  {
 
56
    KEEP (*(.startup_code))
 
57
    . = ALIGN(8);
 
58
  } > int_cram =0
 
59
  /*
 
60
   * Allocate space for absolute addressable sections; this requires that
 
61
   * "int_dram" starts at a TriCore segment (256M) and points to
 
62
   * some RAM area!  If these conditions are not met by your particular
 
63
   * hardware setup, you should either not use absolute data, or you
 
64
   * must move .zdata*,.zbss*,.bdata*,.bbss* input sections to some appropriate
 
65
   * memory area.
 
66
   */
 
67
 .zbss  (NOLOAD) :
 
68
  {
 
69
    ZBSS_BASE = . ;
 
70
    *(.zbss)
 
71
    *(.zbss.*)
 
72
    *(.gnu.linkonce.zb.*)
 
73
    *(.bbss)
 
74
    *(.bbss.*)
 
75
    . = ALIGN(8);
 
76
    ZBSS_END = . ;
 
77
  } > int_dram
 
78
  .zdata  :
 
79
  {
 
80
    ZDATA_BASE = . ;
 
81
    *(.zrodata)
 
82
    *(.zrodata.*)
 
83
    *(.zdata)
 
84
    *(.zdata.*)
 
85
    *(.gnu.linkonce.z.*)
 
86
    *(.bdata)
 
87
    *(.bdata.*)
 
88
    . = ALIGN(8);
 
89
    ZDATA_END = . ;
 
90
  } > int_dram AT> int_cram
 
91
 
 
92
  /*
 
93
   * Allocate trap and interrupt vector tables.
 
94
   */
 
95
  .traptab  :
 
96
  {
 
97
    *(.traptab)
 
98
    . = ALIGN(8) ;
 
99
  } > int_cram
 
100
 
 
101
  .inttab  :
 
102
  {
 
103
    *(.inttab)
 
104
    . = ALIGN(8) ;
 
105
  } > int_cram
 
106
 
 
107
  .init  :
 
108
  {
 
109
    *(.init)
 
110
    *(.fini)
 
111
    . = ALIGN(8);
 
112
  } > int_cram =0
 
113
 
 
114
  /*
 
115
   * Allocate .text and other read-only sections.
 
116
   */
 
117
  .text  :
 
118
  {
 
119
    *(.text)
 
120
    *(.text.*)
 
121
    *(.gnu.linkonce.t.*)
 
122
    /*
 
123
     * .gnu.warning sections are handled specially by elf32.em.
 
124
     */
 
125
    *(.gnu.warning)
 
126
 
 
127
    . = ALIGN(8);
 
128
  } > int_cram =0
 
129
  .rodata   :
 
130
  {
 
131
    *(.rodata)
 
132
    *(.rodata.*)
 
133
    *(.gnu.linkonce.r.*)
 
134
    *(.rodata1)
 
135
    *(.toc)
 
136
    *(.jcr)
 
137
    /*
 
138
     * Create the clear and copy tables that tell the startup code
 
139
     * which memory areas to clear and to copy, respectively.
 
140
     */
 
141
    . = ALIGN(4) ;
 
142
    PROVIDE(__clear_table = .) ;
 
143
    LONG(0 + ADDR(.bss));     LONG(SIZEOF(.bss));
 
144
    LONG(0 + ADDR(.sbss));    LONG(SIZEOF(.sbss));
 
145
    LONG(0 + ADDR(.zbss));    LONG(SIZEOF(.zbss));
 
146
    LONG(-1);                 LONG(-1);
 
147
    PROVIDE(__copy_table = .) ;
 
148
    LONG(LOADADDR(.data));    LONG(0 + ADDR(.data));  LONG(SIZEOF(.data));
 
149
    LONG(LOADADDR(.sdata));   LONG(0 + ADDR(.sdata)); LONG(SIZEOF(.sdata));
 
150
    LONG(LOADADDR(.zdata));   LONG(0 + ADDR(.zdata)); LONG(SIZEOF(.zdata));
 
151
    LONG(-1);                 LONG(-1);               LONG(-1);
 
152
    . = ALIGN(8);
 
153
  } > int_cram
 
154
  .sdata2  :
 
155
  {
 
156
    *(.sdata.rodata)
 
157
    *(.sdata.rodata.*)
 
158
    . = ALIGN(8);
 
159
  } > int_cram
 
160
  /*
 
161
   * C++ exception handling tables.  NOTE: gcc emits .eh_frame
 
162
   * sections when compiling C sources with debugging enabled (-g).
 
163
   * If you can be sure that your final application consists
 
164
   * exclusively of C objects (i.e., no C++ objects), you may use
 
165
   * the -R option of the "strip" and "objcopy" utilities to remove
 
166
   * the .eh_frame section from the executable.
 
167
   */
 
168
  .eh_frame  :
 
169
  {
 
170
    *(.gcc_except_table)
 
171
    __EH_FRAME_BEGIN__ = . ;
 
172
    KEEP (*(.eh_frame))
 
173
    __EH_FRAME_END__ = . ;
 
174
    . = ALIGN(8);
 
175
  } > int_cram
 
176
  /*
 
177
   * Constructors and destructors.
 
178
   */
 
179
  .ctors :
 
180
  {
 
181
    __CTOR_LIST__ = . ;
 
182
    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2);
 
183
    *(.ctors)
 
184
    LONG(0) ;
 
185
    __CTOR_END__ = . ;
 
186
    . = ALIGN(8);
 
187
  } > int_cram
 
188
  .dtors :
 
189
  {
 
190
    __DTOR_LIST__ = . ;
 
191
    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2);
 
192
    *(.dtors)
 
193
    LONG(0) ;
 
194
    __DTOR_END__ = . ;
 
195
    . = ALIGN(8);
 
196
  } > int_cram
 
197
  /*
 
198
   * We're done now with the text part of the executable.  The
 
199
   * following sections are special in that their initial code or
 
200
   * data (if any) must also be stored in said text part of an
 
201
   * executable, but they "live" at completely different addresses
 
202
   * at runtime -- usually in RAM areas.  NOTE: This is not really
 
203
   * necessary if you use a special program loader (e.g., a debugger)
 
204
   * to load a complete executable consisting of code, data, BSS, etc.
 
205
   * into the RAM of some target hardware or a simulator, but it *is*
 
206
   * necessary if you want to burn your application into non-volatile
 
207
   * memories such as EPROM or FLASH.
 
208
   */
 
209
  .data :
 
210
  {
 
211
    . = ALIGN(8) ;
 
212
    DATA_BASE = . ;
 
213
    *(.data)
 
214
    *(.data.*)
 
215
    *(.gnu.linkonce.d.*)
 
216
    SORT(CONSTRUCTORS)
 
217
    . = ALIGN(8) ;
 
218
    DATA_END = . ;
 
219
  } > int_dram AT> int_cram
 
220
  .sdata  :
 
221
  {
 
222
    . = ALIGN(8) ;
 
223
    SDATA_BASE = . ;
 
224
    PROVIDE(__sdata_start = .);
 
225
    *(.sdata)
 
226
    *(.sdata.*)
 
227
    *(.gnu.linkonce.s.*)
 
228
    . = ALIGN(8) ;
 
229
  } > int_dram AT> int_cram
 
230
  .sbss  :
 
231
  {
 
232
    PROVIDE(__sbss_start = .);
 
233
    *(.sbss)
 
234
    *(.sbss.*)
 
235
    *(.gnu.linkonce.sb.*)
 
236
    . = ALIGN(8) ;
 
237
  } > int_dram
 
238
  /*
 
239
   * Allocate space for BSS sections.
 
240
   */
 
241
  .bss  (NOLOAD) :
 
242
  {
 
243
    BSS_BASE = . ;
 
244
    *(.bss)
 
245
    *(.bss.*)
 
246
    *(.gnu.linkonce.b.*)
 
247
    *(COMMON)
 
248
    . = ALIGN(8) ;
 
249
    __ISTACK = . + __ISTACK_SIZE ;
 
250
    __USTACK = __ISTACK + __USTACK_SIZE ;
 
251
    __HEAP = __USTACK ;
 
252
    __HEAP_END = __RAM_END ;
 
253
  } > int_dram
 
254
  _end = __HEAP_END ;
 
255
  PROVIDE(end = _end) ;
 
256
  /* Make sure CSA, stack and heap addresses are properly aligned.  */
 
257
  _. = ASSERT ((__CSA_BEGIN & 0x3f) == 0 , "illegal CSA start address") ;
 
258
  _. = ASSERT ((__CSA_SIZE & 0x3f) == 0 , "illegal CSA size") ;
 
259
  _. = ASSERT ((__ISTACK & 7) == 0 , "ISTACK not doubleword aligned") ;
 
260
  _. = ASSERT ((__USTACK & 7) == 0 , "USTACK not doubleword aligned") ;
 
261
  _. = ASSERT ((__HEAP_END & 7) == 0 , "HEAP not doubleword aligned") ;
 
262
 
 
263
  /* Define a default symbol for address 0.  */
 
264
  NULL = DEFINED (NULL) ? NULL : 0 ;
 
265
  /*
 
266
   * DWARF debug sections.
 
267
   * Symbols in the DWARF debugging sections are relative to the
 
268
   * beginning of the section, so we begin them at 0.
 
269
   */
 
270
  /*
 
271
   * DWARF 1
 
272
   */
 
273
  .comment         0 : { *(.comment) }
 
274
  .debug           0 : { *(.debug) }
 
275
  .line            0 : { *(.line) }
 
276
  /*
 
277
   * GNU DWARF 1 extensions
 
278
   */
 
279
  .debug_srcinfo   0 : { *(.debug_srcinfo) }
 
280
  .debug_sfnames   0 : { *(.debug_sfnames) }
 
281
  /*
 
282
   * DWARF 1.1 and DWARF 2
 
283
   */
 
284
  .debug_aranges   0 : { *(.debug_aranges) }
 
285
  .debug_pubnames  0 : { *(.debug_pubnames) }
 
286
  /*
 
287
   * DWARF 2
 
288
   */
 
289
  .debug_info      0 : { *(.debug_info) }
 
290
  .debug_abbrev    0 : { *(.debug_abbrev) }
 
291
  .debug_line      0 : { *(.debug_line) }
 
292
  .debug_frame     0 : { *(.debug_frame) }
 
293
  .debug_str       0 : { *(.debug_str) }
 
294
  .debug_loc       0 : { *(.debug_loc) }
 
295
  .debug_macinfo   0 : { *(.debug_macinfo) }
 
296
  .debug_ranges    0 : { *(.debug_ranges) }
 
297
  /*
 
298
   * SGI/MIPS DWARF 2 extensions
 
299
   */
 
300
  .debug_weaknames 0 : { *(.debug_weaknames) }
 
301
  .debug_funcnames 0 : { *(.debug_funcnames) }
 
302
  .debug_typenames 0 : { *(.debug_typenames) }
 
303
  .debug_varnames  0 : { *(.debug_varnames) }
 
304
  /*
 
305
   * Optional sections that may only appear when relocating.
 
306
   */
 
307
  /*
 
308
   * Optional sections that may appear regardless of relocating.
 
309
   */
 
310
  .version_info    0 : { *(.version_info) }
 
311
  .boffs           0 : { KEEP (*(.boffs)) }
 
312
}