Im trying to develop programs to a target machine wth the following /proc/cpuinfo:
Processor : XScale-IXP4xx/IXC11xx rev 1 (v5b)
BogoMIPS : 266.24
Features : swp half thumb fastmult edsp
Hardware : iDirect Phoenix Platform
Revision : 0000
Serial : 0000000000000000
and uname -a:
Linux iDirect 2.4.24-uc0-iDirect0 #1 Fri Apr 29 16:01:03 GMT 2005 armv5b unknown
as it is Bigendian machine i use
/usr/local/arm-uclinux-tools2/arm-uclinux-elf/bin/atic -mbig-endian
to compile
the hello world is working fine.
i tired to compile a simple program
#include <stdio.h>
int main() {
printf("Hi: %d\n",0);
return 0;
}
the program had compiled well, but when i run the program on the target machine alot of rabush is showed out.
running the following program on the target shows "Segmentation fault" error
#include <stdio.h>
int main() {
char txt[]="Hi from Ahmad!\n";
sprintf(txt,"Hi: %d",0);
printf(txt);
return 0;
}
What is wrong and how to overcome this problem??!!
please help me!!