Glomation
 
Advanced Search
Welcome, Guest. Please login or register.

Login with username, password and session length
February 05, 2012, 07:28:26 AM
News: Welcome to GLomation peer support forum
Pages: [1]
Topic Tools  
Read August 27, 2010, 09:58:10 AM #0
energy_engr

Compiled programs not running

I compiled a simple hello world program using the code sourcery toolchain..
Code:
$ arm-none-linux-gnueabi-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/julian/2010q1-release-linux-lite/src/gcc-4.4-2010q1/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs --with-arch=armv5te --with-gnu-as --with-gnu-ld --with-specs='%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --disable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2010q1-202' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/julian/2010q1-release-linux-lite/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/julian/2010q1-release-linux-lite/obj/host-libs-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/julian/2010q1-release-linux-lite/obj/host-libs-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-ppl=/scratch/julian/2010q1-release-linux-lite/obj/host-libs-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/julian/2010q1-release-linux-lite/obj/host-libs-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/julian/2010q1-release-linux-lite/install/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/julian/2010q1-release-linux-lite/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202)

and tried to execute the program on the board
Code:
Processor       : ARM926EJ-S rev 5 (v5l)
BogoMIPS        : 197.83
Features        : swp half fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 5
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format C
Cache format    : Harvard
I size          : 32768
I assoc         : 4
I line length   : 32
I sets          : 256
D size          : 32768
D assoc         : 4
D line length   : 32
D sets          : 256

Hardware        : Atmel AT91SAM9G20-EK
Revision        : 0000
Serial          : 0000000000000000
and
Code:
# uname -a
Linux GESBC 2.6.27.4 #4 Sat Jun 27 16:17:54 EDT 2009 armv5tejl GNU/Linux

I get an error:
Code:
# ./hello
-sh: ./hello: not found

The same program works fine on the OS booted from USB (Debian armel).

What am I missing here?
 
Read August 27, 2010, 01:53:16 PM #1
admin

Re: Compiled programs not running

The factory installed software is ABI so you should compile your application as ABI not EABI.
 
Read September 06, 2010, 07:38:35 AM #2
tharold

Re: Compiled programs not running

"Not found" error could mean a dynamic lib was not found.  Run ldd on the executable to check, or compile it statically.
 
Read September 06, 2010, 11:23:56 AM #3
admin

Re: Compiled programs not running

Debian Armel is EABI so the program runs fine.  The factory installed file system is ABI.  The program must be compiled as ABI to run on the factory installed file system.
 
Pages: [1]
Jump to:  

Theme Update by Runic Warrior Originally created by m3talc0re