打印

IAR for STM8 UART1中断

[复制链接]
5646|6
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
shaowei2072009|  楼主 | 2013-5-26 00:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
给位大神,小弟刚刚接触STM8单片机,用IAR编写用重新定义C库文件函数时,FILE显示未定义,然后根据网上查手册是IAR normal 跟full的选择问题,但是我选择full时,就会出现下面这么多错误。
main.c  
stm8s_interrupt.c  
Linking
Error[Li006]: duplicate definitions for "RxBuffer"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\test\
STM8FORIAR\UART1\Debug\Obj\stm8s_interrupt.o"
Error[Li006]: duplicate definitions for "UART1_RX_IRQHandler"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\stm8s_interrupt.o"
Error[Li006]: duplicate definitions for "UART_RX_NUM"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and  
"D:\test\STM8FORIAR\UART1\Debug\Obj\stm8s_interrupt.o"
Error[Li006]: duplicate definitions for "_interrupt_20"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\
test\STM8FORIAR\UART1\Debug\Obj\stm8s_interrupt.o"
Error[Li006]: duplicate definitions for "CLKPrescTable"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and  
"D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_AdjustHSICalibrationValue"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_CCOCmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\
test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_CCOConfig"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and  
"D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_ClearITPendingBit"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_ClockSecuritySystemEnable"; in "D:\test\STM8FORIAR\UART1\Debug\
Obj\main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_ClockSwitchCmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_ClockSwitchConfig"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_DeInit"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\test\
STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_FastHaltWakeUpCmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_GetClockFreq"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_GetFlagStatus"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_GetITStatus"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and  
"D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_GetSYSCLKSource"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_HSECmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\
test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_HSICmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\
test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_HSIPrescalerConfig"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_ITConfig"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\
test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_LSICmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\
test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_PeripheralClockConfig"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_SWIMConfig"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and  
"D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_SYSCLKConfig"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_SYSCLKEmergencyClear"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "CLK_SlowActiveHaltWakeUpCmd"; in "D:\test\STM8FORIAR\UART1\Debug\
Obj\main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "HSIDivFactor"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\
test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_ClearFlag"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and  
"D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_ClearITPendingBit"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_Cmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\
test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_DeInit"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\
test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_GetFlagStatus"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_GetITStatus"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_HalfDuplexCmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_ITConfig"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and  
"D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_Init"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\
test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_IrDACmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and  
"D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_IrDAConfig"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_LINBreakDetectionConfig"; in "D:\test\STM8FORIAR\UART1\Debug\
Obj\main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_LINCmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and  
"D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_ReceiveData8"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_ReceiveData9"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_ReceiverWakeUpCmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_SendBreak"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_SendData8"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_SendData9"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_SetAddress"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_SetGuardTime"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_SetPrescaler"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o",  
and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_SmartCardCmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_SmartCardNACKCmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error[Li006]: duplicate definitions for "UART1_WakeUpConfig"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\
main.o", and "D:\test\STM8FORIAR\UART1\Debug\Obj\uart.o"
Error while running Linker

沙发
hawksabre| | 2013-5-26 15:06 | 只看该作者
楼主  你的问题是什么   说的清楚一点   呵呵  

使用特权

评论回复
板凳
mmuuss586| | 2013-5-26 22:09 | 只看该作者
这么多。

使用特权

评论回复
地板
dirtwillfly| | 2013-5-27 08:34 | 只看该作者
重新定义C库文件函数?

库文件不用重新写的,ST提供现成的。
如果不愿用他的库文件,也可以采用直接操作寄存器的方法进行编写程序

使用特权

评论回复
5
shaowei2072009|  楼主 | 2013-5-27 11:10 | 只看该作者
调用的时候出问题了,现在解决了

使用特权

评论回复
6
mengbinaaa| | 2015-6-26 22:42 | 只看该作者
shaowei2072009 发表于 2013-5-27 11:10
调用的时候出问题了,现在解决了

请问楼主这个问题怎样解决的,我最近也遇到了这个问题

使用特权

评论回复
7
玛尼玛尼哄| | 2015-6-27 09:30 | 只看该作者
Error[Li006]: duplicate definitions for "CLK_LSICmd"; in "D:\test\STM8FORIAR\UART1\Debug\Obj\main.o", and "D:\

这么多错误啊。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

23

主题

108

帖子

0

粉丝