本文介绍了如何安装交叉编译器(在Ubuntu 12.04 LTS)微处理器SA1100?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能告诉我如何安装交叉编译器(编程语言C)为SA1100微处理器?我有Ubuntu的LTS 12.04。 I'm一个完整的小白到Linux,我昨天刚安装了Ubuntu。我需要一个被命名为GCC编译器的一个特殊的变种臂未知Linux的GNU-GCC但不要知道该怎么做。

Can someone please tell me how to install the cross compiler (programming language C) for the SA1100 microprocessor? I have ubuntu 12.04 LTS. I´m a complete noob to Linux, I just installed Ubuntu yesterday. I need a special variant of the GCC compiler that is named "arm-unknown-linux-gnu-gcc" but don know how to do it.

有人能帮帮我吗?

推荐答案

正如我在评论说,试图

apt-get install gcc-arm-linux-gnueabi

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

我也强烈建议能够编译一个普通的C程序为Linux系统(即学习 GCC 制作 ...命令,以及如何使用像的Emacs编辑器的一些的gedit ...)和你还想交叉编译取决于你的SA1100硬件板上运行的系统。不要忘了通过 -Wall 来的GCC编译。你可能想能够调试程序(通过 -g 来GCC在编译,并使用 GDB 调试)。当你的程序运行良好,与 -O2 编译它要求GCC优化其机器code。

I also strongly recommend being able to compile an ordinary C program for your Linux system (i.e. learn the basics of gcc, make ... commands and how to use some editor like emacs or gedit ...) and the cross compiler you want also depends upon the system running on your SA1100 hardware board. Don't forget to pass -Wall to any GCC compilation. You probably want to be able to debug your program (pass -g to GCC at compilation, and use the gdb debugger). When your program is running well, compile it with -O2 to ask GCC to optimize its machine code.

了解使用GNU 制作 -e.g.写的Makefile -S-通过阅读其并使用 ARM-Linux的gnueabi-GCC 作为交叉编译器程序。 (您可能需要使用重拍来调试你的的Makefile -s在制作没有帮助足够的)

Learn to use GNU make -e.g. to write Makefile-s- by reading its documentation and use the arm-linux-gnueabi-gcc as the cross-compiler program. (You might want to use remake to debug your Makefile-s when make does not help enough)

您可以用例如软件包安装的文件列表的dpkg -L GCC-ARM的Linux的gnueabi

You can get the list of files installed with a package with e.g. dpkg -L gcc-arm-linux-gnueabi

针对ARM的交叉编译的程序的可执行文件很可能需要一个Linux内核与一些的libc 至少(或静态链接吧)ARM主板上,你需要一些方法从Linux桌面到ARM硬件传输二进制程序。

A cross compiled program executable for ARM very probably needs a Linux kernel with some libc (or link it statically) at least on the ARM motherboard, and you need some way to transmit the binary program from the Linux desktop to the ARM hardware.

这篇关于如何安装交叉编译器(在Ubuntu 12.04 LTS)微处理器SA1100?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 19:37