2 ******************************************************************************
3 * @file startup_stm32f10x_md.s
4 * @author MCD Application Team / Angus Peart
7 * @brief STM32F10x Medium Density Devices vector table for RIDE7 toolchain.
8 * This module performs:
10 * - Set the initial PC == Reset_Handler,
11 * - Set the vector table entries with the exceptions ISR address
12 * - Branches to main in the C library (which eventually
14 * After Reset the Cortex-M3 processor is in Thread mode,
15 * priority is Privileged, and the Stack is set to Main.
16 *******************************************************************************
19 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
20 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
21 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
22 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
23 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
24 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
26 * <h2><center>© COPYRIGHT 2009 STMicroelectronics</center></h2>
35 .global Default_Handler
37 /* start address for the initialization values of the .data section.
38 defined in linker script */
40 /* start address for the .data section. defined in linker script */
42 /* end address for the .data section. defined in linker script */
44 /* start address for the .bss section. defined in linker script */
46 /* end address for the .bss section. defined in linker script */
49 .equ BootRAM, 0xF108F85F
51 * @brief This is the code that gets called when the processor first
52 * starts execution following a reset event. Only the absolutely
53 * necessary set is performed, after which the application
54 * supplied main() routine is called.
59 .section .text.Reset_Handler
61 .type Reset_Handler, %function
64 /* Copy the data segment initializers from flash to SRAM */
82 /* Zero fill the bss segment. */
91 /* Call the application's entry point.*/
94 .size Reset_Handler, .-Reset_Handler
97 * @brief This is the code that gets called when the processor receives an
98 * unexpected interrupt. This simply enters an infinite loop, preserving
99 * the system state for examination by a debugger.
104 .section .text.Default_Handler,"ax",%progbits
108 .size Default_Handler, .-Default_Handler
109 /******************************************************************************
111 * The minimal vector table for a Cortex M3. Note that the proper constructs
112 * must be placed on this to ensure that it ends up at physical address
115 ******************************************************************************/
116 .section .isr_vector,"a",%progbits
117 .type g_pfnVectors, %object
118 .size g_pfnVectors, .-g_pfnVectors
125 .word HardFault_Handler
126 .word MemManage_Handler
127 .word BusFault_Handler
128 .word UsageFault_Handler
134 .word DebugMon_Handler
137 .word SysTick_Handler
138 .word WWDG_IRQHandler
140 .word TAMPER_IRQHandler
142 .word FLASH_IRQHandler
144 .word EXTI0_IRQHandler
145 .word EXTI1_IRQHandler
146 .word EXTI2_IRQHandler
147 .word EXTI3_IRQHandler
148 .word EXTI4_IRQHandler
149 .word DMA1_Channel1_IRQHandler
150 .word DMA1_Channel2_IRQHandler
151 .word DMA1_Channel3_IRQHandler
152 .word DMA1_Channel4_IRQHandler
153 .word DMA1_Channel5_IRQHandler
154 .word DMA1_Channel6_IRQHandler
155 .word DMA1_Channel7_IRQHandler
156 .word ADC1_2_IRQHandler
157 .word USB_HP_CAN1_TX_IRQHandler
158 .word USB_LP_CAN1_RX0_IRQHandler
159 .word CAN1_RX1_IRQHandler
160 .word CAN1_SCE_IRQHandler
161 .word EXTI9_5_IRQHandler
162 .word TIM1_BRK_IRQHandler
163 .word TIM1_UP_IRQHandler
164 .word TIM1_TRG_COM_IRQHandler
165 .word TIM1_CC_IRQHandler
166 .word TIM2_IRQHandler
167 .word TIM3_IRQHandler
168 .word TIM4_IRQHandler
169 .word I2C1_EV_IRQHandler
170 .word I2C1_ER_IRQHandler
171 .word I2C2_EV_IRQHandler
172 .word I2C2_ER_IRQHandler
173 .word SPI1_IRQHandler
174 .word SPI2_IRQHandler
175 .word USART1_IRQHandler
176 .word USART2_IRQHandler
177 .word USART3_IRQHandler
178 .word EXTI15_10_IRQHandler
179 .word RTCAlarm_IRQHandler
180 .word USBWakeUp_IRQHandler
188 .word BootRAM /* @0x108. This is for boot in RAM mode for
189 STM32F10x Medium Density devices. */
191 /*******************************************************************************
193 * Provide weak aliases for each Exception handler to the Default_Handler.
194 * As they are weak aliases, any function with the same name will override
197 *******************************************************************************/
200 .thumb_set NMI_Handler,Default_Handler
202 .weak HardFault_Handler
203 .thumb_set HardFault_Handler,Default_Handler
205 .weak MemManage_Handler
206 .thumb_set MemManage_Handler,Default_Handler
208 .weak BusFault_Handler
209 .thumb_set BusFault_Handler,Default_Handler
211 .weak UsageFault_Handler
212 .thumb_set UsageFault_Handler,Default_Handler
215 .thumb_set SVC_Handler,Default_Handler
217 .weak DebugMon_Handler
218 .thumb_set DebugMon_Handler,Default_Handler
221 .thumb_set PendSV_Handler,Default_Handler
223 .weak SysTick_Handler
224 .thumb_set SysTick_Handler,Default_Handler
226 .weak WWDG_IRQHandler
227 .thumb_set WWDG_IRQHandler,Default_Handler
230 .thumb_set PVD_IRQHandler,Default_Handler
232 .weak TAMPER_IRQHandler
233 .thumb_set TAMPER_IRQHandler,Default_Handler
236 .thumb_set RTC_IRQHandler,Default_Handler
238 .weak FLASH_IRQHandler
239 .thumb_set FLASH_IRQHandler,Default_Handler
242 .thumb_set RCC_IRQHandler,Default_Handler
244 .weak EXTI0_IRQHandler
245 .thumb_set EXTI0_IRQHandler,Default_Handler
247 .weak EXTI1_IRQHandler
248 .thumb_set EXTI1_IRQHandler,Default_Handler
250 .weak EXTI2_IRQHandler
251 .thumb_set EXTI2_IRQHandler,Default_Handler
253 .weak EXTI3_IRQHandler
254 .thumb_set EXTI3_IRQHandler,Default_Handler
256 .weak EXTI4_IRQHandler
257 .thumb_set EXTI4_IRQHandler,Default_Handler
259 .weak DMA1_Channel1_IRQHandler
260 .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
262 .weak DMA1_Channel2_IRQHandler
263 .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
265 .weak DMA1_Channel3_IRQHandler
266 .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
268 .weak DMA1_Channel4_IRQHandler
269 .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
271 .weak DMA1_Channel5_IRQHandler
272 .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
274 .weak DMA1_Channel6_IRQHandler
275 .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
277 .weak DMA1_Channel7_IRQHandler
278 .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
280 .weak ADC1_2_IRQHandler
281 .thumb_set ADC1_2_IRQHandler,Default_Handler
283 .weak USB_HP_CAN1_TX_IRQHandler
284 .thumb_set USB_HP_CAN1_TX_IRQHandler,Default_Handler
286 .weak USB_LP_CAN1_RX0_IRQHandler
287 .thumb_set USB_LP_CAN1_RX0_IRQHandler,Default_Handler
289 .weak CAN1_RX1_IRQHandler
290 .thumb_set CAN1_RX1_IRQHandler,Default_Handler
292 .weak CAN1_SCE_IRQHandler
293 .thumb_set CAN1_SCE_IRQHandler,Default_Handler
295 .weak EXTI9_5_IRQHandler
296 .thumb_set EXTI9_5_IRQHandler,Default_Handler
298 .weak TIM1_BRK_IRQHandler
299 .thumb_set TIM1_BRK_IRQHandler,Default_Handler
301 .weak TIM1_UP_IRQHandler
302 .thumb_set TIM1_UP_IRQHandler,Default_Handler
304 .weak TIM1_TRG_COM_IRQHandler
305 .thumb_set TIM1_TRG_COM_IRQHandler,Default_Handler
307 .weak TIM1_CC_IRQHandler
308 .thumb_set TIM1_CC_IRQHandler,Default_Handler
310 .weak TIM2_IRQHandler
311 .thumb_set TIM2_IRQHandler,Default_Handler
313 .weak TIM3_IRQHandler
314 .thumb_set TIM3_IRQHandler,Default_Handler
316 .weak TIM4_IRQHandler
317 .thumb_set TIM4_IRQHandler,Default_Handler
319 .weak I2C1_EV_IRQHandler
320 .thumb_set I2C1_EV_IRQHandler,Default_Handler
322 .weak I2C1_ER_IRQHandler
323 .thumb_set I2C1_ER_IRQHandler,Default_Handler
325 .weak I2C2_EV_IRQHandler
326 .thumb_set I2C2_EV_IRQHandler,Default_Handler
328 .weak I2C2_ER_IRQHandler
329 .thumb_set I2C2_ER_IRQHandler,Default_Handler
331 .weak SPI1_IRQHandler
332 .thumb_set SPI1_IRQHandler,Default_Handler
334 .weak SPI2_IRQHandler
335 .thumb_set SPI2_IRQHandler,Default_Handler
337 .weak USART1_IRQHandler
338 .thumb_set USART1_IRQHandler,Default_Handler
340 .weak USART2_IRQHandler
341 .thumb_set USART2_IRQHandler,Default_Handler
343 .weak USART3_IRQHandler
344 .thumb_set USART3_IRQHandler,Default_Handler
346 .weak EXTI15_10_IRQHandler
347 .thumb_set EXTI15_10_IRQHandler,Default_Handler
349 .weak RTCAlarm_IRQHandler
350 .thumb_set RTCAlarm_IRQHandler,Default_Handler
352 .weak USBWakeUp_IRQHandler
353 .thumb_set USBWakeUp_IRQHandler,Default_Handler