Mercurial > ~darius > hgwebdir.cgi > stm32temp
comparison libs/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/CortexM3/MPU/Linker/RIDE/stm32F_flash_ROAarray.ld @ 0:c59513fd84fb
Initial commit of STM32 test code.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 03 Oct 2011 21:19:15 +1030 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c59513fd84fb |
---|---|
1 /* | |
2 Default linker script for STM32F10xx_1024K_96K | |
3 Copyright RAISONANCE S.A.S. 2008 | |
4 */ | |
5 | |
6 /* include the common STM32F10xx sub-script */ | |
7 | |
8 /* Common part of the linker scripts for STM32F devices*/ | |
9 | |
10 | |
11 /* default stack sizes. | |
12 | |
13 These are used by the startup in order to allocate stacks for the different modes. | |
14 */ | |
15 | |
16 __Stack_Size = 1024 ; | |
17 | |
18 PROVIDE ( _Stack_Size = __Stack_Size ) ; | |
19 | |
20 __Stack_Init = _estack - __Stack_Size ; | |
21 | |
22 /*"PROVIDE" allows to easily override these values from an object file or the commmand line.*/ | |
23 PROVIDE ( _Stack_Init = __Stack_Init ) ; | |
24 | |
25 /* | |
26 There will be a link error if there is not this amount of RAM free at the end. | |
27 */ | |
28 _Minimum_Stack_Size = 0x100 ; | |
29 | |
30 | |
31 /* include the memory spaces definitions sub-script */ | |
32 /* | |
33 Linker subscript for STM32F10xx definitions with 1024 Flash and 96 Onchip SRAM */ | |
34 | |
35 /* Memory Spaces Definitions */ | |
36 | |
37 MEMORY | |
38 { | |
39 RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K | |
40 FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K | |
41 FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0 | |
42 EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0 | |
43 EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0 | |
44 EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0 | |
45 EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0 | |
46 MEMORY_ARRAY (xrw) : ORIGIN = 0x20002000, LENGTH = 32 | |
47 } | |
48 | |
49 /* higher address of the user mode stack */ | |
50 _estack = 0x20018000; | |
51 | |
52 | |
53 | |
54 /* include the sections management sub-script for FLASH mode */ | |
55 | |
56 /* Sections Definitions */ | |
57 | |
58 SECTIONS | |
59 { | |
60 /* for Cortex devices, the beginning of the startup code is stored in the .isr_vector section, which goes to FLASH */ | |
61 .isr_vector : | |
62 { | |
63 . = ALIGN(4); | |
64 KEEP(*(.isr_vector)) /* Startup code */ | |
65 . = ALIGN(4); | |
66 } >FLASH | |
67 | |
68 /* for some STRx devices, the beginning of the startup code is stored in the .flashtext section, which goes to FLASH */ | |
69 .flashtext : | |
70 { | |
71 . = ALIGN(4); | |
72 *(.flashtext) /* Startup code */ | |
73 . = ALIGN(4); | |
74 } >FLASH | |
75 | |
76 | |
77 /* the program code is stored in the .text section, which goes to Flash */ | |
78 .text : | |
79 { | |
80 . = ALIGN(4); | |
81 | |
82 *(.text) /* remaining code */ | |
83 *(.text.*) /* remaining code */ | |
84 *(.rodata) /* read-only data (constants) */ | |
85 *(.rodata*) | |
86 *(.glue_7) | |
87 *(.glue_7t) | |
88 | |
89 . = ALIGN(4); | |
90 _etext = .; | |
91 /* This is used by the startup in order to initialize the .data secion */ | |
92 _sidata = _etext; | |
93 } >FLASH | |
94 | |
95 /* MEMORY_ARRAY */ | |
96 .ROarraySection : | |
97 { | |
98 *(.ROarraySection) | |
99 } >MEMORY_ARRAY | |
100 | |
101 | |
102 /* This is the initialized data section | |
103 The program executes knowing that the data is in the RAM | |
104 but the loader puts the initial values in the FLASH (inidata). | |
105 It is one task of the startup to copy the initial values from FLASH to RAM. */ | |
106 .data : AT ( _sidata ) | |
107 { | |
108 . = ALIGN(4); | |
109 /* This is used by the startup in order to initialize the .data secion */ | |
110 _sdata = . ; | |
111 | |
112 *(.data) | |
113 *(.data.*) | |
114 | |
115 . = ALIGN(4); | |
116 /* This is used by the startup in order to initialize the .data secion */ | |
117 _edata = . ; | |
118 } >RAM | |
119 | |
120 | |
121 | |
122 /* This is the uninitialized data section */ | |
123 .bss : | |
124 { | |
125 . = ALIGN(4); | |
126 /* This is used by the startup in order to initialize the .bss secion */ | |
127 _sbss = .; | |
128 | |
129 *(.bss) | |
130 *(COMMON) | |
131 | |
132 . = ALIGN(4); | |
133 /* This is used by the startup in order to initialize the .bss secion */ | |
134 _ebss = . ; | |
135 } >RAM | |
136 | |
137 PROVIDE ( end = _ebss ); | |
138 PROVIDE ( _end = _ebss ); | |
139 | |
140 /* This is the user stack section | |
141 This is just to check that there is enough RAM left for the User mode stack | |
142 It should generate an error if it's full. | |
143 */ | |
144 ._usrstack : | |
145 { | |
146 . = ALIGN(4); | |
147 _susrstack = . ; | |
148 | |
149 . = . + _Minimum_Stack_Size ; | |
150 | |
151 . = ALIGN(4); | |
152 _eusrstack = . ; | |
153 } >RAM | |
154 | |
155 | |
156 | |
157 /* this is the FLASH Bank1 */ | |
158 /* the C or assembly source must explicitly place the code or data there | |
159 using the "section" attribute */ | |
160 .b1text : | |
161 { | |
162 *(.b1text) /* remaining code */ | |
163 *(.b1rodata) /* read-only data (constants) */ | |
164 *(.b1rodata*) | |
165 } >FLASHB1 | |
166 | |
167 /* this is the EXTMEM */ | |
168 /* the C or assembly source must explicitly place the code or data there | |
169 using the "section" attribute */ | |
170 | |
171 /* EXTMEM Bank0 */ | |
172 .eb0text : | |
173 { | |
174 *(.eb0text) /* remaining code */ | |
175 *(.eb0rodata) /* read-only data (constants) */ | |
176 *(.eb0rodata*) | |
177 } >EXTMEMB0 | |
178 | |
179 /* EXTMEM Bank1 */ | |
180 .eb1text : | |
181 { | |
182 *(.eb1text) /* remaining code */ | |
183 *(.eb1rodata) /* read-only data (constants) */ | |
184 *(.eb1rodata*) | |
185 } >EXTMEMB1 | |
186 | |
187 /* EXTMEM Bank2 */ | |
188 .eb2text : | |
189 { | |
190 *(.eb2text) /* remaining code */ | |
191 *(.eb2rodata) /* read-only data (constants) */ | |
192 *(.eb2rodata*) | |
193 } >EXTMEMB2 | |
194 | |
195 /* EXTMEM Bank0 */ | |
196 .eb3text : | |
197 { | |
198 *(.eb3text) /* remaining code */ | |
199 *(.eb3rodata) /* read-only data (constants) */ | |
200 *(.eb3rodata*) | |
201 } >EXTMEMB3 | |
202 | |
203 | |
204 | |
205 /* after that it's only debugging information. */ | |
206 | |
207 /* remove the debugging information from the standard libraries */ | |
208 DISCARD : | |
209 { | |
210 libc.a ( * ) | |
211 libm.a ( * ) | |
212 libgcc.a ( * ) | |
213 } | |
214 | |
215 | |
216 /* Stabs debugging sections. */ | |
217 .stab 0 : { *(.stab) } | |
218 .stabstr 0 : { *(.stabstr) } | |
219 .stab.excl 0 : { *(.stab.excl) } | |
220 .stab.exclstr 0 : { *(.stab.exclstr) } | |
221 .stab.index 0 : { *(.stab.index) } | |
222 .stab.indexstr 0 : { *(.stab.indexstr) } | |
223 .comment 0 : { *(.comment) } | |
224 /* DWARF debug sections. | |
225 Symbols in the DWARF debugging sections are relative to the beginning | |
226 of the section so we begin them at 0. */ | |
227 /* DWARF 1 */ | |
228 .debug 0 : { *(.debug) } | |
229 .line 0 : { *(.line) } | |
230 /* GNU DWARF 1 extensions */ | |
231 .debug_srcinfo 0 : { *(.debug_srcinfo) } | |
232 .debug_sfnames 0 : { *(.debug_sfnames) } | |
233 /* DWARF 1.1 and DWARF 2 */ | |
234 .debug_aranges 0 : { *(.debug_aranges) } | |
235 .debug_pubnames 0 : { *(.debug_pubnames) } | |
236 /* DWARF 2 */ | |
237 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } | |
238 .debug_abbrev 0 : { *(.debug_abbrev) } | |
239 .debug_line 0 : { *(.debug_line) } | |
240 .debug_frame 0 : { *(.debug_frame) } | |
241 .debug_str 0 : { *(.debug_str) } | |
242 .debug_loc 0 : { *(.debug_loc) } | |
243 .debug_macinfo 0 : { *(.debug_macinfo) } | |
244 /* SGI/MIPS DWARF 2 extensions */ | |
245 .debug_weaknames 0 : { *(.debug_weaknames) } | |
246 .debug_funcnames 0 : { *(.debug_funcnames) } | |
247 .debug_typenames 0 : { *(.debug_typenames) } | |
248 .debug_varnames 0 : { *(.debug_varnames) } | |
249 | |
250 } |