虚拟实验室eCos开发环境的配置(Linux)


1.下载eMBosLab发布的eCos源代码

git clone git://emboslab.git.sourceforge.net/gitroot/emboslab/rtems-4.9.5-emboslab /opt/ecos/ecos-hg

" /opt/ecos/ecos-hg" 表示你需要放置的目录,请自行设置

2.下载eCos最新ARM编译器

点击 arm-eabi 得到 arm eabi的编译器,解压到 /opt/ecos/gnutools/arm-eabi/

“/opt/ecos/gnutools/arm-eabi/" 可以根据你的需要而更改

3.配置环境变量

将以下两句加到你Ubuntu的~/.profile的最下面

(如果是Fedora请加到~/.bashrc中)

解释一下:第一行表示把编译器加到系统的PATH中,第二行为ecos的配置工具提供ecos的安装位置

export PATH=$PATH:/opt/ecos/gnutools/arm-eabi/bin

export ECOS_REPOSITORY=/opt/ecos/ecos-hg/packages

4.安装ecos到Linux

mkdir temp

cd temp

/opt/ecos/ecos-hg/configure

make

sudo make install

这样系统中就有了ecosconfig的命令行配置工具和synthetic api模拟工具了。

3.编译eCos图形配置工具

1)下载 wxGTK-2.8.8.tar.bz2

2)编译wxGTK

解压:

mkdir ~/src

cd ~/src

bunzip2 -c wxGTK-2.8.8.tar.bz2 | tar xf -

cd wxGTK-2.8.8

配置wxGTK:

mkdir ~/wx-build
cd ~/wx-build
$HOME/src/wxGTK-2.8.8/configure --disable-shared \
    --disable-sockets --prefix=$HOME/wxGTK-2.8.8
make
make install

3)编译配置ecos的host工具库给图形配置工具用:

mkdir ~/infra-build
cd ~/infra-build
/ecos/ecos-hg/host/configure --prefix=$HOME/ecos-tools
make
make install

4)编译图形配置工具:

mkdir ~/configtool-build
cd ~/configtool-build
make -f /opt/ecos/ecos-hg/host/tools/configtool/standalone/wxwin/makefile.gnu \
    install WXDIR=$HOME/wxGTK-2.8.8 ECOSSRCDIR=/opt/ecos/ecos-hg/host \
    INSTALLDIR=$HOME/ecos-tools

这样就可以在ecos-tools目录得到configtool工具了

4.下载并编译 eMBosLab发布的MINI2440 QEMU软件模拟器

git clone git://emboslab.git.sourceforge.net/gitroot/emboslab/qemu-mini2440

下载以后会有qemu-mini2440的目录,还需要切换到ecos-emboslab这个分支


git checkout -b ecos-emboslab remotes/origin/ecos-emboslab

./configure --target-list=arm-softmmu

make

然后就可以在arm-softmmu的目录中得到一个qemu-system-arm的可执行文件,我们需要的模拟器就是他。

不需要安装copy出来就可以。

5.编译redboot来测试qemu

编译redboot for mini2440

mkdir mini2440_redboot

cd mini2440_redboot

命令行配置方法 :

ecosconfig new mini2440 redboot

ecosconfig tree

make

图形界面配置方法:

仿真redboot

qemu-system-arm -M mini2440 -kernel install/bin/redboot.elf  -serial stdio -show-cursor

应该能看操作终端和LCD的redboot画面了,目前的输入只能通过终端完成

S3C: CLK=240 HCLK=240 PCLK=240 UCLK=57
QEMU: ee24c08_init
DM9000: INIT QEMU MAC : 52:54:00:12:34:56
QEMU mini2440_reset: loaded kernel install/bin/redboot.elf at 0x30000000
S3C: CLK=240 HCLK=60 PCLK=30 UCLK=57
S3C: CLK=400 HCLK=100 PCLK=50 UCLK=57
S3C: CLK=400 HCLK=100 PCLK=50 UCLK=48
+
RedBoot(tm) bootstrap and debug environment [QEMU]
Non-certified release, version UNKNOWN - built 21:51:48, May 20 2011

Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
RedBoot is free software, covered by the eCos license, derived from the
GNU General Public License. You are welcome to change it and/or distribute
copies of it under certain conditions. Under the license terms, RedBoot's
source code and full license terms must have been made available to you.
Redboot comes with ABSOLUTELY NO WARRANTY.

Platform: MINI2440 system (ARM9)
RAM: 0x00000000-0x03600000 [0x00025e10-0x03600000 available]
RedBoot>

相关内容

    暂无相关文章