Skip to content
Advertisement

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

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.

Can someone please help me?

Advertisement

Answer

As I told in comments, try

apt-get install gcc-arm-linux-gnueabi 

or

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

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.

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)

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

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.

Advertisement