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

Author: Harry Gs (linuxhgs16)
Posted on:

Rate this post
0 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

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,


Author: Andreas Schwarz (andreas) (Admin) Flattr this
Posted on:

Rate this post
0 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.

Author: Harry Gs (linuxhgs16)
Posted on:

Rate this post
0 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!!


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.