嵌入式调试环境建立之Skyeye

        在嵌入式开发中少不了的就是交叉调试,以前自己在宿舍在ARM的开发板因此也没有想过用skyeye来模拟运行过程,无奈最过板子被拿走了,只好用一下这个模拟的东东来解一解瘾,下面是我的安装过程:
       1.   首先到http://gro.clinux.org/frs/?group_id=327&release_id=1424中下载一个安装包,安装过程不是很麻烦,但是却也没有那么容易,建议大家不要下最新版本的,我觉得老版本反而更稳定,编译过程中也没有那么多的问题,我下的是skyeye-0.8.5.1.tar.bz2。
     2.   安装
       按照skyeye目录下的README来做:
        [root@mscl skyeye]# CC=gcc ./configure --target=arm-elf --prefix=/usr/local
       将其安装到/usr/local/bin目录下。
       在这过程中可能会出现如下的错误:
        checking for gtk-config... no
        checking for GTK - version >;= 1.2.8... no
        *** The gtk-config script installed by GTK could not be found
        *** If GTK was installed in PREFIX, make sure PREFIX/bin is in
        *** your path, or set the GTK_CONFIG environment variable to the
         *** full path to gtk-config.
        configure: error: Test for GTK failed. See the file 'INSTALL' for help.
        这个可能跟你下载的版本太高有关系,解决办法是在/usr/local/bin下建立一下名为gtk-config的文件,内容如下
       module="gtk+-2.0"
        if test "$1" = "--version"; then
            pkg-config --modversion $module
        else
            pkg-config $* $module
        fi
       [root@mscl skyeye]# make
       编译它,出现如下的错误:
      gcc -c -g -O2 -I. -I. -I./config -DLOCALEDIR="/"/usr/local/share/locale/"" -DHAVE_CONFIG_H -I./../include/opcode -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../intl -I./../intl -DMI_OUT=1 -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized gdbtypes.c gdbtypes.c: 在函数 ‘recursive_dump_type’ 中: gdbtypes.c:2961: 错误:自增运算中的左值无效 make[1]: *** [gdbtypes.o] 错误 1 make[1]: Leaving directory `/home/skyeye/gdb' make: *** [all-gdb] 错误 2
       在gdb目录下找到gdbtypes.c这个文件,在2961行可以看到这个函数,其实它并不是什么函数,而是一个宏来的,可以在include目录下的obstack.c这个文件下看到它的原型如下
    # define obstack_ptr_grow(OBSTACK,datum)                /
__extension__                                /
({ struct obstack *__o = (OBSTACK);                    /
   if (__o->next_free + sizeof (void *) > __o->chunk_limit)        /
     _obstack_newchunk (__o, sizeof (void *));                /
    *((void **)__o->next_free)++ = ((void *)datum);          /  
    (void)0 )
       真是很烦,错误不断,经过不断的尝试,解决办法如下:
# define obstack_ptr_grow(OBSTACK,datum)                /
__extension__                                /
({ struct obstack *__o = (OBSTACK);                /
    if (__o->next_free + sizeof (void *) > __o->chunk_limit)    /
        _obstack_newchunk (__o, sizeof (void *));            /
        void **__tmp = (void**)__o->next_free;            /
        *__tmp++ = ((void *)datum);                    /
        __o->next_free = (char*)__tmp;                /
        /* *((void **)__o->next_free)++ = ((void *)datum); */    /
        (void) 0; })
       重新make就可以通过了。
       最后一步root@mscl skyeye]# make install
       4.  root@mscl skyeye]# cd /usr/local/bin
       可以看到有skyeye这个文件了
       [root@mscl skyeye]# skyeye
***************************************************************
****                                                       ****
****   SkyEye  Simulator Ver 0.8.5 with  GDB 5.3 Interface ****
****                                                       ****
***************************************************************
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This SkyEye was configured as "--host=i686-pc-linux-gnu --target=arm-elf".
(SkyEye)
       大概就是这的了,如果你出现了诸如unix下的configure下的unexpected ) in OSF *)等等之类一些令人头痛的错误,我建议还是换一个版本好。以上安装的前提是你已经具备有了ARM7的交叉编译器arm-elf-系列的工具链。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值