打印
[ZLG-MCU]

TKStudio错误

[复制链接]
2362|5
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
machunshui|  楼主 | 2009-10-19 22:25 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
用TKStudio编译其自带的例子gcc_ucos\ucos.xmp工程,按照<<使用前请先读该文件readme.txt>>要求导入UCOS2.76,并更改相关头文件包含方式,编译顺利通过,但是产生一大堆链接错误,请问如何解决?

啥叫 "multiple definition of `osintenter'"?
明明osintenter这个函数就定义一次啊!



--------------------Configuration: C:\Program Files\Zhiyuan Electronic\TKStudio\Examples\armgcc\gcc_ucos\ucos.xmp - DebugRel--------------------

build target G++ Lite-DebugRel ...
Assembling crt0.S...
Compiling hal.c...
Compiling main.c...
Compiling os_core.c...
Assembling os_cpu_a.s...
Compiling os_cpu_c.c...
Compiling os_flag.c...
Compiling os_mbox.c...
Compiling os_mem.c...
Compiling os_mutex.c...
Compiling os_q.c...
Compiling os_sem.c...
Compiling os_task.c...
Compiling os_time.c...
Compiling target.c...
Compiling ucos_ii.c...

Linking...
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `osintenter':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(301):error: multiple definition of `osintenter'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(301):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `osversion':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(625):error: multiple definition of `osversion'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(625):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_eventtaskrdy':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(670):error: multiple definition of `os_eventtaskrdy'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(670):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_eventtaskwait':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(722):error: multiple definition of `os_eventtaskwait'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(722):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_eventto':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(757):error: multiple definition of `os_eventto'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(757):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_eventwaitlistinit':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(787):error: multiple definition of `os_eventwaitlistinit'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(787):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_memclr':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1116):error: multiple definition of `os_memclr'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1116):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_memcopy':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1148):error: multiple definition of `os_memcopy'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1148):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_strcopy':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1221):error: multiple definition of `os_strcopy'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1221):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_strlen':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1258):error: multiple definition of `os_strlen'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1258):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `ostasknameset':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_task.c(655):error: multiple definition of `ostasknameset'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_task.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_task.c(655):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `ostasknameget':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_task.c(583):error: multiple definition of `ostasknameget'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_task.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_task.c(583):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `ossemcreate':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_sem.c(87):error: multiple definition of `ossemcreate'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_sem.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_sem.c(87):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `ostimetick':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(538):error: multiple definition of `ostimetick'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(538):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `oseventnameset':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(174):error: multiple definition of `oseventnameset'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(174):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `oseventnameget':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(104):error: multiple definition of `oseventnameget'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(104):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_tcbinit':
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1459):error: multiple definition of `os_tcbinit'
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\os_core.o:c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\os_core.c(1459):error: first defined here
c:\program files\zhiyuan electronic\tkstudio\examples\armgcc\gcc_ucos\debugrel\ucos_ii.o: in function `os_taskidle':
..................................................

相关帖子

沙发
tkstudio| | 2009-10-20 09:19 | 只看该作者
请在ucos_ii.c里将下面这些语句注释掉
#include "os_core.c"
#include "os_flag.c"
#include "os_mbox.c"
#include "os_mem.c"
#include "os_mutex.c"
#include "os_q.c"
#include "os_sem.c"
#include "os_task.c"
#include "os_time.c"
#include "os_dbg.c"

使用特权

评论回复
板凳
machunshui|  楼主 | 2009-10-21 08:15 | 只看该作者
多谢!
确实如此!

使用特权

评论回复
地板
linhai1986| | 2009-10-28 00:07 | 只看该作者
学习了

使用特权

评论回复
5
xiaoxin1986| | 2009-10-28 00:13 | 只看该作者
好多错误啊

使用特权

评论回复
6
tkstudio| | 2009-10-29 08:56 | 只看该作者
请问楼上好多什么错误?

使用特权

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

本版积分规则

153

主题

3224

帖子

4

粉丝