LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   segmentation fault in arm edb9315a for helloworld.c application (https://www.linuxquestions.org/questions/linux-software-2/segmentation-fault-in-arm-edb9315a-for-helloworld-c-application-859426/)

boopathisivakumar 01-29-2011 10:50 AM

segmentation fault in arm edb9315a for helloworld.c application
 
i had added a hello world program object file in /tmp directory and cross compiled successfully but after porting completed a segmentation fault appeared while running that application!!!!!!!!!!!
am using arm9 edb9315 cirrus logic board....
give Ur ideas to run the application successfully..

this is my sample program
#include<stdio.h>
void main()
{
printf("hello world\n");
}
pls give the solution to run this program from the board................

rahulkya 01-30-2011 08:31 PM

try removing void then run the program...why r u running in /tmp ????

boopathisivakumar 02-03-2011 03:49 AM

thank u rahulkya..
but i created new ramdisk with my application using build.sh script from cirruslogic 2.0.2(build version)..it was successfully ported..

maplvig 03-09-2011 09:10 AM

Quote:

Originally Posted by boopathisivakumar (Post 4246859)
thank u rahulkya..
but i created new ramdisk with my application using build.sh script from cirruslogic 2.0.2(build version)..it was successfully ported..

Could you maybe elaborate a bit on how you made it work. I have the exact same problem on an other arm-linux board: simple hello world program cross compiles fine with "arm-softfloat-linux-gnu-gcc", but produces segmentation fault when run on target.

I was not able to find the build.sh script for your cirrus logic board.

thanks

*EDIT* I just solved the problem. Really simple and stupid. I used FileZilla to transfer the files and for som reason it transfers in ascii mode by default.


All times are GMT -5. The time now is 06:54 AM.