centos7安装arm-none-eabi-gcc

1 下载arm-none-eabi-gcc软件包

1.1 arm-none-eabi-gcc下载链接

1.1.1 最新软件下载链接

https://developer.arm.com/downloads/-/gnu-rm

The GNU Arm Embedded Toolchain is a ready-to-use, open-source suite of tools for C, C++ and assembly programming. The GNU Arm Embedded Toolchain targets the 32-bit Arm Cortex-A, Arm Cortex-M, and Arm Cortex-R processor families. The GNU Arm Embedded Toolchain includes the GNU Compiler (GCC) and is available free of charge directly from Arm for embedded software development on Windows, Linux, and Mac OS X operating systems.

Follow the links on this page to download the right version for your development environment.

可以根据自己的环境去下载对应的arm-none-eabi-gcc软件。对于我的环境来说是x86_64的,所以下载了第三个软件包。
在这里插入图片描述

1.1.2 老版本的下载链接

https://launchpad.net/gcc-arm-embedded/+download
在这里插入图片描述

2 安装软件包

2.1 解压软件包

tar -jxf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2

2.2 修改软件包的名称

mv gcc-arm-none-eabi-10.3-2021.10-x86_64-linux arm-none-eabi

2.3 将arm-none-eabi拷贝到/usr/local目录

sudo cp -fr arm-none-eabi /usr/local

2.4 打开/etc/profile配置环境变量

打开/etc/profile文件,在该文件的最后输入下面这一行,然后source

export PATH=$PATH:/usr/local/arm-none-eabi/bin

2.5 source /etc/profile

source /etc/profile使环境变量生效。

source /etc/profile

2.6 查看arm-none-eabi-gcc版本

$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$

3 错误情况处理

3.1 未识别的处理器

arm-none-eabi-gcc.exe: error: unrecognized argument in option '-mcpu=cortex-r52'

3.2 解决方法

如果出现3.1所示的错误,说明当前的arm-none-eabi-gcc软件没有支持所要编译的处理器,需要更新到支持该处理器的软件版本或者直接更新到最新的版本去编译代码。

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值