Build target 'mcu_stm32f103c8x'
compiling main.c...
compiling led.c...
linking...
.Objmcu_stm32f103c8x.axf: Error: L6200E: Symbol USART1_IRQHandler multiply defined (by usart.o and stm32f10x_it.o).
.Objmcu_stm32f103c8x.axf: Error: L6200E: Symbol fputc multiply defined (by usart.o and hal_uart.o).
Not enough information to list image symbols.
Not enough information to list the image map.
Finished: 2 information, 0 warning and 2 error messages.
".Objmcu_stm32f103c8x.axf" - 2 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:01
又出现新问题
Build target 'mcu_stm32f103c8x'
compiling main.c...
compiling led.c...
linking...
.Objmcu_stm32f103c8x.axf: Error: L6200E: Symbol USART1_IRQHandler multiply defined (by usart.o and stm32f10x_it.o).
.Objmcu_stm32f103c8x.axf: Error: L6200E: Symbol fputc multiply defined (by usart.o and hal_uart.o).
Not enough information to list image symbols.
Not enough information to list the image map.
Finished: 2 information, 0 warning and 2 error messages.
".Objmcu_stm32f103c8x.axf" - 2 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:01
又出现新问题
重复定义!USART1_IRQHandler()和fputc()这两个函数有重复定义,至于在哪个文件里面有重复定义,后面已经告诉你了!二者选其一,删除一个就行了!
确实不报错了,但是我屏蔽了usart.c中 /*int fputc(int ch, FILE *f)
{
while((USART1->SR&0X40)==0);//循环发送,直到发送完毕
USART1->DR = (u8) ch;
return ch;
}*/
和
/*void USART1_IRQHandler(void) //串口1中断服务程序
{
u8 Res;
#if SYSTEM_SUPPORT_OS //如果SYSTEM_SUPPORT_OS为真,则需要支持OS.
OSIntEnter();
#endif
if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET) //接收中断(接收到的数据必须是0x0d 0x0a结尾)
{
Res =USART_ReceiveData(USART1); //读取接收到的数据
if((USART_RX_STA&0x8000)==0)//接收未完成
{
if(USART_RX_STA&0x4000)//接收到了0x0d
{
if(Res!=0x0a)USART_RX_STA=0;//接收错误,重新开始
else USART_RX_STA|=0x8000; //接收完成了
}
else //还没收到0X0D
{
if(Res==0x0d)USART_RX_STA|=0x4000;
else
{
USART_RX_BUF[USART_RX_STA&0X3FFF]=Res ;
USART_RX_STA++;
if(USART_RX_STA>(USART_REC_LEN-1))USART_RX_STA=0;//接收数据错误,重新开始接收
}
}
}
}
#if SYSTEM_SUPPORT_OS //如果SYSTEM_SUPPORT_OS为真,则需要支持OS.
OSIntExit();
#endif
}*/
那么会不会对以后操作使用有影响
虽然上面问题解决了,但是不断新的问题出现,为了便捷,取消正点原子的system文件夹,毕竟对delay精度要求不高,等到在熟悉点之后再调用吧。谢谢。
一周热门 更多>