Problem building simple "Hello World" application

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

mp_york
Posts: 8
Joined: Tue Jan 18, 2005 4:10 pm

Problem building simple "Hello World" application

Wed Feb 23, 2005 1:41 pm

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.

Thanks.
mp_york
Posts: 8
Joined: Tue Jan 18, 2005 4:10 pm

Fri Feb 25, 2005 1:07 pm

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.

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 8 guests