Olimex CS-E9302 example program won't run

Hello,

Another newbie question I’m afraid. I have an Olimex CS-E9302 board. I’ve installed the arm-linux-gcc compiler/development tools on an Ubuntu Linux box running under Parallels. I’ve compiled the simplest “helloworld” program I can think of - literally printf(“hello world”); and that’s it - and transferred it down to the board.

When I try to run the program all I get is:

-sh: ./helloworld: not found

I tried the usual

chmod +x helloworld

But it’s still the same.

Sorry for the newbie questions. This is all a bit new to me.

Thanks

David

Hello

sample:

chmod 755 helloworld

./helloword

good luck

chris233:
sample:

chmod 755 helloworld

./helloword

good luck

Sorry, just the same. :frowning:

You may get this error for other reasons.

I got it f.ex. some years ago when I tried to run a libc 6 application on a libc 5 system.

The kernel just couldn’t find the dynamic linker /lib/ld-linux.so.2.

Did you maybe mix EABI with non EABI?

GNU libc uses /lib/ld-linux.so.3 for EABI.

Check this witharm-linux-objdump -s -j .interp helloworld on your pc and```
ls -l /lib/ld-linux*

Ahhhh… thanks for the help, denial. I did as you suggested and I get this on my Linux box:

arm-linux-objdump -s -j .interp helloworld

helloworld: file format elf32-littlearm

Contents of section .interp:

80f4 2f6c6962 2f6c642d 6c696e75 782e736f /lib/ld-linux.so

8104 2e3200 .2.

and on my Olimex board:

~ # ls -l /lib/ld-linux*

ls: /lib/ld-linux*: No such file or directory

The Olimex board is running Busybox and a quick Google shows that I need to add the libraries somehow. I think I need to install another version of Linux on the board and see where that goes.

Olimex Support suggested an additional compiler/linker option:

arm-linux-gcc -static -o helloworld helloworld.c

… and that got it working. :slight_smile: :slight_smile: