]> git.sur5r.net Git - freertos/blob - Demo/CORTEX_A2F200_IAR_and_Keil/MicroSemi_Code/CMSIS/startup_gcc/debug-in-actel-smartfusion-esram.ld
85e416044b5cde0afa8542ec177e0f39b6b24ea2
[freertos] / Demo / CORTEX_A2F200_IAR_and_Keil / MicroSemi_Code / CMSIS / startup_gcc / debug-in-actel-smartfusion-esram.ld
1 /*******************************************************************************
2  * (c) Copyright 2009 Actel Corporation.  All rights reserved.
3  * 
4  * SmartFusion/Cortex-M3 linker script for creating a SoftConsole downloadable
5  * debug image executing in SmartFusion internal eSRAM.
6  *
7  * SVN $Revision: 1677 $
8  * SVN $Date: 2009-12-02 16:57:29 +0000 (Wed, 02 Dec 2009) $
9  */
10
11  OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
12               "elf32-littlearm")
13 GROUP(-lc -lgcc -lm)
14 OUTPUT_ARCH(arm)
15 ENTRY(Reset_Handler)
16 SEARCH_DIR(.)
17 __DYNAMIC  =  0;
18
19 /*******************************************************************************
20  * Start of board customization.
21  *******************************************************************************/
22 MEMORY
23 {
24   /* SmartFusion internal eSRAM */
25   ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64k
26 }
27
28 RAM_START_ADDRESS = 0x20000000; /* Must be the same value MEMORY region ram ORIGIN above. */
29 RAM_SIZE = 64k;                                 /* Must be the same value MEMORY region ram LENGTH above. */
30 MAIN_STACK_SIZE = 8k;                   /* Cortex main stack size. */
31 PROCESS_STACK_SIZE      = 4k;           /* Cortex process stack size (only available with OS extensions).*/
32
33 /*******************************************************************************
34  * End of board customization.
35  *******************************************************************************/
36  
37 PROVIDE (__main_stack_start = RAM_START_ADDRESS + RAM_SIZE);
38 PROVIDE (__process_stack_start = __main_stack_start - MAIN_STACK_SIZE);
39 PROVIDE (_estack = __main_stack_start);
40 PROVIDE (__mirrored_nvm = 0);   /* Indicate to startup code that NVM is not mirrored to VMA address .text copy is required. */
41
42 SECTIONS
43 {
44   .text :
45   {
46     CREATE_OBJECT_SYMBOLS
47     __text_load = LOADADDR(.text);
48     __text_start = .;
49     *(.isr_vector)
50     *(.text .text.* .gnu.linkonce.t.*)
51     *(.plt)
52     *(.gnu.warning)
53     *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
54
55     . = ALIGN(0x4);
56     /* These are for running static constructors and destructors under ELF.  */
57     KEEP (*crtbegin.o(.ctors))
58     KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
59     KEEP (*(SORT(.ctors.*)))
60     KEEP (*crtend.o(.ctors))
61     KEEP (*crtbegin.o(.dtors))
62     KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
63     KEEP (*(SORT(.dtors.*)))
64     KEEP (*crtend.o(.dtors))
65
66     *(.rodata .rodata.* .gnu.linkonce.r.*)
67
68     *(.ARM.extab* .gnu.linkonce.armextab.*)
69     *(.gcc_except_table) 
70     *(.eh_frame_hdr)
71     *(.eh_frame)
72
73     KEEP (*(.init))
74     KEEP (*(.fini))
75
76     PROVIDE_HIDDEN (__preinit_array_start = .);
77     KEEP (*(.preinit_array))
78     PROVIDE_HIDDEN (__preinit_array_end = .);
79     PROVIDE_HIDDEN (__init_array_start = .);
80     KEEP (*(SORT(.init_array.*)))
81     KEEP (*(.init_array))
82     PROVIDE_HIDDEN (__init_array_end = .);
83     PROVIDE_HIDDEN (__fini_array_start = .);
84     KEEP (*(.fini_array))
85     KEEP (*(SORT(.fini_array.*)))
86     PROVIDE_HIDDEN (__fini_array_end = .);
87   } >ram
88   /* .ARM.exidx is sorted, so has to go in its own output section.  */
89    __exidx_start = .;
90   .ARM.exidx :
91   {
92     *(.ARM.exidx* .gnu.linkonce.armexidx.*)
93   } >ram
94   __exidx_end = .;
95   _etext = .;
96   PROVIDE(__text_end = .);
97
98   .data :
99   {
100     __data_load = LOADADDR (.data);
101     _sidata = LOADADDR (.data);
102     __data_start = .;
103     _sdata = .;
104     KEEP(*(.jcr))
105     *(.got.plt) *(.got)
106     *(.shdata)
107     *(.data .data.* .gnu.linkonce.d.*)
108     . = ALIGN (4);
109     _edata = .;
110   } >ram 
111
112   .bss :
113   {
114     __bss_start__ = . ;
115     _sbss = .;
116     *(.shbss)
117     *(.bss .bss.* .gnu.linkonce.b.*)
118     *(COMMON)
119     . = ALIGN (8);
120     __bss_end__ = .;
121     _end = .;
122     __end = _end;
123     _ebss = .;
124     PROVIDE(end = .);
125   } >ram 
126
127   /* 
128    * The .stack section is only specified here in order for the linker to generate
129    * an error if the ram is full.
130    */
131   .stack :
132   {
133         . = ALIGN(4);
134     . += PROCESS_STACK_SIZE;
135     . = ALIGN(4);
136     . += MAIN_STACK_SIZE;
137     . = ALIGN(4);
138   } >ram
139   
140   .stab 0 (NOLOAD) :
141   {
142     *(.stab)
143   }
144
145   .stabstr 0 (NOLOAD) :
146   {
147     *(.stabstr)
148   }
149   /* DWARF debug sections.
150      Symbols in the DWARF debugging sections are relative to the beginning
151      of the section so we begin them at 0.  */
152   /* DWARF 1 */
153   .debug          0 : { *(.debug) }
154   .line           0 : { *(.line) }
155   /* GNU DWARF 1 extensions */
156   .debug_srcinfo  0 : { *(.debug_srcinfo) }
157   .debug_sfnames  0 : { *(.debug_sfnames) }
158   /* DWARF 1.1 and DWARF 2 */
159   .debug_aranges  0 : { *(.debug_aranges) }
160   .debug_pubnames 0 : { *(.debug_pubnames) }
161   /* DWARF 2 */
162   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
163   .debug_abbrev   0 : { *(.debug_abbrev) }
164   .debug_line     0 : { *(.debug_line) }
165   .debug_frame    0 : { *(.debug_frame) }
166   .debug_str      0 : { *(.debug_str) }
167   .debug_loc      0 : { *(.debug_loc) }
168   .debug_macinfo  0 : { *(.debug_macinfo) }
169   /* SGI/MIPS DWARF 2 extensions */
170   .debug_weaknames 0 : { *(.debug_weaknames) }
171   .debug_funcnames 0 : { *(.debug_funcnames) }
172   .debug_typenames 0 : { *(.debug_typenames) }
173   .debug_varnames  0 : { *(.debug_varnames) }
174   .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
175   .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
176   /DISCARD/ : { *(.note.GNU-stack) *(.isr_vector) }
177 }