Saturday 6 February 2016

Setting up of Arm linux gcc (cross compiler for arm 9 ) in Fedora and Making Application

Hi, I had come up with many errors when I used ARM926 innovate solution board. My host system is fedora Linux. I wanted to make a simple C Program that has to be run on the ARM9 Board. I was not familiar with tool chain and cross compiler. Then I have done hundreds of google search. Then I found solution for that. So this post might help those who have the same issue.

Basic Requirements:
1. Host System     : A laptop with Fedora Linux or Any other Linux
2. Target System  : ARM926 
3. Tool Chain        : arm-linux-gcc-3.4.1.rar



Step 1 : you need the package arm-linux-gcc-3.4.1.rar , can be downloaded from repos, On your fedora , extract files in arm-linux-gcc-3.4.1.rar , now you will get a file named arm-linux-gcc-3.4.1.tar.bz2

Step 2 : Open terminal and go to the folder where  arm-linux-gcc-3.4.1.tar.bz2 is extracted and type
                           "sudo tar jxvf arm-linux-gcc-3.4.1.tar.bz2 -C /"
this is to install arm tool chain in your fedora.

Step 3 :  then type
                  "export PATH=$PATH:/usr/local/arm/3.4.1/bin/"
This is to set up environment variable in your fedora.
(Note You have to repeat this step whenever you want to compile your c program for arm  )

Step 4: you have to create a c program, in my case hello.c which is saved in Documents folder. Then compile using following command

"arm-linux-gcc -o /home/Sajith/Documents/hello /home/Sajith/Documents/hello.c"
Step 5: Now, you will be successfully made an executable file now in the same folder as in hello.c

Step 6 : copy this executable binary file to your arm 9 board either usb drive or SSH.
(Note: In my case Arm926 board is preloaded with icewm OS, so i used a pen drive to copy executable file and plugged it into the board)

Step 7 : run this file  in arm9 board.
             (Note: in Icewm OS, you have to mount pen drive by start-> Flash drive -> Mount, and then open its terminal then go to \root\mnt\usb , you can view your pen drive files)
 ".\hello "


Thank You,
Feel free to contact me sajithp.mec@gmail.com

No comments:

Post a Comment