ARM学习笔记三

来源:互联网 发布:客户管理系统源码 编辑:程序博客网 时间:2024/06/06 02:53

配置交叉编译器arm-linux-系列工具
文件下载:http://download.csdn.net/download/fouse_/9938852
- 下载后解压当前文件

tar zxvf arm-linux-gcc-4.4.3.tar.gz

为将编译工具建立全局路径
解压后进入4.4.3/bin目录

cd ./4.4.3/bin//显示当前目录pwd//复制当前路径//编译.bashrcsudo vim ~/.bashrc//在文件最后插入先前复制的路径(不同电脑的路径不相同)export PATH=$PATH:/home/username/4.4.3/bin//保存退出
  • 验证配置是否成功
arm-linux-gcc -v//成功显示如下Using built-in specs.Target: arm-none-linux-gnueabiConfigured with: /opt/FriendlyARM/mini2440/build-toolschain/working/src/gcc-4.4.3/configure --build=i386-build_redhat-linux-gnu --host=i386-build_redhat-linux-gnu --target=arm-none-linux-gnueabi --prefix=/opt/FriendlyARM/toolschain/4.4.3 --with-sysroot=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi//sys-root --enable-languages=c,c++ --disable-multilib --with-arch=armv4t --with-cpu=arm920t --with-tune=arm920t --with-float=soft --with-pkgversion=ctng-1.6.1 --disable-sjlj-exceptions --enable-__cxa_atexit --with-gmp=/opt/FriendlyARM/toolschain/4.4.3 --with-mpfr=/opt/FriendlyARM/toolschain/4.4.3 --with-ppl=/opt/FriendlyARM/toolschain/4.4.3 --with-cloog=/opt/FriendlyARM/toolschain/4.4.3 --with-mpc=/opt/FriendlyARM/toolschain/4.4.3 --with-local-prefix=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi//sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspaceThread model: posixgcc version 4.4.3 (ctng-1.6.1) 

有的配置完成后验证出错是因为没有安装依赖库

sudo apt-get install lib32z1

安装完成就能正常使用了