Segmentation fault by running simple Hello World file

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

Moderator: nferre

Jelle
Posts: 2
Joined: Fri Jul 29, 2005 9:55 am

Segmentation fault by running simple Hello World file

Mon Aug 01, 2005 12:26 pm

I have compiled the Hello_world file with GNU tools in windows. I transferred the file to my AT91RM9100-DK board. Then I do #chmod 777 Hello_world so the file is executable and run it with #./Hello_world. Instead of seeing the result I get a segmentation fault as answer. What did I do wrong? It would be nice if someone could help me. I am really stuck with my project now.
Jelle
Posts: 2
Joined: Fri Jul 29, 2005 9:55 am

Found the problem!!!!!!!!!!!

Tue Aug 02, 2005 3:53 pm

I know what went wrong. The compiler for the arm9 that is included on the CD-ROM, has the wrong libraries in its file that causes this fault. By changing them it is possible to compile your .c file on Windows using Cygwin.
For getting the right library in Cygwin you need to unpack the following files by Cygwin:

arm-linux-binutils-cygwin-2[1].9.5.0.37.tgz
arm-linux-gcc-cygwin-2[1].95.3.tgz
libc6-arm-cross-2[2].1.3-19.tgz
libc6-dev-arm-cross-2[1].1.3-19.tgz

Look at this site for the links for the tgz-files: http://www.gp32x.com/board/lofiversion/ ... 12412.html

Now you are ready to compile your file with the following command:

#arm-linux-gcc –o filename filename.c

That’s it!

Greetings,
Jelle

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 4 guests