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

后端 未结 2 1563
盖世英雄少女心
盖世英雄少女心 2021-02-01 10:58

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 jus

2条回答
  •  余生分开走
    2021-02-01 11:13

    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.

提交回复
热议问题