Tuesday, July 26, 2011

How to cross compile in linux for mini2440

The below command need to be executed to cross compile the source file (it is assumed that the cross compiler is loaded and environment variables are set)


arm-linux-gcc -o objfile sourcefile.c -lpthread -lrt

4 comments:

  1. Below is the command to be executed if you want to set the environment variable temporarily.


    export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/home/ubuntu/EasyARM/work/crosstool/mini2440/usr/local/arm/4.3.2/bin

    ReplyDelete
  2. echo "export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/home/ubuntu/EasyARM/work/crosstool/mini2440/usr/local/arm/4.3.2/bin" >> .bashrc

    ReplyDelete