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