keil编译出现如下警告:
WARNING L1: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: UART0
MODULE: .\obj\app_uart0.obj (APP_UART0)
WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: UART0
MODULE: .\obj\app_uart0.obj (APP_UART0)
ADDRESS: 31ACH
解决办法:L1和L2是同一问题,是Uart0在程序中使用了,但是没定义;
如下:uart.h文件中结构体
typedef struct
{
u8 RxOk;
}USART_DEF;
extern USART_DEF Uart0;
uart.c中需要定义下USART_DEF Uart0;