]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo_Hardware_Platform/CMSIS/startup_gcc/debug-in-external-ram.ld
Add missing +TCP code.
[freertos] / FreeRTOS / Demo / CORTEX_SmartFusion2_M2S050_SoftConsole / RTOSDemo_Hardware_Platform / CMSIS / startup_gcc / debug-in-external-ram.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 development board external RAM.
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   esram (rwx) : ORIGIN = 0x20000000, LENGTH = 64k
26   
27   /* SmartFusion2 development board external RAM */
28   external_ram (rwx) : ORIGIN = 0x70000000, LENGTH = 2M
29 }
30
31 RAM_START_ADDRESS = 0x70000000; /* Must be the same value MEMORY region ram ORIGIN above. */
32 RAM_SIZE = 64k;                                 /* Must be the same value MEMORY region ram LENGTH above. */
33 MAIN_STACK_SIZE = 8k;                   /* Cortex main stack size. */
34 PROCESS_STACK_SIZE      = 4k;           /* Cortex process stack size (only available with OS extensions).*/
35
36 /*******************************************************************************
37  * End of board customization.
38  *******************************************************************************/
39  
40 PROVIDE (__main_stack_start = RAM_START_ADDRESS + RAM_SIZE);
41 PROVIDE (__process_stack_start = __main_stack_start - MAIN_STACK_SIZE);
42 PROVIDE (_estack = __main_stack_start);
43 PROVIDE (__mirrored_nvm = 0);   /* Indicate to startup code that NVM is not mirrored to VMA address .text copy is required. */
44
45 SECTIONS
46 {
47   .init :
48   {
49     __vector_table_vma_base_address = .;
50     *(.isr_vector)
51     . = ALIGN(0x4);
52   } >esram
53   
54   .text :
55   {
56     CREATE_OBJECT_SYMBOLS
57     __text_load = LOADADDR(.text);
58     __text_start = .;
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   } >external_ram
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   } >external_ram
103   __exidx_end = .;
104   _etext = .;
105   PROVIDE(__text_end = .);
106
107   .data :
108   {
109     __data_load = LOADADDR (.data);
110     _sidata = LOADADDR (.data);
111     __data_start = .;
112     _sdata = .;
113     KEEP(*(.jcr))
114     *(.got.plt) *(.got)
115     *(.shdata)
116     *(.data .data.* .gnu.linkonce.d.*)
117     . = ALIGN (4);
118     _edata = .;
119   } >external_ram 
120
121   .bss :
122   {
123     __bss_start__ = . ;
124     _sbss = .;
125     *(.shbss)
126     *(.bss .bss.* .gnu.linkonce.b.*)
127     *(COMMON)
128     . = ALIGN (8);
129     __bss_end__ = .;
130     _end = .;
131     __end = _end;
132     _ebss = .;
133     PROVIDE(end = .);
134   } >external_ram 
135
136   /* 
137    * The .stack section is only specified here in order for the linker to generate
138    * an error if the esram is full.
139    */
140   .stack :
141   {
142         . = ALIGN(4);
143     . += PROCESS_STACK_SIZE;
144     . = ALIGN(4);
145     . += MAIN_STACK_SIZE;
146     . = ALIGN(4);
147   } >external_ram
148   
149   .stab 0 (NOLOAD) :
150   {
151     *(.stab)
152   }
153
154   .stabstr 0 (NOLOAD) :
155   {
156     *(.stabstr)
157   }
158   /* DWARF debug sections.
159      Symbols in the DWARF debugging sections are relative to the beginning
160      of the section so we begin them at 0.  */
161   /* DWARF 1 */
162   .debug          0 : { *(.debug) }
163   .line           0 : { *(.line) }
164   /* GNU DWARF 1 extensions */
165   .debug_srcinfo  0 : { *(.debug_srcinfo) }
166   .debug_sfnames  0 : { *(.debug_sfnames) }
167   /* DWARF 1.1 and DWARF 2 */
168   .debug_aranges  0 : { *(.debug_aranges) }
169   .debug_pubnames 0 : { *(.debug_pubnames) }
170   /* DWARF 2 */
171   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
172   .debug_abbrev   0 : { *(.debug_abbrev) }
173   .debug_line     0 : { *(.debug_line) }
174   .debug_frame    0 : { *(.debug_frame) }
175   .debug_str      0 : { *(.debug_str) }
176   .debug_loc      0 : { *(.debug_loc) }
177   .debug_macinfo  0 : { *(.debug_macinfo) }
178   /* SGI/MIPS DWARF 2 extensions */
179   .debug_weaknames 0 : { *(.debug_weaknames) }
180   .debug_funcnames 0 : { *(.debug_funcnames) }
181   .debug_typenames 0 : { *(.debug_typenames) }
182   .debug_varnames  0 : { *(.debug_varnames) }
183   .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
184   .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
185   /DISCARD/ : { *(.note.GNU-stack) *(.isr_vector) }
186 }