TI中文支持网
TI专业的中文技术问题搜集分享网站

这样的中断向量表是不是有问题?

extern void UART0_IRQHandler(void);
extern void UART3_IRQHandler(void);
extern void TIMER0_IRQHandler(void);
extern void TIMER1_IRQHandler(void);
extern void TIMER3_IRQHandler(void);
//*****************************************************************************
// The vector table.  Note that the proper constructs must be placed on this to
// ensure that it ends up at physical address 0x0000.0000 or at the start of
// the program if located at a start address other than 0.
//*****************************************************************************
#pragma DATA_SECTION(g_pfnVectors, ".intvecs")
void (* const g_pfnVectors[])(void) =
{
    (void (*) (void))((unsigned long)&__STACK_END),

            // The initial stack pointer
    ResetISR,                               //1 The reset handler
    NmiSR,                                  //2 The NMI handler
    FaultISR,                               //3 The hard fault handler
    IntDefaultHandler,                      //4 The MPU fault handler
    IntDefaultHandler,                      //5 The bus fault handler
    IntDefaultHandler,                      //6 The usage fault handler
    0,                                      //7 Reserved
    0,                                      //8 Reserved
    0,                                      //9 Reserved
    0,                                      //10 Reserved
    IntDefaultHandler,                      //11 SVCall handler
    IntDefaultHandler,                      //12 Debug monitor handler
    0,                                      //13 Reserved
    IntDefaultHandler,                      //14 The PendSV handler
    IntDefaultHandler,                      //15 The SysTick handler
    IntDefaultHandler,                      //16 GPIO Port A
    IntDefaultHandler,                      //17 GPIO Port B
    IntDefaultHandler,                      //18 GPIO Port C
    IntDefaultHandler,                      //19 GPIO Port D
    IntDefaultHandler,                      //20 GPIO Port E
    UART0_IRQHandler,                      //21 UART0 Rx and Tx
    IntDefaultHandler,                      //22 UART1 Rx and Tx
    IntDefaultHandler,                      //23 SSI0 Rx and Tx
    IntDefaultHandler,                      //24 I2C0 Master and Slave
    IntDefaultHandler,                      //25 Reserved
    IntDefaultHandler,                      //26 Reserved
    IntDefaultHandler,                      //27 Reserved
    IntDefaultHandler,                      //28 Reserved
    IntDefaultHandler,                      //29 Reserved
    IntDefaultHandler,                      //30 Reserved
    IntDefaultHandler,                      //31 Reserved
    IntDefaultHandler,                      //32 Reserved
    IntDefaultHandler,                      //33 Reserved
    IntDefaultHandler,                      //34 Watchdog timer
    TIMER0_IRQHandler,                      //35 Timer 0 subtimer A
    IntDefaultHandler,                      //36 Timer 0 subtimer B
    TIMER1_IRQHandler,                      //37 Timer 1 subtimer A
    IntDefaultHandler,                      //38 Timer 1 subtimer B
    IntDefaultHandler,                      //39 Timer 2 subtimer A
    IntDefaultHandler,                      //40 Timer 2 subtimer B
    IntDefaultHandler,                      //41 Reserved
    IntDefaultHandler,                      //42 Reserved
    IntDefaultHandler,                      //43 Reserved
    IntDefaultHandler,                      //44 System Control
    IntDefaultHandler,                      //45 FLASH Control
    IntDefaultHandler,                      //46 GPIO Port F
    IntDefaultHandler,                      //47 GPIO Port G
    IntDefaultHandler,                      //48 GPIO Port H
    IntDefaultHandler,                      //49 UART2 Rx and Tx
    IntDefaultHandler,                      //50 SSI1 Rx and Tx
    TIMER3_IRQHandler,                      //51 Timer 3 subtimer A
    IntDefaultHandler,                      //52 Timer 3 subtimer B
    IntDefaultHandler,                      //53 I2C1 Master and Slave
    IntDefaultHandler,                      //54 Reserved
    IntDefaultHandler,                      //55 Reserved
    IntDefaultHandler,                      //56 Reserved
    IntDefaultHandler,                      //57 Reserved
    IntDefaultHandler,                      //58 EMAC
    IntDefaultHandler,                      //59 Reserved
    IntDefaultHandler,                      //60 USB0
    IntDefaultHandler,                      //61 Reserved
    IntDefaultHandler,                      //62 uDMA Software Transfer
    IntDefaultHandler,                      //63 uDMA Error
    IntDefaultHandler,                      //64 Reserved
    IntDefaultHandler,                      //65 Reserved
    IntDefaultHandler,                      //66 Reserved
    IntDefaultHandler,                      //67 Reserved
    IntDefaultHandler,                      //68 Reserved
    IntDefaultHandler,                      //69 External Peripheral Interface
    IntDefaultHandler,                      //70 GPIO Port J
    IntDefaultHandler,                      //71 Reserved
    IntDefaultHandler,                      //72 Reserved
    IntDefaultHandler,                      //73 SSI2
    IntDefaultHandler,                      //74 SSI3
    UART3_IRQHandler,                      //75 UART3
    IntDefaultHandler,                      //76 UART4
    IntDefaultHandler,                      //77 Reserved
    IntDefaultHandler,                      //78 Reserved
    IntDefaultHandler,                      //79 Reserved
    IntDefaultHandler,                      //80 CAN0 INT0
    IntDefaultHandler,                      //81 CAN0 INT1
    IntDefaultHandler,                      //82 CAN1 INT0
    IntDefaultHandler,                      //83 CAN1 INT1
    IntDefaultHandler,                      //84 Reserved
    IntDefaultHandler,                      //85 Reserved
    IntDefaultHandler,                      //86 Reserved
    IntDefaultHandler,                      //87 Reserved
    IntDefaultHandler,                      //88 ADCINT1
    IntDefaultHandler,                      //89 ADCINT2
    IntDefaultHandler,                      //90 ADCINT3
    IntDefaultHandler,                      //91 ADCINT4
    IntDefaultHandler,                      //92 ADCINT5
    IntDefaultHandler,                      //93 ADCINT6
    IntDefaultHandler,                      //94 ADCINT7
    IntDefaultHandler,                      //95 ADCINT8
    IntDefaultHandler,                      //96 CTOMIPC1
    IntDefaultHandler,                      //97 CTOMIPC2
    IntDefaultHandler,                      //98 CTOMIPC3
    IntDefaultHandler,                      //99 CTOMIPC4
    IntDefaultHandler,                      //100 Reserved
    IntDefaultHandler,                      //101 Reserved
    IntDefaultHandler,                      //102 Reserved
    IntDefaultHandler,                      //103 Reserved
    IntDefaultHandler,                      //104 RAM Single Error
    IntDefaultHandler,                      //105 System/USB PLL Out of Lock
    IntDefaultHandler,                      //106 M3 Flash Single Error
    IntDefaultHandler                       //107 Reserved
};

上面的是startup_ccs.c中的一部分,而中断子程序UART0_IRQHandler,UART3_IRQHandler,TIMER0_IRQHandler,TIMER1_IRQHandler,TIMER3_IRQHandler都是汇编写的,而且也已定义.global TIMER0_IRQHandler…….,现在发现找不到中断入口,怎么检查错误?

Victor Zheng:

同一个函数在汇编里和在C里的名字差一个"_".比如

C里          void test(void)

汇编里       .global _test

赞(0)
未经允许不得转载:TI中文支持网 » 这样的中断向量表是不是有问题?
分享到: 更多 (0)