本文主要介绍了在虚拟机linux中下载和安装最新版本eCos并建立eCos开发环境的方法与步骤。本人使用的linux虚拟机是ubuntu9.10,其它linux版本的eCos安装方法应该类似。

1. 安装 tcl

Tcl ,工具命令语言 Tool Command Language。

linux系统里一般不自带安装tcl,如果虚拟机中没有安装tcl,则要先安装tcl。

[cc]sudo apt-get install tcl[/cc]

2.  下载 ecos-install.tcl在线安装脚本文件

下地址:ftp://ecos.sourceware.org/pub/ecos/ecos-install.tcl

或者执行如下命令直接在linux中下载:

[cc]wget –passive-ftp ftp://ecos.sourceware.org/pub/ecos/ecos-install.tcl[/cc]

上述命令会把 ecos-install.tcl下载当前目录下。

3.  在shell中执行ecos-install.tcl

执行如下命令:

[cc]sh ecos-install.tcl[/cc]

然后就开始安装eCos了,安装过程中要选择源和一些参数镜像地址、安装路径、gnu工具链选择等,按提示操作就是了。本人选择安装在了/opt/ecos/路径下。下面是安装过程(打蓝色部分根据你的情况进行操作):

reille@ubuntu:~/work/eCos$ sh ecos-install.tcl
eCos installer v2.0.1 starting…
Written and maintained by Jonathan Larmour <jifl@eCosCentric.com>

Retrieving installer metadata information…
Connected…
Downloading ecos-install.db…
File size 6807 bytes
[**************************************************]
———————————————————
Available distribution sites:

[1] ftp://mirrors.kernel.org/sources.redhat.com/ecos
[2] http://mirrors.kernel.org/sources.redhat.com/ecos
[3] ftp://mirror.aarnet.edu.au/pub/sourceware/ecos
[4] http://mirror.aarnet.edu.au/pub/sourceware/ecos
[5] ftp://ftp.mirrorservice.org/sites/sources.redhat.com/pub/ecos
[6] http://www.mirrorservice.org/sites/sources.redhat.com/pub/ecos
[7] ftp://gd.tuwien.ac.at/opsys/ecos
[8] http://gd.tuwien.ac.at/opsys/ecos
[9] ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/ecos
[10] ftp://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos
[11] http://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos
[12] ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/sources.redhat.com/ecos
[13] http://ftp-stud.fht-esslingen.de/pub/Mirrors/sources.redhat.com/ecos
[14] ftp://bo.mirror.garr.it/mirrors/sourceware.org/ecos
[15] http://bo.mirror.garr.it/mirrors/sourceware.org/ecos
[16] ftp://ftp.u-aizu.ac.jp/pub/gnu/cygnus/ecos
[17] ftp://ftp.chg.ru/pub/sourceware/ecos
[18] ftp://ftp.sun.ac.za/pub/mirrorsites/sourceware.org/pub/ecos
[19] http://ftp.sun.ac.za/ftp/pub/mirrorsites/sourceware.org/pub/ecos
[20] ftp://ftp.twaren.net/Unix/Sourceware/ecos
[21] http://ftp.twaren.net/Unix/Sourceware/ecos
[22] ftp://mirror.facebook.com/sourceware/ecos
[23] http://mirror.facebook.com/sourceware/ecos
[24] http://sources-redhat.mirrors.airband.net/ecos
[25] ftp://ecos.sourceware.org/pub/ecos

Please select a distribution site: 1
———————————————————

Please select a directory for installation
[Default /home/reille/ecos]: /opt/ecos/
———————————————————
Available prebuilt GNU tools:

[1] arm-eabi
[2] arm-elf (old)
[3] i386-elf
[4] m68k-elf
[5] mipsisa32-elf
[6] powerpc-eabi
[7] sh-elf
[q] Finish selecting GNU tools

(“*” indicates tools already selected)

Please select GNU tools to download and install: 3
[1] arm-eabi
[2] arm-elf (old)
[*] i386-elf
[4] m68k-elf
[5] mipsisa32-elf
[6] powerpc-eabi
[7] sh-elf
[q] Finish selecting GNU tools

(“*” indicates tools already selected)

Please select GNU tools to download and install: q
Entering .
Retrieving GNU tools for i386-elf
Connected…
Downloading ecoscentric-gnutools-i386-elf-20081107-sw.i386linux.tar.bz2…
File size 15414738 bytes
[**************************************************]
Retrieving eCos version 3.0
Connected…
Downloading ecos-3.0.i386linux.tar.bz2…
File size 17854418 bytes
[**************************************************]
Downloads complete.
If you wish to disconnect from the internet you may do so now.
Unpacking ecoscentric-gnutools-i386-elf-20081107-sw.i386linux.tar.bz2…
Unpacking ecos-3.0.i386linux.tar.bz2…
Generating ./ecosenv.sh
Generating ./ecosenv.csh
———————————————————
In future, to establish the correct environment for eCos,
run one of the following commands:
. ./ecosenv.sh (for sh/bash users); or
source ./ecosenv.csh (for csh/tcsh users)

It is recommended you append these commands to the end of your
shell startup files such as $HOME/.profile or $HOME/.login
———————————————————
Installation complete!
reille@ubuntu:~/work/eCos$
reille@ubuntu:~/work/eCos$

注意上面打红色部分。这段英文提供了设置eCos环境的方法。按推荐的方法进行操作即可。

4.  安装 libstdc++.so.5库文件

上面已经安装好eCos并建立了eCos的环境变量。但此时运行eCos下的图形配置工具:configtool,或命令行配置工具:ecosconfig是会出错的,错误如下:

error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

这是因为linux虚拟机中没有安装libstdc++ v3 (/usr/lib/libstdc++.so.5)兼容库导致的。

本人尝试了下使用apt-get install命令安装,但在ubuntu9.10中不能安装成功,因此,采用了手动安装的方法。具体参见:

ubuntu下安装eCos 3.0时所必需库libstdc++5下载 一文的介绍。

至此,完成了安装eCos并建立eCos开发环境。

eCos图形配置工具configtool

eCos图形配置工具configtool

» 文章出处: reille博客—http://velep.com , 如果没有特别声明,文章均为reille博客原创作品
» 郑重声明: 原创作品未经允许不得转载,如需转载请联系reille#qq.com(#换成@)
分享到:

 Leave a Reply

(必须)

(我会替您保密的)(必须)

*

   
© 2012 velep.com | reille blog | 管理| 粤ICP备12094833号-2| 谷歌地图| 百度地图| Suffusion theme|Sayontan Sinha

无觅相关文章插件,快速提升流量