基于eclipse搭建一个免费的arm的IDE平台

交叉编译器用的是YAGARTO,全称是Yet another GNU ARM toolchain,它有以下特征:
1,不是基于Cygwin
2,与eclipse一起工作
3,对于初学者比较容易。
为什么要使用YAGARTO呢,主要是因为Windiws下基于MinGW的工具链的GDB在Eclipse下不能很好的工作,因此YAGARTOD诞生了。详细可参考网页http://www.yagarto.de/index.html。
YAGARTO由3部分组成:
1,JTAG调试接口
2,Binutils,Newlib,GCC 编译器,和GDB调试器
3,跑二进制的Eclipse平台和Eclipse CDT.
 
官方网站讲得非常详细了,我基本上是按照上面的步骤一步一步的来的,过程还算顺利,不过也碰到了些小问题,列举出来。
 
1,在用java安装Eclipse C/C++ Development Tooling - CDT的7.0.0版本时,出现了一个launch.remote_2.0.2.0.201006141710的包找不到的情况。
解决方法,采用了2种措施(我也不知道是哪种起效果了,呵呵):
实际上里面肯定是包含了这个包的,
(1)在菜单help-->check for updates,等它检查完之后,就可以用了,不知道为什么。
(2)add the following line after "-vmargs" to your eclipse.ini:
     -XX:MaxPermSize=256m
 
2,makefile文件好像只在当前工作目录下有效,放在子目录是无效的。怎么改这个makefile文件的目录,我还没有去研究。
 
3,在用GDB仿真时,需要先把J-link GDB Server打开
 
4,用j-link进行GDB调试的时候,比较麻烦的就是gdb初始化文件了,这里有一个通用的。
#
# J-LINK GDB SERVER initialization
#
# This connects to a GDB Server listening
# for commands on localhost at tcp port 2331
target remote localhost:2331
# Set JTAG speed to 30 kHz
monitor speed 30
# Set GDBServer to big endian
monitor endian big
# Reset the chip to get to a known state.
monitor reset
#
# CPU core initialization (to be done by user)
#
# Set the processor mode
monitor reg cpsr = 0xd3
# Set auto JTAG speed
monitor speed auto
# Setup GDB FOR FASTER DOWNLOADS
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
# Load the program executable called "image.elf"
# load image.elf
基本上按照上面来,就不会有问题,当然大端还是小端还是要根据使用的芯片改下的。
 
5,在进行GDB Hardware Debugging设置时,在Main界面最下面有一个选项是用来选择launcher的,在我安装的软件有2个选项,如下
Standard GDB Hardware Debugging Launcher
GDB(DSF) Hardware Debugging Launcher
我选择的是Standard GDB Hardware Debugging Launcher。然后就可以仿真了。
 

作者: zhanghonghu84   发布时间: 2010-09-19