LiangShuang's ...

I'm not a programmer...

sparc-leon3交叉工具链的制作

shuang posted @ 2010年12月08日 10:12 in ecos-on-leon3 , 3336 阅读

 

首先下载工具链bcc+simulator+grmon,下载地址为http://www.gaisler.com/,我下的版本为sparc-elf-4.4.2-1.0.36b,tsim-eval-2.0.18,grmon-eval-1.1.44,分别为leon3的编译器、仿真器和debug工具,把他们解压到/opt/leon3/目录下,然后为了方便我把他们在/opt/leon3/bin下一次建立了软链接,为此写了一个简单的脚本,内容如下:

#!/bin/sh 
# Estiblish softlink for all the file in DIR 
DIR=$1 
objdir=/opt/or1200/tools/bin/ 
files=`dir $DIR` 
echo $files 
for file in $files 
	do 
		ln -s "$DIR"/"$file" ./"$file"		 
	done 
exit 0

 

之后把/opt/leon3/bin目录添加到PATH环境变量下,echo “PATH=$PATH:/opt/leon3/bin”>> ~/.bashrc,source ~/.bashrc,测试一下在终端中输入sparc-elf-gcc –version

 

得到如上结果,说明配置成功。

    然后就可以下载并编译ecos了,同样在leon的网站上下载了ecos-rep-1.0.9,这个是打过leon补丁的ecos,所以就拿来直接用了,下载后解压到~/workspace/leon3/下,配置和编译的过程功能可以参考gaisler网站上的指导,http://www.gaisler.com/cms/index.php?option=com_content&task=view&id=149&Itemid=224

按照上面的说明,我下了ecos图形配置工具,ecostools-1.0,解压到/opt/leon3下,用同样的方法建立软链接,export ECOS_REPOSITORY, ecosconfig new sparc_leon3,一切都进行的很顺利,但是当运行configtool ecos.ecc时,意外悲剧发生了,

error while loading shared libraries: libwx_gtk-2.4.so: cannot open shared object file: No such file or directory,分析一下是缺少动态链接库,google了一下,在网上下了个rpm包,心想这下该好用了吧,不过程序又接连提示了缺少另外几个动态链接库,我急了,怎么会缺少这么多呢,于是就ldd了一下,

    linux-gate.so.1 =>  (0x005f3000)

    libtcl.so => /usr/lib/libtcl.so (0x00cfa000)

    libwx_gtk-2.4.so => not found

    libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00110000)

    libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00c26000)

    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00373000)

    libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x001ca000)

    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x001e3000)

    libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00548000)

    /lib/ld-linux.so.2 (0x00cbb000)

开始只是缺少libwx_gtk-2.4,可是后面又缺少libglib1.2等低版本的链接库,只好一个一个都给找到了,最后什么都不缺了,又提示段错误,无奈之下只好看一下有没有更高版本的crosstool,这个版本是在是太低了,很多已经废弃的链接库在我的ubuntu下都没有,果然找到了2010-03-05的版本的,下载地址见http://www.ecoscentric.com/devzone/configtool.shtml,

解压之后果然好用,虽然运行时还是会在终端下出现warning,但是已经能看到配置界面了

 

为了安装动态链接库,我把系统差点搞蹦了,原因就是我把缺少的.so文件直接复制到/usr/lib下了,这样系统就乱了,分不清连接低版本的还是高版本的了,网上的说法是把兼容库单独放到一个路径下,设置一下LD_LIBRARY_PATH,这样的话就不会和当前系统的一些功能发生冲突了。。。

civaget 说:
2023年12月10日 08:43

백링크업체's SEO audits are a game-changer. They identified issues and improved my site's search engine performance.

civaget 说:
2023年12月12日 00:38

제주오피's strategic locations near attractions enhanced my island adventure. It's a traveler's dream come true.

civaget 说:
2023年12月12日 01:38

러시아마사지 is a fantastic way to relax and de-stress. I highly recommend it for anyone seeking a soothing massage experience.

civaget 说:
2023年12月14日 04:57 I am curious to find out what blog platform you’re utilizing? I’m experiencing some small security issues with my latest blog and I’d like to find something more secure. Do you have any recommendations? 스포츠중계
civaget 说:
2023年12月18日 06:31

I rely on 누누티비 for quality entertainment, and it never disappoints.

civaget 说:
2023年12月20日 00:13

Explore Cheongju like a pro with 청주오피. Verified listings, user reviews, and a user-friendly interface simplify your journey.

civaget 说:
2023年12月22日 20:46 When it comes to 설문조사 사이트 무료, you can gather essential data without stretching your financial resources.
civaget 说:
2023年12月26日 03:08

You may find two to three new levels inside L . a . Weight loss and any one someone is incredibly important. Initial stage may be real melting away rrn the body. lose weight 에볼루션카지노

civaget 说:
2023年12月26日 04:13

해외스포츠중계 brings sports from diverse cultures to your fingertips.

civaget 说:
2023年12月26日 09:34

Self-published authors can use online platforms to host virtual book launches and signings. self publishing a book

civaget 说:
2023年12月29日 20:16

Explore Busan's diverse landscape with 부산달리기. Discover gaming, humor, culture, cuisine, and local businesses like never before.

civaget 说:
2023年12月31日 18:35

Better half, this great site is without a doubt fabolous, i love it Divine Revelations

civaget 说:
2024年1月05日 19:27

I can't get enough of the exciting new releases on 누누티비.

civaget 说:
2024年1月14日 04:21

jobobqidblcvametllvvnfgn lenen zonder bkr fffdeldlfa gkvhmskdkbtftkrbefnhsadvi lenen zonder bkr toetsing glllffggk lkgvmhvaafsflkhmhjovea lenen fgjebajelj kcptqfkakdrkiahdkahkgq hypotheek deejeefjde spcnoahiijrphmmdfviaqmgg migraine headache edjfejjfd เว็บพนันออนไลน์ คืนยอดเสีย

civaget 说:
2024年1月15日 02:21

Learning the ropes of baccarat pays off on 실시간 바카라 사이트. Strategy is key for success.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter