Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | ;******************** (C) COPYRIGHT 2015 STMicroelectronics ******************** |
2 | ;* File Name : startup_stm32f101xe.s |
||
3 | ;* Author : MCD Application Team |
||
4 | ;* Version : V4.0.1 |
||
5 | ;* Date : 31-July-2015 |
||
6 | ;* Description : STM32F101xE Access Line Devices vector table for EWARM toolchain. |
||
7 | ;* This module performs: |
||
8 | ;* - Set the initial SP |
||
9 | ;* - Set the initial PC == __iar_program_start, |
||
10 | ;* - Set the vector table entries with the exceptions ISR |
||
11 | ;* address. |
||
12 | ;* - Configure the system clock |
||
13 | ;* - Branches to main in the C library (which eventually |
||
14 | ;* calls main()). |
||
15 | ;* After Reset the Cortex-M3 processor is in Thread mode, |
||
16 | ;* priority is Privileged, and the Stack is set to Main. |
||
17 | ;******************************************************************************** |
||
18 | ;* |
||
19 | ;* <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
||
20 | ;* |
||
21 | ;* Redistribution and use in source and binary forms, with or without modification, |
||
22 | ;* are permitted provided that the following conditions are met: |
||
23 | ;* 1. Redistributions of source code must retain the above copyright notice, |
||
24 | ;* this list of conditions and the following disclaimer. |
||
25 | ;* 2. Redistributions in binary form must reproduce the above copyright notice, |
||
26 | ;* this list of conditions and the following disclaimer in the documentation |
||
27 | ;* and/or other materials provided with the distribution. |
||
28 | ;* 3. Neither the name of STMicroelectronics nor the names of its contributors |
||
29 | ;* may be used to endorse or promote products derived from this software |
||
30 | ;* without specific prior written permission. |
||
31 | ;* |
||
32 | ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
||
33 | ;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
||
34 | ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
||
35 | ;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
||
36 | ;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
||
37 | ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
||
38 | ;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
||
39 | ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
||
40 | ;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||
41 | ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
42 | ;* |
||
43 | ;******************************************************************************* |
||
44 | ; |
||
45 | ; |
||
46 | ; The modules in this file are included in the libraries, and may be replaced |
||
47 | ; by any user-defined modules that define the PUBLIC symbol _program_start or |
||
48 | ; a user defined start symbol. |
||
49 | ; To override the cstartup defined in the library, simply add your modified |
||
50 | ; version to the workbench project. |
||
51 | ; |
||
52 | ; The vector table is normally located at address 0. |
||
53 | ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. |
||
54 | ; The name "__vector_table" has special meaning for C-SPY: |
||
55 | ; it is where the SP start value is found, and the NVIC vector |
||
56 | ; table register (VTOR) is initialized to this address if != 0. |
||
57 | ; |
||
58 | ; Cortex-M version |
||
59 | ; |
||
60 | |||
61 | MODULE ?cstartup |
||
62 | |||
63 | ;; Forward declaration of sections. |
||
64 | SECTION CSTACK:DATA:NOROOT(3) |
||
65 | |||
66 | SECTION .intvec:CODE:NOROOT(2) |
||
67 | |||
68 | EXTERN __iar_program_start |
||
69 | EXTERN SystemInit |
||
70 | PUBLIC __vector_table |
||
71 | |||
72 | DATA |
||
73 | |||
74 | __vector_table |
||
75 | DCD sfe(CSTACK) |
||
76 | DCD Reset_Handler ; Reset Handler |
||
77 | DCD NMI_Handler ; NMI Handler |
||
78 | DCD HardFault_Handler ; Hard Fault Handler |
||
79 | DCD MemManage_Handler ; MPU Fault Handler |
||
80 | DCD BusFault_Handler ; Bus Fault Handler |
||
81 | DCD UsageFault_Handler ; Usage Fault Handler |
||
82 | DCD 0 ; Reserved |
||
83 | DCD 0 ; Reserved |
||
84 | DCD 0 ; Reserved |
||
85 | DCD 0 ; Reserved |
||
86 | DCD SVC_Handler ; SVCall Handler |
||
87 | DCD DebugMon_Handler ; Debug Monitor Handler |
||
88 | DCD 0 ; Reserved |
||
89 | DCD PendSV_Handler ; PendSV Handler |
||
90 | DCD SysTick_Handler ; SysTick Handler |
||
91 | |||
92 | ; External Interrupts |
||
93 | DCD WWDG_IRQHandler ; Window Watchdog |
||
94 | DCD PVD_IRQHandler ; PVD through EXTI Line detect |
||
95 | DCD TAMPER_IRQHandler ; Tamper |
||
96 | DCD RTC_IRQHandler ; RTC |
||
97 | DCD FLASH_IRQHandler ; Flash |
||
98 | DCD RCC_IRQHandler ; RCC |
||
99 | DCD EXTI0_IRQHandler ; EXTI Line 0 |
||
100 | DCD EXTI1_IRQHandler ; EXTI Line 1 |
||
101 | DCD EXTI2_IRQHandler ; EXTI Line 2 |
||
102 | DCD EXTI3_IRQHandler ; EXTI Line 3 |
||
103 | DCD EXTI4_IRQHandler ; EXTI Line 4 |
||
104 | DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 |
||
105 | DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2 |
||
106 | DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3 |
||
107 | DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4 |
||
108 | DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5 |
||
109 | DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6 |
||
110 | DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7 |
||
111 | DCD ADC1_IRQHandler ; ADC1 |
||
112 | DCD 0 ; Reserved |
||
113 | DCD 0 ; Reserved |
||
114 | DCD 0 ; Reserved |
||
115 | DCD 0 ; Reserved |
||
116 | DCD EXTI9_5_IRQHandler ; EXTI Line 9..5 |
||
117 | DCD 0 ; Reserved |
||
118 | DCD 0 ; Reserved |
||
119 | DCD 0 ; Reserved |
||
120 | DCD 0 ; Reserved |
||
121 | DCD TIM2_IRQHandler ; TIM2 |
||
122 | DCD TIM3_IRQHandler ; TIM3 |
||
123 | DCD TIM4_IRQHandler ; TIM4 |
||
124 | DCD I2C1_EV_IRQHandler ; I2C1 Event |
||
125 | DCD I2C1_ER_IRQHandler ; I2C1 Error |
||
126 | DCD I2C2_EV_IRQHandler ; I2C2 Event |
||
127 | DCD I2C2_ER_IRQHandler ; I2C2 Error |
||
128 | DCD SPI1_IRQHandler ; SPI1 |
||
129 | DCD SPI2_IRQHandler ; SPI2 |
||
130 | DCD USART1_IRQHandler ; USART1 |
||
131 | DCD USART2_IRQHandler ; USART2 |
||
132 | DCD USART3_IRQHandler ; USART3 |
||
133 | DCD EXTI15_10_IRQHandler ; EXTI Line 15..10 |
||
134 | DCD RTC_Alarm_IRQHandler ; RTC Alarm through EXTI Line |
||
135 | DCD 0 ; Reserved |
||
136 | DCD 0 ; Reserved |
||
137 | DCD 0 ; Reserved |
||
138 | DCD 0 ; Reserved |
||
139 | DCD 0 ; Reserved |
||
140 | DCD 0 ; Reserved |
||
141 | DCD FSMC_IRQHandler ; FSMC |
||
142 | DCD 0 ; Reserved |
||
143 | DCD TIM5_IRQHandler ; TIM5 |
||
144 | DCD SPI3_IRQHandler ; SPI3 |
||
145 | DCD UART4_IRQHandler ; UART4 |
||
146 | DCD UART5_IRQHandler ; UART5 |
||
147 | DCD TIM6_IRQHandler ; TIM6 |
||
148 | DCD TIM7_IRQHandler ; TIM7 |
||
149 | DCD DMA2_Channel1_IRQHandler ; DMA2 Channel1 |
||
150 | DCD DMA2_Channel2_IRQHandler ; DMA2 Channel2 |
||
151 | DCD DMA2_Channel3_IRQHandler ; DMA2 Channel3 |
||
152 | DCD DMA2_Channel4_5_IRQHandler ; DMA2 Channel4 & Channel5 |
||
153 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
154 | ;; |
||
155 | ;; Default interrupt handlers. |
||
156 | ;; |
||
157 | THUMB |
||
158 | |||
159 | PUBWEAK Reset_Handler |
||
160 | SECTION .text:CODE:REORDER:NOROOT(2) |
||
161 | Reset_Handler |
||
162 | LDR R0, =SystemInit |
||
163 | BLX R0 |
||
164 | LDR R0, =__iar_program_start |
||
165 | BX R0 |
||
166 | |||
167 | PUBWEAK NMI_Handler |
||
168 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
169 | NMI_Handler |
||
170 | B NMI_Handler |
||
171 | |||
172 | PUBWEAK HardFault_Handler |
||
173 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
174 | HardFault_Handler |
||
175 | B HardFault_Handler |
||
176 | |||
177 | PUBWEAK MemManage_Handler |
||
178 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
179 | MemManage_Handler |
||
180 | B MemManage_Handler |
||
181 | |||
182 | PUBWEAK BusFault_Handler |
||
183 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
184 | BusFault_Handler |
||
185 | B BusFault_Handler |
||
186 | |||
187 | PUBWEAK UsageFault_Handler |
||
188 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
189 | UsageFault_Handler |
||
190 | B UsageFault_Handler |
||
191 | |||
192 | PUBWEAK SVC_Handler |
||
193 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
194 | SVC_Handler |
||
195 | B SVC_Handler |
||
196 | |||
197 | PUBWEAK DebugMon_Handler |
||
198 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
199 | DebugMon_Handler |
||
200 | B DebugMon_Handler |
||
201 | |||
202 | PUBWEAK PendSV_Handler |
||
203 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
204 | PendSV_Handler |
||
205 | B PendSV_Handler |
||
206 | |||
207 | PUBWEAK SysTick_Handler |
||
208 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
209 | SysTick_Handler |
||
210 | B SysTick_Handler |
||
211 | |||
212 | PUBWEAK WWDG_IRQHandler |
||
213 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
214 | WWDG_IRQHandler |
||
215 | B WWDG_IRQHandler |
||
216 | |||
217 | PUBWEAK PVD_IRQHandler |
||
218 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
219 | PVD_IRQHandler |
||
220 | B PVD_IRQHandler |
||
221 | |||
222 | PUBWEAK TAMPER_IRQHandler |
||
223 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
224 | TAMPER_IRQHandler |
||
225 | B TAMPER_IRQHandler |
||
226 | |||
227 | PUBWEAK RTC_IRQHandler |
||
228 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
229 | RTC_IRQHandler |
||
230 | B RTC_IRQHandler |
||
231 | |||
232 | PUBWEAK FLASH_IRQHandler |
||
233 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
234 | FLASH_IRQHandler |
||
235 | B FLASH_IRQHandler |
||
236 | |||
237 | PUBWEAK RCC_IRQHandler |
||
238 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
239 | RCC_IRQHandler |
||
240 | B RCC_IRQHandler |
||
241 | |||
242 | PUBWEAK EXTI0_IRQHandler |
||
243 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
244 | EXTI0_IRQHandler |
||
245 | B EXTI0_IRQHandler |
||
246 | |||
247 | PUBWEAK EXTI1_IRQHandler |
||
248 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
249 | EXTI1_IRQHandler |
||
250 | B EXTI1_IRQHandler |
||
251 | |||
252 | PUBWEAK EXTI2_IRQHandler |
||
253 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
254 | EXTI2_IRQHandler |
||
255 | B EXTI2_IRQHandler |
||
256 | |||
257 | PUBWEAK EXTI3_IRQHandler |
||
258 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
259 | EXTI3_IRQHandler |
||
260 | B EXTI3_IRQHandler |
||
261 | |||
262 | PUBWEAK EXTI4_IRQHandler |
||
263 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
264 | EXTI4_IRQHandler |
||
265 | B EXTI4_IRQHandler |
||
266 | |||
267 | PUBWEAK DMA1_Channel1_IRQHandler |
||
268 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
269 | DMA1_Channel1_IRQHandler |
||
270 | B DMA1_Channel1_IRQHandler |
||
271 | |||
272 | PUBWEAK DMA1_Channel2_IRQHandler |
||
273 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
274 | DMA1_Channel2_IRQHandler |
||
275 | B DMA1_Channel2_IRQHandler |
||
276 | |||
277 | PUBWEAK DMA1_Channel3_IRQHandler |
||
278 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
279 | DMA1_Channel3_IRQHandler |
||
280 | B DMA1_Channel3_IRQHandler |
||
281 | |||
282 | PUBWEAK DMA1_Channel4_IRQHandler |
||
283 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
284 | DMA1_Channel4_IRQHandler |
||
285 | B DMA1_Channel4_IRQHandler |
||
286 | |||
287 | PUBWEAK DMA1_Channel5_IRQHandler |
||
288 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
289 | DMA1_Channel5_IRQHandler |
||
290 | B DMA1_Channel5_IRQHandler |
||
291 | |||
292 | PUBWEAK DMA1_Channel6_IRQHandler |
||
293 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
294 | DMA1_Channel6_IRQHandler |
||
295 | B DMA1_Channel6_IRQHandler |
||
296 | |||
297 | PUBWEAK DMA1_Channel7_IRQHandler |
||
298 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
299 | DMA1_Channel7_IRQHandler |
||
300 | B DMA1_Channel7_IRQHandler |
||
301 | |||
302 | PUBWEAK ADC1_IRQHandler |
||
303 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
304 | ADC1_IRQHandler |
||
305 | B ADC1_IRQHandler |
||
306 | |||
307 | PUBWEAK EXTI9_5_IRQHandler |
||
308 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
309 | EXTI9_5_IRQHandler |
||
310 | B EXTI9_5_IRQHandler |
||
311 | |||
312 | PUBWEAK TIM2_IRQHandler |
||
313 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
314 | TIM2_IRQHandler |
||
315 | B TIM2_IRQHandler |
||
316 | |||
317 | PUBWEAK TIM3_IRQHandler |
||
318 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
319 | TIM3_IRQHandler |
||
320 | B TIM3_IRQHandler |
||
321 | |||
322 | PUBWEAK TIM4_IRQHandler |
||
323 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
324 | TIM4_IRQHandler |
||
325 | B TIM4_IRQHandler |
||
326 | |||
327 | PUBWEAK I2C1_EV_IRQHandler |
||
328 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
329 | I2C1_EV_IRQHandler |
||
330 | B I2C1_EV_IRQHandler |
||
331 | |||
332 | PUBWEAK I2C1_ER_IRQHandler |
||
333 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
334 | I2C1_ER_IRQHandler |
||
335 | B I2C1_ER_IRQHandler |
||
336 | |||
337 | PUBWEAK I2C2_EV_IRQHandler |
||
338 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
339 | I2C2_EV_IRQHandler |
||
340 | B I2C2_EV_IRQHandler |
||
341 | |||
342 | PUBWEAK I2C2_ER_IRQHandler |
||
343 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
344 | I2C2_ER_IRQHandler |
||
345 | B I2C2_ER_IRQHandler |
||
346 | |||
347 | PUBWEAK SPI1_IRQHandler |
||
348 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
349 | SPI1_IRQHandler |
||
350 | B SPI1_IRQHandler |
||
351 | |||
352 | PUBWEAK SPI2_IRQHandler |
||
353 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
354 | SPI2_IRQHandler |
||
355 | B SPI2_IRQHandler |
||
356 | |||
357 | PUBWEAK USART1_IRQHandler |
||
358 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
359 | USART1_IRQHandler |
||
360 | B USART1_IRQHandler |
||
361 | |||
362 | PUBWEAK USART2_IRQHandler |
||
363 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
364 | USART2_IRQHandler |
||
365 | B USART2_IRQHandler |
||
366 | |||
367 | PUBWEAK USART3_IRQHandler |
||
368 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
369 | USART3_IRQHandler |
||
370 | B USART3_IRQHandler |
||
371 | |||
372 | PUBWEAK EXTI15_10_IRQHandler |
||
373 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
374 | EXTI15_10_IRQHandler |
||
375 | B EXTI15_10_IRQHandler |
||
376 | |||
377 | PUBWEAK RTC_Alarm_IRQHandler |
||
378 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
379 | RTC_Alarm_IRQHandler |
||
380 | B RTC_Alarm_IRQHandler |
||
381 | |||
382 | PUBWEAK FSMC_IRQHandler |
||
383 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
384 | FSMC_IRQHandler |
||
385 | B FSMC_IRQHandler |
||
386 | |||
387 | PUBWEAK SDIO_IRQHandler |
||
388 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
389 | SDIO_IRQHandler |
||
390 | B SDIO_IRQHandler |
||
391 | |||
392 | PUBWEAK TIM5_IRQHandler |
||
393 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
394 | TIM5_IRQHandler |
||
395 | B TIM5_IRQHandler |
||
396 | |||
397 | PUBWEAK SPI3_IRQHandler |
||
398 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
399 | SPI3_IRQHandler |
||
400 | B SPI3_IRQHandler |
||
401 | |||
402 | PUBWEAK UART4_IRQHandler |
||
403 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
404 | UART4_IRQHandler |
||
405 | B UART4_IRQHandler |
||
406 | |||
407 | PUBWEAK UART5_IRQHandler |
||
408 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
409 | UART5_IRQHandler |
||
410 | B UART5_IRQHandler |
||
411 | |||
412 | PUBWEAK TIM6_IRQHandler |
||
413 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
414 | TIM6_IRQHandler |
||
415 | B TIM6_IRQHandler |
||
416 | |||
417 | PUBWEAK TIM7_IRQHandler |
||
418 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
419 | TIM7_IRQHandler |
||
420 | B TIM7_IRQHandler |
||
421 | |||
422 | PUBWEAK DMA2_Channel1_IRQHandler |
||
423 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
424 | DMA2_Channel1_IRQHandler |
||
425 | B DMA2_Channel1_IRQHandler |
||
426 | |||
427 | PUBWEAK DMA2_Channel2_IRQHandler |
||
428 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
429 | DMA2_Channel2_IRQHandler |
||
430 | B DMA2_Channel2_IRQHandler |
||
431 | |||
432 | PUBWEAK DMA2_Channel3_IRQHandler |
||
433 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
434 | DMA2_Channel3_IRQHandler |
||
435 | B DMA2_Channel3_IRQHandler |
||
436 | |||
437 | PUBWEAK DMA2_Channel4_5_IRQHandler |
||
438 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
439 | DMA2_Channel4_5_IRQHandler |
||
440 | B DMA2_Channel4_5_IRQHandler |
||
441 | |||
442 | |||
443 | END |
||
444 | |||
445 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |