下面的这个部分,可以写在Interrupt.cpp文件中,也可单独写一个CPP文件。
-----------------------------------------------------------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
void __initial_sp_ex(void);
void Reset_Handler(void);
#ifdef __cplusplus
}
#endif
void Default_Handler(void);
typedef void(* const ISR_t)(void);
ISR_t IsrVector[] __attribute__ ((section("RESET"))) =
{
__initial_sp_ex,
Reset_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
0,
0,
0,
0,
Default_Handler,
Default_Handler,
0,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
CInterrupt::USB_LP_CAN1_RX0_IRQHandler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
CInterrupt::TIM3_IRQHandler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler,
Default_Handler
};
void Default_Handler(void)
{
while (1);
}
|