Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | ;******************** (C) COPYRIGHT 2017 STMicroelectronics ******************** |
2 | ;* File Name : startup_stm32f102xb.s |
||
3 | ;* Author : MCD Application Team |
||
4 | ;* Description : STM32F102xB USB Line Devices vector table for |
||
5 | ;* EWARM toolchain. |
||
6 | ;* This module performs: |
||
7 | ;* - Set the initial SP |
||
8 | ;* - Configure the clock system |
||
9 | ;* - Set the initial PC == __iar_program_start, |
||
10 | ;* - Set the vector table entries with the exceptions ISR |
||
11 | ;* address. |
||
12 | ;* After Reset the Cortex-M3 processor is in Thread mode, |
||
13 | ;* priority is Privileged, and the Stack is set to Main. |
||
14 | ;******************************************************************************* |
||
15 | ;* @attention |
||
16 | ;* |
||
17 | ;* <h2><center>© Copyright (c) 2017 STMicroelectronics. |
||
18 | ;* All rights reserved.</center></h2> |
||
19 | ;* |
||
20 | ;* This software component is licensed by ST under BSD 3-Clause license, |
||
21 | ;* the "License"; You may not use this file except in compliance with the |
||
22 | ;* License. You may obtain a copy of the License at: |
||
23 | ;* opensource.org/licenses/BSD-3-Clause |
||
24 | ;* |
||
25 | ;******************************************************************************* |
||
26 | ; |
||
27 | ; |
||
28 | ; The modules in this file are included in the libraries, and may be replaced |
||
29 | ; by any user-defined modules that define the PUBLIC symbol _program_start or |
||
30 | ; a user defined start symbol. |
||
31 | ; To override the cstartup defined in the library, simply add your modified |
||
32 | ; version to the workbench project. |
||
33 | ; |
||
34 | ; The vector table is normally located at address 0. |
||
35 | ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. |
||
36 | ; The name "__vector_table" has special meaning for C-SPY: |
||
37 | ; it is where the SP start value is found, and the NVIC vector |
||
38 | ; table register (VTOR) is initialized to this address if != 0. |
||
39 | ; |
||
40 | ; Cortex-M version |
||
41 | ; |
||
42 | |||
43 | MODULE ?cstartup |
||
44 | |||
45 | ;; Forward declaration of sections. |
||
46 | SECTION CSTACK:DATA:NOROOT(3) |
||
47 | |||
48 | SECTION .intvec:CODE:NOROOT(2) |
||
49 | |||
50 | EXTERN __iar_program_start |
||
51 | EXTERN SystemInit |
||
52 | PUBLIC __vector_table |
||
53 | |||
54 | DATA |
||
55 | __vector_table |
||
56 | DCD sfe(CSTACK) |
||
57 | DCD Reset_Handler ; Reset Handler |
||
58 | DCD NMI_Handler ; NMI Handler |
||
59 | DCD HardFault_Handler ; Hard Fault Handler |
||
60 | DCD MemManage_Handler ; MPU Fault Handler |
||
61 | DCD BusFault_Handler ; Bus Fault Handler |
||
62 | DCD UsageFault_Handler ; Usage Fault Handler |
||
63 | DCD 0 ; Reserved |
||
64 | DCD 0 ; Reserved |
||
65 | DCD 0 ; Reserved |
||
66 | DCD 0 ; Reserved |
||
67 | DCD SVC_Handler ; SVCall Handler |
||
68 | DCD DebugMon_Handler ; Debug Monitor Handler |
||
69 | DCD 0 ; Reserved |
||
70 | DCD PendSV_Handler ; PendSV Handler |
||
71 | DCD SysTick_Handler ; SysTick Handler |
||
72 | |||
73 | ; External Interrupts |
||
74 | DCD WWDG_IRQHandler ; Window Watchdog |
||
75 | DCD PVD_IRQHandler ; PVD through EXTI Line detect |
||
76 | DCD TAMPER_IRQHandler ; Tamper |
||
77 | DCD RTC_IRQHandler ; RTC |
||
78 | DCD FLASH_IRQHandler ; Flash |
||
79 | DCD RCC_IRQHandler ; RCC |
||
80 | DCD EXTI0_IRQHandler ; EXTI Line 0 |
||
81 | DCD EXTI1_IRQHandler ; EXTI Line 1 |
||
82 | DCD EXTI2_IRQHandler ; EXTI Line 2 |
||
83 | DCD EXTI3_IRQHandler ; EXTI Line 3 |
||
84 | DCD EXTI4_IRQHandler ; EXTI Line 4 |
||
85 | DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 |
||
86 | DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2 |
||
87 | DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3 |
||
88 | DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4 |
||
89 | DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5 |
||
90 | DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6 |
||
91 | DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7 |
||
92 | DCD ADC1_IRQHandler ; ADC1 |
||
93 | DCD USB_HP_IRQHandler ; USB High Priority |
||
94 | DCD USB_LP_IRQHandler ; USB Low Priority |
||
95 | DCD 0 ; Reserved |
||
96 | DCD 0 ; Reserved |
||
97 | DCD EXTI9_5_IRQHandler ; EXTI Line 9..5 |
||
98 | DCD 0 ; Reserved |
||
99 | DCD 0 ; Reserved |
||
100 | DCD 0 ; Reserved |
||
101 | DCD 0 ; Reserved |
||
102 | DCD TIM2_IRQHandler ; TIM2 |
||
103 | DCD TIM3_IRQHandler ; TIM3 |
||
104 | DCD TIM4_IRQHandler ; TIM4 |
||
105 | DCD I2C1_EV_IRQHandler ; I2C1 Event |
||
106 | DCD I2C1_ER_IRQHandler ; I2C1 Error |
||
107 | DCD I2C2_EV_IRQHandler ; I2C2 Event |
||
108 | DCD I2C2_ER_IRQHandler ; I2C2 Error |
||
109 | DCD SPI1_IRQHandler ; SPI1 |
||
110 | DCD SPI2_IRQHandler ; SPI2 |
||
111 | DCD USART1_IRQHandler ; USART1 |
||
112 | DCD USART2_IRQHandler ; USART2 |
||
113 | DCD USART3_IRQHandler ; USART3 |
||
114 | DCD EXTI15_10_IRQHandler ; EXTI Line 15..10 |
||
115 | DCD RTC_Alarm_IRQHandler ; RTC Alarm through EXTI Line |
||
116 | DCD USBWakeUp_IRQHandler ; USB Wakeup from suspend |
||
117 | |||
118 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
119 | ;; |
||
120 | ;; Default interrupt handlers. |
||
121 | ;; |
||
122 | THUMB |
||
123 | |||
124 | PUBWEAK Reset_Handler |
||
125 | SECTION .text:CODE:REORDER:NOROOT(2) |
||
126 | Reset_Handler |
||
127 | LDR R0, =SystemInit |
||
128 | BLX R0 |
||
129 | LDR R0, =__iar_program_start |
||
130 | BX R0 |
||
131 | |||
132 | PUBWEAK NMI_Handler |
||
133 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
134 | NMI_Handler |
||
135 | B NMI_Handler |
||
136 | |||
137 | PUBWEAK HardFault_Handler |
||
138 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
139 | HardFault_Handler |
||
140 | B HardFault_Handler |
||
141 | |||
142 | PUBWEAK MemManage_Handler |
||
143 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
144 | MemManage_Handler |
||
145 | B MemManage_Handler |
||
146 | |||
147 | PUBWEAK BusFault_Handler |
||
148 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
149 | BusFault_Handler |
||
150 | B BusFault_Handler |
||
151 | |||
152 | PUBWEAK UsageFault_Handler |
||
153 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
154 | UsageFault_Handler |
||
155 | B UsageFault_Handler |
||
156 | |||
157 | PUBWEAK SVC_Handler |
||
158 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
159 | SVC_Handler |
||
160 | B SVC_Handler |
||
161 | |||
162 | PUBWEAK DebugMon_Handler |
||
163 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
164 | DebugMon_Handler |
||
165 | B DebugMon_Handler |
||
166 | |||
167 | PUBWEAK PendSV_Handler |
||
168 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
169 | PendSV_Handler |
||
170 | B PendSV_Handler |
||
171 | |||
172 | PUBWEAK SysTick_Handler |
||
173 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
174 | SysTick_Handler |
||
175 | B SysTick_Handler |
||
176 | |||
177 | PUBWEAK WWDG_IRQHandler |
||
178 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
179 | WWDG_IRQHandler |
||
180 | B WWDG_IRQHandler |
||
181 | |||
182 | PUBWEAK PVD_IRQHandler |
||
183 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
184 | PVD_IRQHandler |
||
185 | B PVD_IRQHandler |
||
186 | |||
187 | PUBWEAK TAMPER_IRQHandler |
||
188 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
189 | TAMPER_IRQHandler |
||
190 | B TAMPER_IRQHandler |
||
191 | |||
192 | PUBWEAK RTC_IRQHandler |
||
193 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
194 | RTC_IRQHandler |
||
195 | B RTC_IRQHandler |
||
196 | |||
197 | PUBWEAK FLASH_IRQHandler |
||
198 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
199 | FLASH_IRQHandler |
||
200 | B FLASH_IRQHandler |
||
201 | |||
202 | PUBWEAK RCC_IRQHandler |
||
203 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
204 | RCC_IRQHandler |
||
205 | B RCC_IRQHandler |
||
206 | |||
207 | PUBWEAK EXTI0_IRQHandler |
||
208 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
209 | EXTI0_IRQHandler |
||
210 | B EXTI0_IRQHandler |
||
211 | |||
212 | PUBWEAK EXTI1_IRQHandler |
||
213 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
214 | EXTI1_IRQHandler |
||
215 | B EXTI1_IRQHandler |
||
216 | |||
217 | PUBWEAK EXTI2_IRQHandler |
||
218 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
219 | EXTI2_IRQHandler |
||
220 | B EXTI2_IRQHandler |
||
221 | |||
222 | PUBWEAK EXTI3_IRQHandler |
||
223 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
224 | EXTI3_IRQHandler |
||
225 | B EXTI3_IRQHandler |
||
226 | |||
227 | PUBWEAK EXTI4_IRQHandler |
||
228 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
229 | EXTI4_IRQHandler |
||
230 | B EXTI4_IRQHandler |
||
231 | |||
232 | PUBWEAK DMA1_Channel1_IRQHandler |
||
233 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
234 | DMA1_Channel1_IRQHandler |
||
235 | B DMA1_Channel1_IRQHandler |
||
236 | |||
237 | PUBWEAK DMA1_Channel2_IRQHandler |
||
238 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
239 | DMA1_Channel2_IRQHandler |
||
240 | B DMA1_Channel2_IRQHandler |
||
241 | |||
242 | PUBWEAK DMA1_Channel3_IRQHandler |
||
243 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
244 | DMA1_Channel3_IRQHandler |
||
245 | B DMA1_Channel3_IRQHandler |
||
246 | |||
247 | PUBWEAK DMA1_Channel4_IRQHandler |
||
248 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
249 | DMA1_Channel4_IRQHandler |
||
250 | B DMA1_Channel4_IRQHandler |
||
251 | |||
252 | PUBWEAK DMA1_Channel5_IRQHandler |
||
253 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
254 | DMA1_Channel5_IRQHandler |
||
255 | B DMA1_Channel5_IRQHandler |
||
256 | |||
257 | PUBWEAK DMA1_Channel6_IRQHandler |
||
258 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
259 | DMA1_Channel6_IRQHandler |
||
260 | B DMA1_Channel6_IRQHandler |
||
261 | |||
262 | PUBWEAK DMA1_Channel7_IRQHandler |
||
263 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
264 | DMA1_Channel7_IRQHandler |
||
265 | B DMA1_Channel7_IRQHandler |
||
266 | |||
267 | PUBWEAK ADC1_IRQHandler |
||
268 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
269 | ADC1_IRQHandler |
||
270 | B ADC1_IRQHandler |
||
271 | |||
272 | PUBWEAK USB_HP_IRQHandler |
||
273 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
274 | USB_HP_IRQHandler |
||
275 | B USB_HP_IRQHandler |
||
276 | |||
277 | PUBWEAK USB_LP_IRQHandler |
||
278 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
279 | USB_LP_IRQHandler |
||
280 | B USB_LP_IRQHandler |
||
281 | |||
282 | PUBWEAK EXTI9_5_IRQHandler |
||
283 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
284 | EXTI9_5_IRQHandler |
||
285 | B EXTI9_5_IRQHandler |
||
286 | |||
287 | PUBWEAK TIM2_IRQHandler |
||
288 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
289 | TIM2_IRQHandler |
||
290 | B TIM2_IRQHandler |
||
291 | |||
292 | PUBWEAK TIM3_IRQHandler |
||
293 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
294 | TIM3_IRQHandler |
||
295 | B TIM3_IRQHandler |
||
296 | |||
297 | PUBWEAK TIM4_IRQHandler |
||
298 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
299 | TIM4_IRQHandler |
||
300 | B TIM4_IRQHandler |
||
301 | |||
302 | PUBWEAK I2C1_EV_IRQHandler |
||
303 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
304 | I2C1_EV_IRQHandler |
||
305 | B I2C1_EV_IRQHandler |
||
306 | |||
307 | PUBWEAK I2C1_ER_IRQHandler |
||
308 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
309 | I2C1_ER_IRQHandler |
||
310 | B I2C1_ER_IRQHandler |
||
311 | |||
312 | PUBWEAK I2C2_EV_IRQHandler |
||
313 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
314 | I2C2_EV_IRQHandler |
||
315 | B I2C2_EV_IRQHandler |
||
316 | |||
317 | PUBWEAK I2C2_ER_IRQHandler |
||
318 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
319 | I2C2_ER_IRQHandler |
||
320 | B I2C2_ER_IRQHandler |
||
321 | |||
322 | PUBWEAK SPI1_IRQHandler |
||
323 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
324 | SPI1_IRQHandler |
||
325 | B SPI1_IRQHandler |
||
326 | |||
327 | PUBWEAK SPI2_IRQHandler |
||
328 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
329 | SPI2_IRQHandler |
||
330 | B SPI2_IRQHandler |
||
331 | |||
332 | PUBWEAK USART1_IRQHandler |
||
333 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
334 | USART1_IRQHandler |
||
335 | B USART1_IRQHandler |
||
336 | |||
337 | PUBWEAK USART2_IRQHandler |
||
338 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
339 | USART2_IRQHandler |
||
340 | B USART2_IRQHandler |
||
341 | |||
342 | PUBWEAK USART3_IRQHandler |
||
343 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
344 | USART3_IRQHandler |
||
345 | B USART3_IRQHandler |
||
346 | |||
347 | PUBWEAK EXTI15_10_IRQHandler |
||
348 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
349 | EXTI15_10_IRQHandler |
||
350 | B EXTI15_10_IRQHandler |
||
351 | |||
352 | PUBWEAK RTC_Alarm_IRQHandler |
||
353 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
354 | RTC_Alarm_IRQHandler |
||
355 | B RTC_Alarm_IRQHandler |
||
356 | |||
357 | PUBWEAK USBWakeUp_IRQHandler |
||
358 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
359 | USBWakeUp_IRQHandler |
||
360 | B USBWakeUp_IRQHandler |
||
361 | |||
362 | END |
||
363 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |