LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-15-2009, 05:31 PM   #1
j.p.s
LQ Newbie
 
Registered: Jul 2009
Location: Portland Oregon
Distribution: Debian, Ubuntu
Posts: 3

Rep: Reputation: 0
Troubles running and compiling helloworld.c on AT91SAM9260 EVAL


Can anyone that has successfully compiled and ran a helloworld.c for the mentioned target provide the correct compile options or anyone having some insight of suggestions on this.

I used several variations but settled on the following without errors but it did not run.
Quote:
“./arm-toolchain/bin/arm-elf-gcc -mthumb -mcpu=arm926ej-s -mfpu=fpa -g -o hello-arm test.c”
After putting onto the target I got:
Quote:
GESBC:/home# ./hello-arm

Illegal instruction

GESBC:/home#
My tool chain, that I built returns the following configuration:
Quote:
john@DEB1:~$ ./arm-toolchain/bin/arm-elf-gcc -v

Using built-in specs.

Target: arm-elf

Configured with: ../gcc-4.3.3/configure --target=arm-elf --prefix=/tmp/arm-toolchain --enable-interwork --enable-multilib --enable-languages=c,c++ --with-newlib --disable-shared --with-gnu-as --with-gnu-ld

Thread model: single

gcc version 4.3.3 (GCC)
Here are some other sundry info:
Quote:
john@DEB1:~$ uname -a

Linux DEB1 2.6.26-2-686 #1 SMP Sun Jun 21 04:57:38 UTC 2009 i686 GNU/Linux.

Last edited by j.p.s; 07-21-2009 at 02:19 PM. Reason: expanded potential reply
 
Old 07-18-2009, 08:12 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Moved: This thread is more suitable in <Programming> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 07-29-2009, 02:39 PM   #3
j.p.s
LQ Newbie
 
Registered: Jul 2009
Location: Portland Oregon
Distribution: Debian, Ubuntu
Posts: 3

Original Poster
Rep: Reputation: 0
dynamic vs Static Linking

Ok so here is an update. My target uses a debian file system and it has gcc. I can compile and run hello world. Checking the file type us
I get the following:
a.out: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), for GNU/Linux 2.4.1, not st
ripped
Showing that it is dynamically linked. I used numerous scripts that creates a cross compiler on my desktop but after compiling all results are static and will not run on my target.

I have reviewed, read and tried various compile switches but no good results. In fact my impression is that it should be by default producing a dynamic linked file.

So now my question is does anyone have any suggestions or advice?

Additionally, there are several books that may help a gnu novice like myself. Would anyone care to recommend one? I am considering:
a) The Definitive Guide to GCC.
b) Using the Gnu Compiler Collection
c) any other that may be helpful
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install TVS MSP 250 Champion printer on AT91SAM9260 board? siva4ever Linux - Hardware 4 06-29-2009 05:21 AM
How to set up TVS printer on AT91SAM9260 board? siva4ever Linux - Newbie 1 06-19-2009 12:05 PM
Getting started with Java, compiling HelloWorld.java baldurpet Programming 5 02-28-2009 05:51 PM
Compiling "HelloWorld.java" on Slackware 10.2 halfpower Programming 2 09-07-2006 09:54 AM
compiling HelloWorld with QT fakie_flip Programming 1 01-18-2006 01:12 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration