1 /******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
\r
2 * File Name : stm32f10x_vector.c
\r
3 * Author : MCD Tools Team
\r
4 * Date First Issued : 05/14/2007
\r
5 * Description : This file contains the vector table for STM32F10x.
\r
6 * After Reset the Cortex-M3 processor is in Thread mode,
\r
7 * priority is Privileged, and the Stack is set to Main.
\r
8 ********************************************************************************
\r
12 ********************************************************************************
\r
13 * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
\r
14 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
\r
15 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
\r
16 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
\r
17 * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
\r
18 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
\r
19 *******************************************************************************/
\r
21 /* Includes ----------------------------------------------------------------------*/
\r
23 void NMIException(void);
\r
24 void HardFaultException(void);
\r
25 void MemManageException(void);
\r
26 void BusFaultException(void);
\r
27 void UsageFaultException(void);
\r
28 void DebugMonitor(void);
\r
29 void SVCHandler(void);
\r
31 void SysTickHandler(void);
\r
32 void WWDG_IRQHandler(void);
\r
33 void PVD_IRQHandler(void);
\r
34 void TAMPER_IRQHandler(void);
\r
35 void RTC_IRQHandler(void);
\r
36 void FLASH_IRQHandler(void);
\r
37 void RCC_IRQHandler(void);
\r
38 void EXTI0_IRQHandler(void);
\r
39 void EXTI1_IRQHandler(void);
\r
40 void EXTI2_IRQHandler(void);
\r
41 void EXTI3_IRQHandler(void);
\r
42 void EXTI4_IRQHandler(void);
\r
43 void DMAChannel1_IRQHandler(void);
\r
44 void DMAChannel2_IRQHandler(void);
\r
45 void DMAChannel3_IRQHandler(void);
\r
46 void DMAChannel4_IRQHandler(void);
\r
47 void DMAChannel5_IRQHandler(void);
\r
48 void DMAChannel6_IRQHandler(void);
\r
49 void DMAChannel7_IRQHandler(void);
\r
50 void ADC_IRQHandler(void);
\r
51 void USB_HP_CAN_TX_IRQHandler(void);
\r
52 void USB_LP_CAN_RX0_IRQHandler(void);
\r
53 void CAN_RX1_IRQHandler(void);
\r
54 void CAN_SCE_IRQHandler(void);
\r
55 void EXTI9_5_IRQHandler(void);
\r
56 void TIM1_BRK_IRQHandler(void);
\r
57 void TIM1_UP_IRQHandler(void);
\r
58 void TIM1_TRG_COM_IRQHandler(void);
\r
59 void TIM1_CC_IRQHandler(void);
\r
60 void TIM2_IRQHandler(void);
\r
61 void TIM3_IRQHandler(void);
\r
62 void TIM4_IRQHandler(void);
\r
63 void I2C1_EV_IRQHandler(void);
\r
64 void I2C1_ER_IRQHandler(void);
\r
65 void I2C2_EV_IRQHandler(void);
\r
66 void I2C2_ER_IRQHandler(void);
\r
67 void SPI1_IRQHandler(void);
\r
68 void SPI2_IRQHandler(void);
\r
69 void USART1_IRQHandler(void);
\r
70 void USART2_IRQHandler(void);
\r
71 void USART3_IRQHandler(void);
\r
72 void EXTI15_10_IRQHandler(void);
\r
73 void RTCAlarm_IRQHandler(void);
\r
74 void USBWakeUp_IRQHandler(void);
\r
77 /* Exported types --------------------------------------------------------------*/
\r
78 /* Exported constants --------------------------------------------------------*/
\r
79 extern unsigned long _etext;
\r
80 extern unsigned long _sidata; /* start address for the initialization values of the .data section. defined in linker script */
\r
81 extern unsigned long _sdata; /* start address for the .data section. defined in linker script */
\r
82 extern unsigned long _edata; /* end address for the .data section. defined in linker script */
\r
84 extern unsigned long _sbss; /* start address for the .bss section. defined in linker script */
\r
85 extern unsigned long _ebss; /* end address for the .bss section. defined in linker script */
\r
87 extern void _estack; /* init value for the stack pointer. defined in linker script */
\r
91 /* Private typedef -----------------------------------------------------------*/
\r
92 /* function prototypes ------------------------------------------------------*/
\r
93 void Reset_Handler(void) __attribute__((__interrupt__));
\r
94 extern int main(void);
\r
95 extern void xPortPendSVHandler(void);
\r
96 extern void xPortSysTickHandler(void);
\r
97 extern void vTimer2IntHandler( void );
\r
98 extern void vPortSVCHandler( void );
\r
101 /******************************************************************************
\r
103 * The minimal vector table for a Cortex M3. Note that the proper constructs
\r
104 * must be placed on this to ensure that it ends up at physical address
\r
107 ******************************************************************************/
\r
110 __attribute__ ((section(".isr_vector")))
\r
111 void (* const g_pfnVectors[])(void) =
\r
113 &_estack, // The initial stack pointer
\r
114 Reset_Handler, // The reset handler
\r
116 HardFaultException,
\r
117 MemManageException,
\r
119 UsageFaultException,
\r
120 (void*)0, (void*)0, (void*)0, (void*)0, /* Reserved */
\r
123 (void*)0, /* Reserved */
\r
124 xPortPendSVHandler,
\r
125 xPortSysTickHandler,
\r
137 DMAChannel1_IRQHandler,
\r
138 DMAChannel2_IRQHandler,
\r
139 DMAChannel3_IRQHandler,
\r
140 DMAChannel4_IRQHandler,
\r
141 DMAChannel5_IRQHandler,
\r
142 DMAChannel6_IRQHandler,
\r
143 DMAChannel7_IRQHandler,
\r
145 USB_HP_CAN_TX_IRQHandler,
\r
146 USB_LP_CAN_RX0_IRQHandler,
\r
147 CAN_RX1_IRQHandler,
\r
148 CAN_SCE_IRQHandler,
\r
149 EXTI9_5_IRQHandler,
\r
150 TIM1_BRK_IRQHandler,
\r
151 TIM1_UP_IRQHandler,
\r
152 TIM1_TRG_COM_IRQHandler,
\r
153 TIM1_CC_IRQHandler,
\r
157 I2C1_EV_IRQHandler,
\r
158 I2C1_ER_IRQHandler,
\r
159 I2C2_EV_IRQHandler,
\r
160 I2C2_ER_IRQHandler,
\r
166 EXTI15_10_IRQHandler,
\r
167 RTCAlarm_IRQHandler,
\r
168 USBWakeUp_IRQHandler,
\r
176 (void*)0xF108F85F //this is a workaround for boot in RAM mode.
\r
179 /*******************************************************************************
\r
180 * Function Name : Reset_Handler
\r
181 * Description : This is the code that gets called when the processor first starts execution
\r
182 * following a reset event. Only the absolutely necessary set is performed,
\r
183 * after which the application supplied main() routine is called.
\r
187 *******************************************************************************/
\r
188 void Reset_Handler(void)
\r
190 unsigned long *pulSrc, *pulDest;
\r
193 // Copy the data segment initializers from flash to SRAM.
\r
196 for(pulDest = &_sdata; pulDest < &_edata; )
\r
198 *(pulDest++) = *(pulSrc++);
\r
202 // Zero fill the bss segment.
\r
204 for(pulDest = &_sbss; pulDest < &_ebss; )
\r
210 // Call the application's entry point.
\r
216 /********************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/
\r