Rev Author Line No. Line
3328 povik 1 ;/******************** (C) COPYRIGHT 2009 STMicroelectronics ********************
2 ;* File Name : startup_stm32f10x_ld.s
3 ;* Author : MCD Application Team
4 ;* Version : V3.1.2
5 ;* Date : 09/28/2009
6 ;* Description : STM32F10x Low Density Devices vector table for EWARM5.x
7 ;* toolchain.
8 ;* This module performs:
9 ;* - Set the initial SP
10 ;* - Set the initial PC == __iar_program_start,
11 ;* - Set the vector table entries with the exceptions ISR
12 ;* address.
13 ;* After Reset the Cortex-M3 processor is in Thread mode,
14 ;* priority is Privileged, and the Stack is set to Main.
15 ;********************************************************************************
16 ;* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
17 ;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
18 ;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
19 ;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
20 ;* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
21 ;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
22 ;*******************************************************************************/
23 ;
24 ;
25 ; The modules in this file are included in the libraries, and may be replaced
26 ; by any user-defined modules that define the PUBLIC symbol _program_start or
27 ; a user defined start symbol.
28 ; To override the cstartup defined in the library, simply add your modified
29 ; version to the workbench project.
30 ;
31 ; The vector table is normally located at address 0.
32 ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
33 ; The name "__vector_table" has special meaning for C-SPY:
34 ; it is where the SP start value is found, and the NVIC vector
35 ; table register (VTOR) is initialized to this address if != 0.
36 ;
37 ; Cortex-M version
38 ;
39  
40 MODULE ?cstartup
41  
42 ;; Forward declaration of sections.
43 SECTION CSTACK:DATA:NOROOT(3)
44  
45 SECTION .intvec:CODE:NOROOT(2)
46  
47 EXTERN __iar_program_start
48 PUBLIC __vector_table
49  
50 DATA
51 __vector_table
52 DCD sfe(CSTACK)
53 DCD __iar_program_start
54  
55 DCD NMI_Handler ; NMI Handler
56 DCD HardFault_Handler ; Hard Fault Handler
57 DCD MemManage_Handler ; MPU Fault Handler
58 DCD BusFault_Handler ; Bus Fault Handler
59 DCD UsageFault_Handler ; Usage Fault Handler
60 DCD 0 ; Reserved
61 DCD 0 ; Reserved
62 DCD 0 ; Reserved
63 DCD 0 ; Reserved
64 DCD SVC_Handler ; SVCall Handler
65 DCD DebugMon_Handler ; Debug Monitor Handler
66 DCD 0 ; Reserved
67 DCD PendSV_Handler ; PendSV Handler
68 DCD SysTick_Handler ; SysTick Handler
69  
70 ; External Interrupts
71 DCD WWDG_IRQHandler ; Window Watchdog
72 DCD PVD_IRQHandler ; PVD through EXTI Line detect
73 DCD TAMPER_IRQHandler ; Tamper
74 DCD RTC_IRQHandler ; RTC
75 DCD FLASH_IRQHandler ; Flash
76 DCD RCC_IRQHandler ; RCC
77 DCD EXTI0_IRQHandler ; EXTI Line 0
78 DCD EXTI1_IRQHandler ; EXTI Line 1
79 DCD EXTI2_IRQHandler ; EXTI Line 2
80 DCD EXTI3_IRQHandler ; EXTI Line 3
81 DCD EXTI4_IRQHandler ; EXTI Line 4
82 DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
83 DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2
84 DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3
85 DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4
86 DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5
87 DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6
88 DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7
89 DCD ADC1_2_IRQHandler ; ADC1 & ADC2
90 DCD USB_HP_CAN1_TX_IRQHandler ; USB High Priority or CAN1 TX
91 DCD USB_LP_CAN1_RX0_IRQHandler ; USB Low Priority or CAN1 RX0
92 DCD CAN1_RX1_IRQHandler ; CAN1 RX1
93 DCD CAN1_SCE_IRQHandler ; CAN1 SCE
94 DCD EXTI9_5_IRQHandler ; EXTI Line 9..5
95 DCD TIM1_BRK_IRQHandler ; TIM1 Break
96 DCD TIM1_UP_IRQHandler ; TIM1 Update
97 DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation
98 DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
99 DCD TIM2_IRQHandler ; TIM2
100 DCD TIM3_IRQHandler ; TIM3
101 DCD 0 ; Reserved
102 DCD I2C1_EV_IRQHandler ; I2C1 Event
103 DCD I2C1_ER_IRQHandler ; I2C1 Error
104 DCD 0 ; Reserved
105 DCD 0 ; Reserved
106 DCD SPI1_IRQHandler ; SPI1
107 DCD 0 ; Reserved
108 DCD USART1_IRQHandler ; USART1
109 DCD USART2_IRQHandler ; USART2
110 DCD 0 ; Reserved
111 DCD EXTI15_10_IRQHandler ; EXTI Line 15..10
112 DCD RTCAlarm_IRQHandler ; RTC Alarm through EXTI Line
113 DCD USBWakeUp_IRQHandler ; USB Wakeup from suspend
114  
115 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
116 ;;
117 ;; Default interrupt handlers.
118 ;;
119 THUMB
120  
121 PUBWEAK NMI_Handler
122 SECTION .text:CODE:REORDER(1)
123 NMI_Handler
124 B NMI_Handler
125  
126 PUBWEAK HardFault_Handler
127 SECTION .text:CODE:REORDER(1)
128 HardFault_Handler
129 B HardFault_Handler
130  
131 PUBWEAK MemManage_Handler
132 SECTION .text:CODE:REORDER(1)
133 MemManage_Handler
134 B MemManage_Handler
135  
136 PUBWEAK BusFault_Handler
137 SECTION .text:CODE:REORDER(1)
138 BusFault_Handler
139 B BusFault_Handler
140  
141 PUBWEAK UsageFault_Handler
142 SECTION .text:CODE:REORDER(1)
143 UsageFault_Handler
144 B UsageFault_Handler
145  
146 PUBWEAK SVC_Handler
147 SECTION .text:CODE:REORDER(1)
148 SVC_Handler
149 B SVC_Handler
150  
151 PUBWEAK DebugMon_Handler
152 SECTION .text:CODE:REORDER(1)
153 DebugMon_Handler
154 B DebugMon_Handler
155  
156 PUBWEAK PendSV_Handler
157 SECTION .text:CODE:REORDER(1)
158 PendSV_Handler
159 B PendSV_Handler
160  
161 PUBWEAK SysTick_Handler
162 SECTION .text:CODE:REORDER(1)
163 SysTick_Handler
164 B SysTick_Handler
165  
166 PUBWEAK WWDG_IRQHandler
167 SECTION .text:CODE:REORDER(1)
168 WWDG_IRQHandler
169 B WWDG_IRQHandler
170  
171 PUBWEAK PVD_IRQHandler
172 SECTION .text:CODE:REORDER(1)
173 PVD_IRQHandler
174 B PVD_IRQHandler
175  
176 PUBWEAK TAMPER_IRQHandler
177 SECTION .text:CODE:REORDER(1)
178 TAMPER_IRQHandler
179 B TAMPER_IRQHandler
180  
181 PUBWEAK RTC_IRQHandler
182 SECTION .text:CODE:REORDER(1)
183 RTC_IRQHandler
184 B RTC_IRQHandler
185  
186 PUBWEAK FLASH_IRQHandler
187 SECTION .text:CODE:REORDER(1)
188 FLASH_IRQHandler
189 B FLASH_IRQHandler
190  
191 PUBWEAK RCC_IRQHandler
192 SECTION .text:CODE:REORDER(1)
193 RCC_IRQHandler
194 B RCC_IRQHandler
195  
196 PUBWEAK EXTI0_IRQHandler
197 SECTION .text:CODE:REORDER(1)
198 EXTI0_IRQHandler
199 B EXTI0_IRQHandler
200  
201 PUBWEAK EXTI1_IRQHandler
202 SECTION .text:CODE:REORDER(1)
203 EXTI1_IRQHandler
204 B EXTI1_IRQHandler
205  
206 PUBWEAK EXTI2_IRQHandler
207 SECTION .text:CODE:REORDER(1)
208 EXTI2_IRQHandler
209 B EXTI2_IRQHandler
210  
211 PUBWEAK EXTI3_IRQHandler
212 SECTION .text:CODE:REORDER(1)
213 EXTI3_IRQHandler
214 B EXTI3_IRQHandler
215  
216 PUBWEAK EXTI4_IRQHandler
217 SECTION .text:CODE:REORDER(1)
218 EXTI4_IRQHandler
219 B EXTI4_IRQHandler
220  
221 PUBWEAK DMA1_Channel1_IRQHandler
222 SECTION .text:CODE:REORDER(1)
223 DMA1_Channel1_IRQHandler
224 B DMA1_Channel1_IRQHandler
225  
226 PUBWEAK DMA1_Channel2_IRQHandler
227 SECTION .text:CODE:REORDER(1)
228 DMA1_Channel2_IRQHandler
229 B DMA1_Channel2_IRQHandler
230  
231 PUBWEAK DMA1_Channel3_IRQHandler
232 SECTION .text:CODE:REORDER(1)
233 DMA1_Channel3_IRQHandler
234 B DMA1_Channel3_IRQHandler
235  
236 PUBWEAK DMA1_Channel4_IRQHandler
237 SECTION .text:CODE:REORDER(1)
238 DMA1_Channel4_IRQHandler
239 B DMA1_Channel4_IRQHandler
240  
241 PUBWEAK DMA1_Channel5_IRQHandler
242 SECTION .text:CODE:REORDER(1)
243 DMA1_Channel5_IRQHandler
244 B DMA1_Channel5_IRQHandler
245  
246 PUBWEAK DMA1_Channel6_IRQHandler
247 SECTION .text:CODE:REORDER(1)
248 DMA1_Channel6_IRQHandler
249 B DMA1_Channel6_IRQHandler
250  
251 PUBWEAK DMA1_Channel7_IRQHandler
252 SECTION .text:CODE:REORDER(1)
253 DMA1_Channel7_IRQHandler
254 B DMA1_Channel7_IRQHandler
255  
256 PUBWEAK ADC1_2_IRQHandler
257 SECTION .text:CODE:REORDER(1)
258 ADC1_2_IRQHandler
259 B ADC1_2_IRQHandler
260  
261 PUBWEAK USB_HP_CAN1_TX_IRQHandler
262 SECTION .text:CODE:REORDER(1)
263 USB_HP_CAN1_TX_IRQHandler
264 B USB_HP_CAN1_TX_IRQHandler
265  
266 PUBWEAK USB_LP_CAN1_RX0_IRQHandler
267 SECTION .text:CODE:REORDER(1)
268 USB_LP_CAN1_RX0_IRQHandler
269 B USB_LP_CAN1_RX0_IRQHandler
270  
271 PUBWEAK CAN1_RX1_IRQHandler
272 SECTION .text:CODE:REORDER(1)
273 CAN1_RX1_IRQHandler
274 B CAN1_RX1_IRQHandler
275  
276 PUBWEAK CAN1_SCE_IRQHandler
277 SECTION .text:CODE:REORDER(1)
278 CAN1_SCE_IRQHandler
279 B CAN1_SCE_IRQHandler
280  
281 PUBWEAK EXTI9_5_IRQHandler
282 SECTION .text:CODE:REORDER(1)
283 EXTI9_5_IRQHandler
284 B EXTI9_5_IRQHandler
285  
286 PUBWEAK TIM1_BRK_IRQHandler
287 SECTION .text:CODE:REORDER(1)
288 TIM1_BRK_IRQHandler
289 B TIM1_BRK_IRQHandler
290  
291 PUBWEAK TIM1_UP_IRQHandler
292 SECTION .text:CODE:REORDER(1)
293 TIM1_UP_IRQHandler
294 B TIM1_UP_IRQHandler
295  
296 PUBWEAK TIM1_TRG_COM_IRQHandler
297 SECTION .text:CODE:REORDER(1)
298 TIM1_TRG_COM_IRQHandler
299 B TIM1_TRG_COM_IRQHandler
300  
301 PUBWEAK TIM1_CC_IRQHandler
302 SECTION .text:CODE:REORDER(1)
303 TIM1_CC_IRQHandler
304 B TIM1_CC_IRQHandler
305  
306 PUBWEAK TIM2_IRQHandler
307 SECTION .text:CODE:REORDER(1)
308 TIM2_IRQHandler
309 B TIM2_IRQHandler
310  
311 PUBWEAK TIM3_IRQHandler
312 SECTION .text:CODE:REORDER(1)
313 TIM3_IRQHandler
314 B TIM3_IRQHandler
315  
316 PUBWEAK I2C1_EV_IRQHandler
317 SECTION .text:CODE:REORDER(1)
318 I2C1_EV_IRQHandler
319 B I2C1_EV_IRQHandler
320  
321 PUBWEAK I2C1_ER_IRQHandler
322 SECTION .text:CODE:REORDER(1)
323 I2C1_ER_IRQHandler
324 B I2C1_ER_IRQHandler
325  
326 PUBWEAK SPI1_IRQHandler
327 SECTION .text:CODE:REORDER(1)
328 SPI1_IRQHandler
329 B SPI1_IRQHandler
330  
331 PUBWEAK USART1_IRQHandler
332 SECTION .text:CODE:REORDER(1)
333 USART1_IRQHandler
334 B USART1_IRQHandler
335  
336 PUBWEAK USART2_IRQHandler
337 SECTION .text:CODE:REORDER(1)
338 USART2_IRQHandler
339 B USART2_IRQHandler
340  
341 PUBWEAK EXTI15_10_IRQHandler
342 SECTION .text:CODE:REORDER(1)
343 EXTI15_10_IRQHandler
344 B EXTI15_10_IRQHandler
345  
346 PUBWEAK RTCAlarm_IRQHandler
347 SECTION .text:CODE:REORDER(1)
348 RTCAlarm_IRQHandler
349 B RTCAlarm_IRQHandler
350  
351 PUBWEAK USBWakeUp_IRQHandler
352 SECTION .text:CODE:REORDER(1)
353 USBWakeUp_IRQHandler
354 B USBWakeUp_IRQHandler
355  
356 END
357 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/