]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M2S050_Development_Kit_SoftConsole/RTOSDemo_Hardware_Platform/CMSIS/startup_gcc/debug-in-microsemi-smartfusion2-envm.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-envm.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 eNVM.
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   /*
25    * WARNING: The words "SOFTCONSOLE", "FLASH", and "USE", the colon ":", and
26    *          the name of the type of flash memory are all in a specific order.
27    *          Please do not modify that comment line, in order to ensure
28    *          debugging of your application will use the flash memory correctly.
29    */
30
31   /* SOFTCONSOLE FLASH USE: microsemi-smartfusion2-envm */
32   rom (rx)  : ORIGIN = 0x60000000, LENGTH = 256k
33   
34   /* SmartFusion2 internal eNVM mirrored to 0x00000000 */
35   romMirror (rx) : ORIGIN = 0x00000000, LENGTH = 256k
36
37   /* SmartFusion2 internal eSRAM */
38   ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64k
39 }
40
41 RAM_START_ADDRESS = 0x20000000;         /* Must be the same value MEMORY region ram ORIGIN above. */
42 RAM_SIZE = 64k;                                         /* Must be the same value MEMORY region ram LENGTH above. */
43 MAIN_STACK_SIZE = 8k;                           /* Cortex main stack size. */
44 PROCESS_STACK_SIZE      = 4k;                   /* Cortex process stack size (only available with OS extensions).*/
45
46 /*******************************************************************************
47  * End of board customization.
48  *******************************************************************************/
49  
50 PROVIDE (__main_stack_start = RAM_START_ADDRESS + RAM_SIZE);
51 PROVIDE (__process_stack_start = __main_stack_start - MAIN_STACK_SIZE);
52 PROVIDE (_estack = __main_stack_start);
53 PROVIDE (__mirrored_nvm = 1);   /* Indicate to startup code that NVM is mirrored to VMA address and no text copy is required. */
54
55 SECTIONS
56 {
57   .init :
58   {
59     __vector_table_vma_base_address = .;
60     *(.isr_vector)
61     . = ALIGN(0x4);
62   } >romMirror AT>rom
63   
64   .text :
65   {
66     CREATE_OBJECT_SYMBOLS
67     __text_load = LOADADDR(.text);
68     __text_start = .;
69     
70     *(.text .text.* .gnu.linkonce.t.*)
71     *(.plt)
72     *(.gnu.warning)
73     *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
74
75     . = ALIGN(0x4);
76     /* These are for running static constructors and destructors under ELF.  */
77     KEEP (*crtbegin.o(.ctors))
78     KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
79     KEEP (*(SORT(.ctors.*)))
80     KEEP (*crtend.o(.ctors))
81     KEEP (*crtbegin.o(.dtors))
82     KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
83     KEEP (*(SORT(.dtors.*)))
84     KEEP (*crtend.o(.dtors))
85
86     *(.rodata .rodata.* .gnu.linkonce.r.*)
87
88     *(.ARM.extab* .gnu.linkonce.armextab.*)
89     *(.gcc_except_table) 
90     *(.eh_frame_hdr)
91     *(.eh_frame)
92
93     KEEP (*(.init))
94     KEEP (*(.fini))
95
96     PROVIDE_HIDDEN (__preinit_array_start = .);
97     KEEP (*(.preinit_array))
98     PROVIDE_HIDDEN (__preinit_array_end = .);
99     PROVIDE_HIDDEN (__init_array_start = .);
100     KEEP (*(SORT(.init_array.*)))
101     KEEP (*(.init_array))
102     PROVIDE_HIDDEN (__init_array_end = .);
103     PROVIDE_HIDDEN (__fini_array_start = .);
104     KEEP (*(.fini_array))
105     KEEP (*(SORT(.fini_array.*)))
106     PROVIDE_HIDDEN (__fini_array_end = .);
107   } >romMirror AT>rom
108
109   /* .ARM.exidx is sorted, so has to go in its own output section.  */
110    __exidx_start = .;
111   .ARM.exidx :
112   {
113     *(.ARM.exidx* .gnu.linkonce.armexidx.*)
114   } >ram AT>rom
115   __exidx_end = .;
116   _etext = .;
117
118   .data :
119   {
120     __data_load = LOADADDR(.data);
121     _sidata = LOADADDR (.data);
122     __data_start = .;
123     _sdata = .;
124     KEEP(*(.jcr))
125     *(.got.plt) *(.got)
126     *(.shdata)
127     *(.data .data.* .gnu.linkonce.d.*)
128     . = ALIGN (4);
129         _edata = .;
130   } >ram AT>rom
131
132   .bss :
133   {
134     __bss_start__ = . ;
135     _sbss = .;
136     *(.shbss)
137     *(.bss .bss.* .gnu.linkonce.b.*)
138     *(COMMON)
139     . = ALIGN (8);
140     __bss_end__ = .;
141     _end = .;
142     __end = _end;
143     _ebss = .;
144     PROVIDE(end = .);
145   } >ram AT>rom
146
147   .stab 0 (NOLOAD) :
148   {
149     *(.stab)
150   }
151
152   .stabstr 0 (NOLOAD) :
153   {
154     *(.stabstr)
155   }
156   /* DWARF debug sections.
157      Symbols in the DWARF debugging sections are relative to the beginning
158      of the section so we begin them at 0.  */
159   /* DWARF 1 */
160   .debug          0 : { *(.debug) }
161   .line           0 : { *(.line) }
162   /* GNU DWARF 1 extensions */
163   .debug_srcinfo  0 : { *(.debug_srcinfo) }
164   .debug_sfnames  0 : { *(.debug_sfnames) }
165   /* DWARF 1.1 and DWARF 2 */
166   .debug_aranges  0 : { *(.debug_aranges) }
167   .debug_pubnames 0 : { *(.debug_pubnames) }
168   /* DWARF 2 */
169   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
170   .debug_abbrev   0 : { *(.debug_abbrev) }
171   .debug_line     0 : { *(.debug_line) }
172   .debug_frame    0 : { *(.debug_frame) }
173   .debug_str      0 : { *(.debug_str) }
174   .debug_loc      0 : { *(.debug_loc) }
175   .debug_macinfo  0 : { *(.debug_macinfo) }
176   /* SGI/MIPS DWARF 2 extensions */
177   .debug_weaknames 0 : { *(.debug_weaknames) }
178   .debug_funcnames 0 : { *(.debug_funcnames) }
179   .debug_typenames 0 : { *(.debug_typenames) }
180   .debug_varnames  0 : { *(.debug_varnames) }
181   .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
182   .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
183   /DISCARD/ : { *(.note.GNU-stack)  }
184 }