Page 1 of 1

Problem building simple "Hello World" application

Posted: Wed Feb 23, 2005 1:41 pm
by mp_york
Having just started using an AT91RM9200-DK, I have successfully installed the Linux kernel and ramdisk and connected via both serial and ethernet.

I am now trying, without success, to build a simple "Hello World" application, to download and run on the development board.

I am a Linux novice, using Cygwin on Win2K, with the GNUARM tool chain. I have looked at many forums and tried many different compilation options, which give me various errors running the executable, such as:

Segmentation fault

kmod: failed to exec /sbin/modprobe -s -k binfmt-464c, errno = 2
kmod: failed to exec /sbin/modprobe -s -k binfmt-464c, errno = 2
bash: ./hello: cannot execute binary file

Any suggestions for a good set of compilation options for arm-elf-gcc, or is it not so straight forward? The program happily builds and runs on the PC, using the Cygwin gcc.


Posted: Fri Feb 25, 2005 1:07 pm
by mp_york
Answer myself:

Don't use Cygwin.

We insalled SuSE Linux and used the tool chain supplied on the ATMEL CD, then compiled with the command:

arm-linux-gcc -o hello hello.c

Downloaded the app to the development board using FTP and it worked first time.