EmbDev.net

Forum: ARM programming with GCC/GNU tools compiling hello world program for at91rm9200


von Harry G. (linuxhgs16)


Rate this post
useful
not useful
Hi all,

I am a beginner venturing in to linux world.

I have a AT91RM9200EK board. I used the prebuilt binary which came along
with the board. I somehow managed to port it on to the target, after a
lot of difficult. I believe it has ramdisk supported and I also figured
out ways to transfer files from pc to the target running the linux
kernal.

Now I want to start  with simple hello world program. I used a prebuilt
arm tool chain form gnuarm for windows( arm-gcc-elf). I was able to
compile the code to generate the binary file.

But it threw "segmentation fault". Kindly help me by providing an
example makefile, which will create a working executable for my target.

Thanks in advance,

Harry

von Andreas S. (andreas) (Admin)


Rate this post
useful
not useful
Do you want to run your code under Linux on the target? Then you need an 
arm-linux toolchain. arm-elf is for standalone programs only. If your 
board comes with a Linux kernel, it should also come with a toolchain, 
or at least with some documentation.

von Harry G. (linuxhgs16)


Rate this post
useful
not useful
Hi Andreas,

Thanks for your reply,

I have few other requirement which grew as moved forward.

- To Compile the new linux kernal 2.6 for the arm target AT91RM9200-EK 
Board from atmel.
- Create a ramdisk containing the helloworld program that would execute 
on the above mentioned target.

Kindly direct me to the prebuilt tool chains sources and recent 
references/help for carrying out the above requirments for the board.
Seems the board is not very recent and it is becoming very difficulat to 
find appropriate source that will guide a new bie.
So this seems to be a mixed requirement from the compiler.

I tried to build a cross compiled tool chain by using cross tool 0.43 
But I believe it is not very recent. I was even succesful in building 
the kernal. But the bootloader that was in my board did not support the 
new kernal. It failed to boot saying Machine Id not supported. So I 
downloaded the latest version of Uboot. But failed to find the config 
file for the AT91RM9200-EK board. So finally I am stuck. (Now I realize 
I actually dont have to build the cross compiler tool chain from scratch 
atleast for a beginner).


Being a student, I had spent so much time working on the basic 
requirement on the project. Still stuck up with the environment setup 
phase, after which I have to start working on the real requirement. Not 
much help I can get from people around me, as no body has experience in 
using this board.
Kindly help me in speeding up things.
Too much for beginner!! Kindly help!!

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.