一、安装ARM-Linux-GCC工具链

  只需要一句命令:

  sudo apt-get install gcc-arm-linux-gnueabi

  前提是你的Ubuntu系统版本是官网支持的最新的版本,若不是,请升级。执行以上命令即可。

二、使用工具链

  注意!这里不能使用 gcc 命令来召唤它。它的名字是 arm-linux-gnueabi-gcc 。如果出现 Command Not Found,请关闭Terminal,再重新打开。再不行,就变成超级用户,把它添加到 PATH 中。

  Tips:查看安装位置。

     首先你要取得超级用户权限(临时取得权限可用命令:sudo -i)

root@ql-virtual-machine:~# locate arm-linux-gnueabi-gcc
/usr/bin/arm-linux-gnueabi-gcc
/usr/bin/arm-linux-gnueabi-gcc-4.6
/usr/share/man/man1/arm-linux-gnueabi-gcc-4.6.1.gz
/usr/share/man/man1/arm-linux-gnueabi-gcc.1.gz

参考资料:

其一,来自Stackoverflow,关于在Ubuntu或者Window安装ARM工具链的回答。

For ARM-Linux application development the preferable choice is a Linux Host(x86) machine with a ARM toolchain installed in it. In Ubuntu Desktop machine you can use the following command to install ARM toolchain:

翻译:对于ARM-Linux应用开发,最好的选择是安装了ARM工具链的x86 Linux主机。在Ubuntu桌面电脑中,你可以使用下面的命令安装ARM工具链。

apt-get install gcc-arm-linux-gnueabi

After toolchain installation you can use the following command for cross compilation:

翻译:安装完工具链后,你要用下面的命令进行交叉编译:

gcc-arm-linux-gnueabi-gcc -o hello hello.c

Using this toolchain you can cross-compile your C program using Standard C library without the need of startup code. Applications can be cross-compiled at your Host Linux(x86) platform and run on Target Linux(ARM) platform.

Windows version of ARM-Linux Toolchain is also available. You can get it from here.

Linaro Developers Wiki - an open organization focused on improving Linux on ARM, will be a good reference for your work.

翻译:使用这个工具链,你可以用C标准库来交叉编译你的C程序,而无需startup code?你的程序可以在你的x86的Linux主机上交叉编译然后直接运行在Linux(ARM)平台上。 ARM-Linux工具链的windows版本也是可用的,你可以从这里获取。 Linaro Developers Wiki - 一个致力于改进ARM平台Linux的开发组织,这对于你的工作将会是个很好的参考。

源链接:http://stackoverflow.com/questions/14564978/compiling-a-linux-program-for-arm-architecture-running-on-a-host-os

其二,来自 askUbuntu,关于在Ubuntu上如何安装ARM工具链的回答。

.....However, if you're looking for an ARM cross-compiler, there is one pre-packaged in Ubuntu, which may be easier to get running. It's in the gcc-arm-linux-gnueabi package - to install it:

翻译:但是,如果你正在寻找一个 ARM 平台的交叉编译器,在Ubuntu中倒是有一个打包好的,它或许比较容易运行。它在 gcc-arm-linux-gnueabi 包中,你可以这样安装它:
sudo apt-get install gcc-arm-linux-gnueabi

源链接:http://askubuntu.com/questions/65630/installing-gnu-arm-toolchain

其三,来自stackoverflow。关于如何使用及添加到PATH方法。

CodeSourcery convention is to use prefix arm-none-linux-gnueabi- for all executables, not gcc-arm-linux-gnueabi that you mention. So, standard name for CodeSourcery gcc would be arm-none-linux-gnueabi-gcc.

After you have installed CodeSourcery G++, you need to add CodeSourcery directory into your PATH.

Typically, I prefer to install CodeSourcery into directory like /opt/arm-2010q1 or something like that. If you don't know where you have installed it, you can find it using locate arm-none-linux-gnueabi-gcc, however you may need to force to update your locate db using sudo updatedb before locatewill work properly.

After you have identified where your CodeSourcery is installed, add it your PATH by editing ~/.bashrclike this:

PATH=/opt/arm-2010q1/bin:$PATH

Also, it is customary and very convenient to define

CROSS_COMPILE=arm-none-linux-gnueabi-

in your .bashrc, because with CROSS_COMPILE defined, most tools will automatically use proper compiler for ARM compilation without you doing anything.

源链接:http://stackoverflow.com/questions/14180185/gcc-arm-linux-gnueabi-command-not-found

————————————进展——————————————

安装交叉编译器。另注:经实测,此编译链不适合mini2440。只有官方光盘里的arm-liinux-gcc4.3编译出的程序才能在mini2440上运行。

此编译器编译后的helloworld在mini2440上总是出现unexpected } 错误。

转载于:https://www.cnblogs.com/muyun/p/3370996.html

Ubuntu安装ARM架构GCC工具链(ubuntu install ARM toolchain)最简单办法相关推荐

  1. linux使用交叉工具链产生的程序怎么下载到mini2440里,Ubuntu安装ARM架构GCC工具链(ubuntu install ARM toolchain)最简单办法...

    一.安装ARM-Linux-GCC工具链 只需要一句命令: sudo apt-get install gcc-arm-linux-gnueabi 前提是你的Ubuntu系统版本是官网支持的最新的版本, ...

  2. ubuntu下 gcc工具链的安装

    安装前的准备工作 ubuntu14.04中,一般将自定义的软件安装在/usr/local/目录下: arm s5pv210的工具链为arm_linux_2009q3.版本号为 工具链压缩包见下列网址: ...

  3. Ubuntu安装Go及开发工具Goland

    Ubuntu安装Go及开发工具Goland 一.安装Go 1.直接在终端执行: sudo apt-get install golang 2.配置环境变量:  配置/etc/profile , 在该文件 ...

  4. Ubuntu 安装 Linux Deepin 截图工具(.deb)

    深度截图工具,Deepin Scrot,是 Linux Deepin 下特色应用之一.您可以将它看作是 GNOME 截图工具的增强版本,但增强的不是一般般哟- 演示视频: (播放时可选择原画品质,这样 ...

  5. ubuntu 安装 LiveSuit 刷机工具

    ubuntu 安装 LiveSuit 刷机工具 wiki: http://linux-sunxi.org/LiveSuit 源码获取: git clone https://github.com/lin ...

  6. linux学习之ARM的三大工具链

    前言 学习linux的过程中,看到过多很多程序并且编译过,使用过很多嵌入式集成开发平台,如IAR,Keil MDK-ARM,DS-5等.有时候会遇到很奇怪的现象:对于同一种功能的代码,不同的平台下程序 ...

  7. HC32L110(三) HC32L110的GCC工具链和VSCode开发环境

    目录 HC32L110(一) HC32L110芯片介绍和Win10下的烧录 HC32L110(二) HC32L110在Ubuntu下的烧录 HC32L110(三) HC32L110的GCC工具链和VS ...

  8. C 语言编程 — GCC 工具链

    目录 文章目录 目录 文章目录 GCC 工具链 GCC 编译器 GCC 的常用指令选项 GCC 所遵循的部分约定规则 Binutils C 运行时库 Clang 和 LLVM 文章目录 <C 语 ...

  9. gcc工具链查看默认编译选项

    命令: echo "" | gcc -v -x c++ -E - 如在Ubuntu系统下输出结果为: rambo@ubuntu:/tmp$ echo "" | ...

  10. Ubuntu安装配置串口通讯工具minicomcutecom

    2017-04-07更新 发现新的工具gtkterm全名叫serial port terminal minicom minicom是linux下串口通信的软件,它的使用完全依靠键盘的操作,虽然没有&q ...

最新文章

  1. centos搭建ftp环境
  2. blender, 创建多边形面片
  3. 【Leetcode】那些年四数之和下的评论
  4. python入门:Anaconda和Jupyter notebook的安装与使用
  5. Tell me why -- Declan Galbraith
  6. IT部门如何应对VDI问题
  7. HTTP中GET与POST的区别,99 %的人都理解错了
  8. php可以运行js代码吗,php可以运行js代码吗?
  9. Java微信公众号开发
  10. win10系统禁用音频服务器,win10未安装音频设备怎么办|win10声音找不到音频设备解决方法...
  11. php正则判断是否为图片格式,JS 获取文件后缀,判断文件类型(比如是否为图片格式)...
  12. wuauclt.exe进程和wuauclt病毒的查杀清理方法
  13. 记事本中写c/c++程序在Windows下运行
  14. 魅族手机安装Google Play
  15. marvelous designer 10安装使用教程(附快捷键)
  16. 加密算法与大数据安全
  17. VTL(Velocity Templates Language,即Velocity模板语言)初识语法总结
  18. ltspice语言中文_ltspice-一简介(中文教程).pdf
  19. 如何真机调试微信h5页面
  20. 记录盈透IBKR IBAPI Quant过程

热门文章

  1. 从零基础入门Tensorflow2.0 ----七、34 embedding rnn
  2. android实现Materia Design风格APP(六):结束,实现APP
  3. 计算机专业必懂知识,学习计算机知识必须懂得50个专业术语
  4. 查找算法---------斐波那契查找
  5. 倒计时 5 天!Apache Flink Meetup · 北京站,1.13 新版本 x 互娱实践分享的开发者盛筵!...
  6. Apache Flink 进阶(六):Flink 作业执行深度解析
  7. VSCode 上竟然也能约会,谈对象了???
  8. 插件开发之360 DroidPlugin源码分析(四)Activity预注册占坑
  9. Java基础--Java---IO流------GUI(布局)、Frame、事件监听机制、窗体事件、Action事件、鼠标事件、对话框Dialog、键盘事件、菜单
  10. js 不相等 多次随机数_node.js静态\动态服务器