STM32错误代码L6218E解析与解决方案
.\Objects\LED-闪烁.axf: Error: L6218E: Undefined symbol USART_ReceiveDate (referred from serial.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 1 error messages.
".\Objects\LED-闪烁.axf" – 1 Error(s), 2 Warning(s).
解决:找到你写的未定义的变量USART…(可能你或函数内部定义过),挨个找选中后ctrl+f,
将USART_ReceiveDate(USART1)换为USART_ReceiveData(USART1),//我把a打成了e,我丢
结束
".\Objects\LED-闪烁.axf" – 0 Error(s), 1 Warning(s)..
还有1. 是extern声明只在.c文件,就会报错,必须在.h文件里声明外部调用才可解决.
2. .h文件里声明外部调用的数组,加内容也可能报错.如extern uint16_t Myrtc_Time[]={2023,1,1,23,59,55};//wrong
作者:Suger532