ubuntu下arm-none-eabi-gcc安装

4 篇文章 0 订阅

一、下载安装包

下载地址:https://launchpad.net/gcc-arm-embedded/+download
选择linux版本下载:

gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2

其它版本下载地址:https://developer.arm.com/downloads/-/gnu-rm

二、安装步骤

2.1、在ubuntu下解压安装包

tar -jxvf gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2

2.2、在/usr/local目录下新建文件夹arm,将解压后的文件夹拷贝过来

cp -r /home/ubuntu/Desktop/gcc-arm-none-eabi-5_4-2016q3 /usr/local/arm/

2.3、修改系统环境变量

vim /etc/profile

在最后一行添加下面内容:

export PATH=$PATH:/usr/local/arm/gcc-arm-none-eabi-5_4-2016q3/bin

2.4、安装依赖库

sudo apt-get install lsb-core
sudo apt-get install lib32ncurses5 
sudo apt-get install lib32tinfo5 
sudo apt-get install libc6-i386

注意,如果不安装依赖库libc6-i386,直接使用arm-none-eabi-gcc会提示如下错误:

/usr/local/arm/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc: No such file or directory

2.5、查看版本号

arm-none-eabi-gcc -v

安装成功后打印如下内容:

oot@ubuntu:/usr/local/arm/gcc-arm-none-eabi-5_4-2016q3/bin# arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/local/arm/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/lto-wrapper
Target: arm-none-eabi
Configured with: /home/build/work/GCC-5-build/src/gcc/configure --target=arm-none-eabi --prefix=/home/build/work/GCC-5-build/install-native --libexecdir=/home/build/work/GCC-5-build/install-native/lib --infodir=/home/build/work/GCC-5-build/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/home/build/work/GCC-5-build/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-5-build/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-5-build/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build/work/GCC-5-build/install-native/arm-none-eabi --build=i686-linux-gnu --host=i686-linux-gnu --with-gmp=/home/build/work/GCC-5-build/build-native/host-libs/usr --with-mpfr=/home/build/work/GCC-5-build/build-native/host-libs/usr --with-mpc=/home/build/work/GCC-5-build/build-native/host-libs/usr --with-isl=/home/build/work/GCC-5-build/build-native/host-libs/usr --with-cloog=/home/build/work/GCC-5-build/build-native/host-libs/usr --with-libelf=/home/build/work/GCC-5-build/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r,armv8-m.base,armv8-m.main
Thread model: single
gcc version 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496] (GNU Tools for ARM Embedded Processors) 
  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值