How to install cross-compiler (on ubuntu 12.04 LTS) for microprocessor SA1100?

Can someone tell me how to install a cross-compiler (C programming language) for the SA1100 microprocessor? I have ubuntu 12.04 LTS. I am a complete noob for Linux, I just installed Ubuntu yesterday. I need a special version of the GCC compiler called arm-unknown-linux-gnu-gcc, but I don’t know how to do it.

Can anyone help me out?

+8
gcc compiler-construction linux arm ubuntu
source share
2 answers

As I said in the comments, try

apt-get install gcc-arm-linux-gnueabi 

or

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

I also highly recommend compiling a regular C program for your Linux system (for example, learn the basics of gcc , make ... and how to use some kind of editor like emacs or gedit ...) and the cross-compiler you want also depends on the system running on your SA1100 hardware panel. Remember to pass -Wall to any GCC compilation. You probably want to debug your program (pass -g to GCC at compilation and use the gdb debugger). When your program works well, compile it with -O2 to ask GCC to optimize its native code.

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

You can get a list of files installed with the package, for example. dpkg -L gcc-arm-linux-gnueabi

The compiled ARM executable program probably needs a Linux kernel with some libc (or bind it statically) at least on the ARM motherboard, and you need to somehow transfer the binary program from the Linux desktop to the ARM hardware.

+22
source share

Add ppa: https://launchpad.net/gcc-arm-embedded The source codes are the same for both. Currently supports Ubuntu 10.04 / 12.04 / 13.04 / 13.10 / 14.04 32 and 64 bits.

Detailed explanations of Launchpad PPA can be found at https://help.launchpad.net/Packaging/ . This website explains how to configure PPA and how to add existing PPAs and install software from it.

The following are quick steps to install the toolchain from this PPA on Ubuntu before 14.04. Open a terminal and enter:

  • sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
  • sudo apt-get update
  • sudo apt-get install gcc-arm-none-eabi

To remove an installed binding, simply do:

sudo apt-get remove gcc-arm-none-eabi

To update the tool chain, simply repeat steps 2 and 3.

+5
source share

All Articles