MINIUI3.0在vxworks上移植

chrisforbt 2013-05-31 10:00:20
本人实习生一枚,最近接到一个任务,就是将minigui移植到9G45开发板,操作系统是vxworks6.6。
接到这个任务的时候,就有两个想法,第一个就是上网搜教程。搜了半天,就搜到一个将minigui1.6.10移植到mips内核的开发板。而且那个高手的minigui1.6.9跟开源的是不一样的,估计是增值版的(收费的),所以参考价值比较低。另外我是用WindRiver工具,而不是Tornado工具。所以,我慢慢琢磨着弄了一个自己的rules.make,如下。

# rules for 9g45-vxworks

AS=
CC=CC
CPP=dplus
AR=AR
RANLIB=ranlib
MAKE=/usr/bin/make

ARFLAGS=crus
COFLAGS=-c

OBJ=o
LIBA=a

PREFIX=C:/cross

TARGET_DIR=D:/WindRiver/vxworks-6.6/target

INCS+=-I$(TARGET_DIR)/h

CFLAGS+=-g -D_VX_CPU=_VX_ARMARCH5 -D_VX_TOOL_FAMILY=diab -D_VX_TOOL=diab -DARMEL -D__LITTLE_ENDIAN__

这个rules.make我也不知道是不是正确的,但是就是能编译了。

不过编译的时候出现了很多问题,如下。

In file included from D:/WindRiver/vxworks-6.6/target/h/stdio.h:60,
from misc.c:16:
D:/WindRiver/vxworks-6.6/target/h/types/vxANSI.h:53:26: types/vxCpuX.h: No such file or directory
In file included from D:/WindRiver/vxworks-6.6/target/h/base/e_vxTypesOld.h:111,
from D:/WindRiver/vxworks-6.6/target/h/types/vxTypesOld.h:126,
from D:/WindRiver/vxworks-6.6/target/h/vxWorksCommon.h:213,
from D:/WindRiver/vxworks-6.6/target/h/vxWorks.h:84,
from D:/WindRiver/vxworks-6.6/target/h/private/handleLibP.h:21,
from D:/WindRiver/vxworks-6.6/target/h/stdio.h:62,
from misc.c:16:
D:/WindRiver/vxworks-6.6/target/h/sys/types.h:103:30: base/b_clockid_t.h: No such file or directory
D:/WindRiver/vxworks-6.6/target/h/sys/types.h:105:35: base/b_pthread_cond_t.h: No such file or directory
D:/WindRiver/vxworks-6.6/target/h/sys/types.h:106:39: base/b_pthread_condattr_t.h: No such file or directory
D:/WindRiver/vxworks-6.6/target/h/sys/types.h:107:34: base/b_pthread_key_t.h: No such file or directory
D:/WindRiver/vxworks-6.6/target/h/sys/types.h:108:36: base/b_pthread_mutex_t.h: No such file or directory
D:/WindRiver/vxworks-6.6/target/h/sys/types.h:109:40: base/b_pthread_mutexattr_t.h: No such file or directory
D:/WindRiver/vxworks-6.6/target/h/sys/types.h:110:35: base/b_pthread_once_t.h: No such file or directory
D:/WindRiver/vxworks-6.6/target/h/sys/types.h:111:32: base/b_suseconds_t.h: No such file or directory
In file included from D:/WindRiver/vxworks-6.6/target/h/sys/types.h:113,
from D:/WindRiver/vxworks-6.6/target/h/base/e_vxTypesOld.h:111,
from D:/WindRiver/vxworks-6.6/target/h/types/vxTypesOld.h:126,
from D:/WindRiver/vxworks-6.6/target/h/vxWorksCommon.h:213,
from D:/WindRiver/vxworks-6.6/target/h/vxWorks.h:84,
from D:/WindRiver/vxworks-6.6/target/h/private/handleLibP.h:21,
from D:/WindRiver/vxworks-6.6/target/h/stdio.h:62,
from misc.c:16:
D:/WindRiver/vxworks-6.6/target/h/base/b_trace_id_t.h:33: error: parse error before "trace_id_t"
D:/WindRiver/vxworks-6.6/target/h/base/b_trace_id_t.h:33: warning: data definition has no type or storage class
In file included from misc.c:23:
../../include/common.h:55:33: ../mgconfig.h: No such file or directory
In file included from misc.c:23:
../../include/common.h:256: error: redefinition of typedef 'BOOL'
D:/WindRiver/vxworks-6.6/target/h/base/b_BOOL.h:31: error: previous declaration of 'BOOL' was here
../../include/common.h:415: error: redefinition of typedef 'UINT'
D:/WindRiver/vxworks-6.6/target/h/types/vxTypesOld.h:145: error: previous declaration of 'UINT' was here
../../include/common.h:1452: error: conflicting types for 'time_t'
D:/WindRiver/vxworks-6.6/target/h/base/b_time_t.h:40: error: previous declaration of 'time_t' was here
In file included from misc.c:32:
D:/WindRiver/vxworks-6.6/target/h/time.h:102: error: redefinition of `struct tm'
In file included from misc.c:34:
D:/WindRiver/vxworks-6.6/target/h/sys/ioctl.h:116:27: ipnet/ipioctl.h: No such file or directory
misc.c: In function `LookForEtcFile':
misc.c:118: error: `ETCFILENAME' undeclared (first use in this function)
misc.c:118: error: (Each undeclared identifier is reported only once
misc.c:118: error: for each function it appears in.)
misc.c:154: error: parse error before "ETCFILENAME"
misc.c:161: error: parse error before "ETCFILENAME"
../../rules.make:128: recipe for target `misc.o' failed
make[2]: *** [misc.o] Error 1

当然不止这么一点,还有很多的,但是一步一步来吧。

另外还有个想法,同时也是带我那个师傅的想法,就是看明白整个minigui的代码结构,然后把它的源码直接加入到工程中,然后一起编译。
我也试了的,但是没有成功,主要是因为minigui刚刚开始就是给GNU环境设计的,所以它里面会包含一些linux环境才有的头文件,如:alloca.h,我在WindRiver工程里面加入了cygwin(神器)里面的usr/include这个头文件路径,是可以找到alloca.h了,但是之后又会出现一些错误,比如大小端没定义之类的。我还是能解决的,但是,到了最后,它就报usr/include里面的文件错误,这个就真心无法解决了。
如果我能把这个弄出来,肯定要写篇很详细的教程,然后共享给大家,希望大家多多帮助!
...全文
863 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
blueice12 2014-02-11
  • 打赏
  • 举报
回复
如果官方没有支持的东西,移植起来是会有不少麻烦吧,不过完成了的话会给后来用的人带来很多方便。支持!
footpad911 2013-12-19
  • 打赏
  • 举报
回复
有点事情请教,qq:50623933 联系下,谢谢
chrisforbt 2013-05-31
  • 打赏
  • 举报
回复
自己顶一下,免得沉了。
chrisforbt 2013-05-31
  • 打赏
  • 举报
回复
再次顶一下。

2,179

社区成员

发帖
与我相关
我的任务
社区描述
xworks是美国 Wind River System 公司( 以下简称风河公司 ,即 WRS 公司)推出的一个实时操作系统。
社区管理员
  • VxWorks开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧