一、安装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..gz

/usr/share/man/man1/arm-linux-gnueabi-gcc..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的开发组织,这对于你的工作将会是个很好的参考。

其二,来自 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 包中,你可以这样安装它:

其三,来自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.

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

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

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

【转】Ubuntu安装ARM架构GCC工具链(ubuntu install ARM toolchain)最简单办法

原文网址:http://www.cnblogs.com/muyun/p/3370996.html 一.安装ARM-Linux-GCC工具链 只需要一句命令: sudo apt-get install ...

ubuntu 安装 Sqlite 和 可视化工具 SqliteBroswer

ubuntu 安装 Sqlite 和 可视化工具 SqliteBroswer   下载sqlite www.sqlite.org/download.html 安装Sqlite 创建一个目录:     ...

Linux下获取arm的交叉编译工具链

转载请注明文章:Linux下获取arm的交叉编译工具链 出处:多客博图 这里介绍,Linux下获取arm的交叉编译工具链,比如arm-linux-gnueabihf-gcc.arm-linux-gne ...

更换gcc工具链

title: 更换gcc工具链 date: 2019/1/16 19:27:51 toc: true --- 更换gcc工具链 下载后解压到一个临时目录先看看文件结构 mkdir tmp tar xj ...

Ubuntu安装配置串口通讯工具minicom&&cutecom

原帖地址:https://blog.csdn.net/gatieme/article/details/45310493 2017-04-07更新 发现新的工具gtkterm全名叫serial port ...

ubuntu安装redis 和可视化工具

方式一: 下载地址:http://redis.io/download,下载最新文档版本. 本教程使用的最新文档版本为 2.8.17,下载并安装: $ wget http://download.redi ...

gcc工具链简述

工具链软件包括BINUTILS.GCC.GLIBC.GDB等. BINUTILS是二进制程序处理工具,包括链接器.汇编器等目标程序处理的工具. GCC(GNU Compiler Collection) ...

推荐一篇讲arm架构gcc内联汇编的文章

这是来自ethernut网站的一篇文章,原文链接: http://www.ethernut.de/en/documents/arm-inline-asm.html 另外,据说nut/os是个不错的开源 ...

为DS5添加新的gcc工具链

环境: 步骤: 1.下载mingw32版本的工具链 下面有两个下载工具链的网站: ARM官网的: https://developer.arm.com/tools-and-software/open-s ...

随机推荐

Git 相关总结

Git 优秀在线教程 廖雪峰-史上最浅显易懂的Git教程!

ORACLE导入导出数据dmp

imp testwms3/isc@TESTGMMC FILE=C:\ZKGL_201407012334.dmp ignore=y fromuser=GMMCZKGL touser=testwms ta ...

使用 CSS3 & jQuery 制作漂亮的书签动画

今天的教程是关于创建使用 CSS 旋转变换和 JavaScript 制作动画书签效果.我们的想法是展现出样书状结构,使单一的色板或列表点击切换.当点击其中一项,我们就会旋转以显示所选择的项目. 在线演 ...

ML的灌水现象

(http://demonstrate.ycool.com/post.3137870.html) 看了几天 paper 和书,发现自己果然就是 zt好多东西就是不懂,那些人做的真快,我才建立起一种大致 ...

Flex文件读取报错

Flex文件读取 1.s:WindowedApplication <?xml version="1.0" encoding="utf-8"?> &l ...

main函数的参数

一.main的参数 形式:int main(int argc,char *argv[]) 参数argc.argv可以被看做是main函数的形参,argc是整型变量,代表的是参数的个数:argv是指向字 ...

Poj 2478-Farey Sequence 欧拉函数&comma;素数&comma;线性筛

Farey Sequence Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 14291   Accepted: 5647 D ...

C&num;深复制与浅复制

C#深复制与浅复制 C#中对于数据的复制机制虽然简单但是容易让人误解.C#数据类型大体分为值类型(value type)与引用类型(reference type).对于值类型数据,复制的时候直接将数据 ...

持续更新scrapy的错误,ValueError&colon; Missing scheme in request url&colon;

只需要将 for href in response.xpath('XX').extract(): yield Request(hrefs) 修改为下面,就可以显示出来 for href in resp ...

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

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

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

  2. ubuntu 安装 LiveSuit 刷机工具

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

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

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

  4. 初次使用Ubuntu18.04遇到的问题——笔记1(删除软件+Ubuntu换源+Ubuntu安装好用截图工具+Ubuntu安装wps+win+Linux双系统的电脑Linux挂载硬盘时无法写入问题)

    目录 碎碎念: 先删除没有用的软件以及游戏啥的 Ubuntu18.04换源 Ubuntu18.04方便好用的截图工具 如何安装wps win+Linux双系统的电脑上,Linux挂载硬盘时无法写入的问 ...

  5. Linux Ubuntu 安装SSH远程登录工具

    检查 用以下指令测试是否有装 ssh sudo ps -e |grep ssh 如果没有装,请输入以下指令: sudo apt-get update sudo apt-get install open ...

  6. Linux工具篇 | Ubuntu安装Python包管理工具pip3

    一.执行以下命令安装pip3 $ sudo apt install python3-pip 二.升级pip3 $ pip3 install --upgrade pip 注意:不升级 pip3 直接安装 ...

  7. Conmi的正确答案——linux/ubuntu安装web运维工具(Cockpit)

    系统版本:Ubuntu server 20.04 # 想安装K8S,但fedora缺少一些指令,所以想改回Ubuntu,Ubuntu却没有fedora的web操作界面, # 后来找了一圈才找到这个:C ...

  8. 在哪个分区安装linux,partitioning - 如何找出Ubuntu安装在哪个分区上? - Ubuntu问答...

    问题描述 # fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylin ...

  9. Ubuntu安装vscode软件编辑工具

    VSCode是VisualStudioCode(简称VSCode)是由微软研发的一款免费.开源的跨平台代码编辑器,目前是前端(网页)开发使用最多的一款软件开发工具. 本节将介绍在ubuntu上安装vs ...

最新文章

  1. linux smart服务,RAKsmart Linux美国服务器常用信息命令
  2. 【python 学习】知识点日记
  3. 5.2.2 OS之I/O设备假脱机技术(SPOOLing)
  4. OBS显示器捕获黑屏的解决方法
  5. C mysql批量写入_使用JDBC在MySQL数据库中快速批量插入数据
  6. linux检查系统硬件信息命令,Linux查看系统信息(硬件信息, 系统设置信息等) 命令 | Soo Smart!...
  7. Yep for Mac:专为Mac用户所设计的文档管理工具
  8. 美团多渠道打包方案详解,速度快到白驹过隙 1
  9. json字符串和字典的区别
  10. dp算法求解矩阵连乘的问题
  11. Java-图片处理 Gif转Jpg
  12. Three.js图像波动特效
  13. 超级好用的 excel 导入导出框架:excel-import-export
  14. Zbrush 4R7 P3中给类模型怎么快速隐藏
  15. ISO三体系,招投标企业认证最多的资质
  16. 企业如何借助工具分析用户画像
  17. 隐马尔科夫模型(HMM)模型训练:Baum-Welch算法
  18. Office2016、visio2016安装的注意事项
  19. 流行 - 十大网络流行语揭晓:第一“做人要厚道”(转)
  20. AUTOMATE THE BORING STUFF WITH PYTHON读书笔记 - 第8章:INPUT VALIDATION

热门文章

  1. android java.lang.IllegalArgumentException: The observer is null.异常解决
  2. 使用Fastjson解析List对象时出现:{“$ref“:“$.data[0].task.OBJECTS[0]“}的问题原因及解决方法
  3. WebSocket部署服务器外网无法连接解决方案
  4. 容器退出时我丢失了数据
  5. 您最喜欢的C#扩展方法是什么? (codeplex.com/extensionoverflow)
  6. 阿里云云服务器硬盘分区及挂载
  7. 检查mysql当前状态
  8. C++异常实现与longjmp, setjmp,栈指针EBP, Active Record
  9. linux下模拟CPU占用100%小程序
  10. MapGuide应用开发系列(四)---- 如何运行第一个.net实例代码