]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M2S050_Development_Kit_SoftConsole/RTOSDemo_Hardware_Platform/CMSIS/startup_gcc/debug-in-microsemi-smartfusion2-esram.ld
Add SmartFusion2 demo for the SmartFustion2 development kit.
[freertos] / FreeRTOS / Demo / CORTEX_M2S050_Development_Kit_SoftConsole / RTOSDemo_Hardware_Platform / CMSIS / startup_gcc / debug-in-microsemi-smartfusion2-esram.ld
1 /*******************************************************************************
2  * (c) Copyright 2012-2013 Microsemi SoC Products Group.  All rights reserved.
3  *
4  * SmartFusion2 Cortex-M3 linker script for creating a SoftConsole downloadable
5  * debug image executing in SmartFusion2 internal eSRAM.
6  *
7  * SVN $Revision: 5269 $
8  * SVN $Date: 2013-03-21 20:53:38 +0000 (Thu, 21 Mar 2013) $
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   /* SmartFusion2 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 = 1k;                   /* Cortex main stack size. */
31 PROCESS_STACK_SIZE      = 0k;           /* 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     __vector_table_vma_base_address = .;
50     *(.isr_vector)
51     *(.text .text.* .gnu.linkonce.t.*)
52     *(.plt)
53     *(.gnu.warning)
54     *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
55
56     . = ALIGN(0x4);
57     /* These are for running static constructors and destructors under ELF.  */
58     KEEP (*crtbegin.o(.ctors))
59     KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
60     KEEP (*(SORT(.ctors.*)))
61     KEEP (*crtend.o(.ctors))
62     KEEP (*crtbegin.o(.dtors))
63     KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
64     KEEP (*(SORT(.dtors.*)))
65     KEEP (*crtend.o(.dtors))
66
67     *(.rodata .rodata.* .gnu.linkonce.r.*)
68
69     *(.ARM.extab* .gnu.linkonce.armextab.*)
70     *(.gcc_except_table)
71     *(.eh_frame_hdr)
72     *(.eh_frame)
73
74     KEEP (*(.init))
75     KEEP (*(.fini))
76
77     PROVIDE_HIDDEN (__preinit_array_start = .);
78     KEEP (*(.preinit_array))
79     PROVIDE_HIDDEN (__preinit_array_end = .);
80     PROVIDE_HIDDEN (__init_array_start = .);
81     KEEP (*(SORT(.init_array.*)))
82     KEEP (*(.init_array))
83     PROVIDE_HIDDEN (__init_array_end = .);
84     PROVIDE_HIDDEN (__fini_array_start = .);
85     KEEP (*(.fini_array))
86     KEEP (*(SORT(.fini_array.*)))
87     PROVIDE_HIDDEN (__fini_array_end = .);
88   } >ram
89   /* .ARM.exidx is sorted, so has to go in its own output section.  */
90    __exidx_start = .;
91   .ARM.exidx :
92   {
93     *(.ARM.exidx* .gnu.linkonce.armexidx.*)
94   } >ram
95   __exidx_end = .;
96   _etext = .;
97   PROVIDE(__text_end = .);
98
99   .data :
100   {
101     __data_load = LOADADDR (.data);
102     _sidata = LOADADDR (.data);
103     __data_start = .;
104     _sdata = .;
105     KEEP(*(.jcr))
106     *(.got.plt) *(.got)
107     *(.shdata)
108     *(.data .data.* .gnu.linkonce.d.*)
109     . = ALIGN (4);
110     _edata = .;
111   } >ram
112
113   .bss :
114   {
115     __bss_start__ = . ;
116     _sbss = .;
117     *(.shbss)
118     *(.bss .bss.* .gnu.linkonce.b.*)
119     *(COMMON)
120     . = ALIGN (8);
121     __bss_end__ = .;
122     _end = .;
123     __end = _end;
124     _ebss = .;
125     PROVIDE(end = .);
126   } >ram
127
128   /*
129    * The .stack section is only specified here in order for the linker to generate
130    * an error if the ram is full.
131    */
132   .stack :
133   {
134         . = ALIGN(4);
135     . += PROCESS_STACK_SIZE;
136     . = ALIGN(4);
137     . += MAIN_STACK_SIZE;
138     . = ALIGN(4);
139   } >ram
140
141   .stab 0 (NOLOAD) :
142   {
143     *(.stab)
144   }
145
146   .stabstr 0 (NOLOAD) :
147   {
148     *(.stabstr)
149   }
150   /* DWARF debug sections.
151      Symbols in the DWARF debugging sections are relative to the beginning
152      of the section so we begin them at 0.  */
153   /* DWARF 1 */
154   .debug          0 : { *(.debug) }
155   .line           0 : { *(.line) }
156   /* GNU DWARF 1 extensions */
157   .debug_srcinfo  0 : { *(.debug_srcinfo) }
158   .debug_sfnames  0 : { *(.debug_sfnames) }
159   /* DWARF 1.1 and DWARF 2 */
160   .debug_aranges  0 : { *(.debug_aranges) }
161   .debug_pubnames 0 : { *(.debug_pubnames) }
162   /* DWARF 2 */
163   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
164   .debug_abbrev   0 : { *(.debug_abbrev) }
165   .debug_line     0 : { *(.debug_line) }
166   .debug_frame    0 : { *(.debug_frame) }
167   .debug_str      0 : { *(.debug_str) }
168   .debug_loc      0 : { *(.debug_loc) }
169   .debug_macinfo  0 : { *(.debug_macinfo) }
170   /* SGI/MIPS DWARF 2 extensions */
171   .debug_weaknames 0 : { *(.debug_weaknames) }
172   .debug_funcnames 0 : { *(.debug_funcnames) }
173   .debug_typenames 0 : { *(.debug_typenames) }
174   .debug_varnames  0 : { *(.debug_varnames) }
175   .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
176   .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
177   /DISCARD/ : { *(.note.GNU-stack) *(.isr_vector) }
178 }