闲话少说,直接进入主题:
安装包:Arm-2009q1.bz2:大于60M不可上传,需要的话私信我:[email protected]
1.在/opt/CodeSourcery目录下解压
$ cd /opt/CodeSourcery
$ sudo tar -xjvf Arm-2009q1.bz2
2. 测试交叉编译器
(本部分参考:http://www.techbulo.com/1236.html点击打开链接)
交叉编译器所在目录:/opt/CodeSourcery/arm-2009q1/bin
$/opt/CodeSourcery/arm-2009q1/bin/arm-none-linux-gnueabi-gcc -o test test.c
出现:没有opt/CodeSourcery/arm-2009q1/bin/arm-none-linux-gnueabi-gcc 这个文件和目录,可是明明可以在该目录下找到编译器。主要原因是,所安装的buntu14..04是amd64.iso,这要求预先安装lsb-core,即:
$ sudo apt-get install lsb-core //安装时提示有没有验证的内容,直接忽略
$ /opt/CodeSourcery/arm-2009q1/bin/arm-none-linux-gnueabi-gcc -v //测试一下,若出现版本信息则成功
$/opt/CodeSourcery/arm-2009q1/bin/arm-none-linux-g