Hi,
I recently picked up one of these boards since it was running uClinux, thought it might be nice to learn while working in a somewhat familiar environment.
I am no Linux guru, but I do use Linux.
Anyway, my problem is that I installed the CodeSourcery toolchain on my Fedora 10 box and followed the “getting started” html doc in the Sourcer_G++_Lite_for_ARM_uClinux directory.
As per the guide I created main.c file with a tiny program to print out some factorials.
I compiled per the instructions and was rewarded with a binary file ‘factorial’ and a ‘factorial.gdb’ file.
I placed the files in my web root folder of the web server running on my fedora box and used wget to download them to the L9260.
Once on the mcu I attempt to execute the binary file via “./factorial” and received the message “cannot execute binary file”.
I chmod to 777 to make sure there was no permission problems and keep getting the same result.
I also attempted to execute the .gdb file and get a segmentation fault.
All commands were done as root.
I also tried compiling with GCC and G++, getting the same results no matter what I do.
I am pretty bummed I can’t even get the simplest program to execute and can find no clues what to do next, I simply have not idea what I am doing wrong.
If anyone has a clue you could throw my way, or give me a nudge in the right direction I would really appreciate it.
Thank you.
EDIT:
Here is the example factorial program:
#include <stdio.h>
int factorial(int n) {
if (n == 0)
return 1;
return n * factorial (n - 1);
}
int main () {
int i;
int n;
for (i = 0; i < 10; ++i) {
n = factorial (i);
printf ("factorial(%d) = %d\n", i, n);
}
return 0;
}