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
arm-linux-gcc -o objfile sourcefile.c -lpthread -lrt
How to set the environment variables?
ReplyDeleteBelow is the command to be executed if you want to set the environment variable temporarily.
ReplyDeleteexport 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
How to set it permanently?
ReplyDeleteecho "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