Re: 5015 编译之后出现这种警告是什么原因?
|
||||
---|---|---|---|---|
版主
|
PSV 的功能在 C30 的啟動模塊(crt1.o)裡就已經致能了,為避免你在中斷裡誤改或誤用了PSV的Page 或指標,所以加入了這個訊息。早期的 C30 版本是不檢查的,新版的 C30 就加了這個檢查的功能。
發表於: 2008/2/27 11:37
|
|||
|
Re: 5015 编译之后出现这种警告是什么原因?
|
||||
---|---|---|---|---|
新會員
|
谢谢版主的指点。
但我还有一点不明白,为什么中断函数宣告里要加入no_auto_psv 的字眼,而其他的函数里不加就可以呢?
發表於: 2008/2/26 16:40
|
|||
|
5015 编译之后出现这种警告是什么原因?
|
||||
---|---|---|---|---|
新會員
|
程序如下:
//--------------------------------------------------------------------- // Include File #include "p30f5015.h" //--------------------------------------------------------------------- //Constant Definitions //--------------------------------------------------------------------- #define NODE_VAL 1 //--------------------------------------------------------------------- // Variable declarations //--------------------------------------------------------------------- unsigned char rev_buf[30]; // 接收缓冲区 unsigned char send_buf[40]; // 发送缓冲区 //--------------------------------------------------------------------- // Function Prototypes //--------------------------------------------------------------------- void __attribute__((__interrupt__)) _T1Interrupt (void); void __attribute__((__interrupt__)) _U1RXInterrupt(void); //--------------------------------------------------------------------- // Timer1 Interrupt routine T1=100ms //--------------------------------------------------------------------- void __attribute__((__interrupt__)) _T1Interrupt (void) { IFS0bits.T1IF = 0; // 处理 } //--------------------------------------------------------------------- // UART1 Interrupt Service Routine //--------------------------------------------------------------------- void __attribute__((__interrupt__)) _U1RXInterrupt(void) { IFS0bits.U1RXIF = 0; // 处理 } int main(void) { } 编译之后总有这个警告,不知什么原因,请大家指点,谢谢!!! aa.c: In function '_T1Interrupt': aa.c:546: warning: PSV model not specified for '_T1Interrupt'; assuming 'auto_psv' this may affect latency aa.c: In function '_U1RXInterrupt': aa.c:636: warning: PSV model not specified for '_U1RXInterrupt'; assuming 'auto_psv' this may affect latency
發表於: 2008/2/26 10:54
|
|||
|