How to compile a C program for beagle board?

How to compile a C program for beagle board in Windows or Linux?
Is there a step by step tutorial on this? I tried CodeSourery G++ IDE
30-day eval but when I compiled and ran in beagle I got some errors.
Maybe it's the IDE project settings... (Cortex A8, little-endian, ARM
simulator, host...)

Thanks,

Hi Kevin,

At the beginning I ran into the same problems... it was unclear to me
how to get a program to cross compile and run successfully on the
Angstrom distribution. I followed the instructions on this site:

http://www.pixhawk.ethz.ch/wiki/tutorials/omap/dsp_toolchain#ubuntu_linux_host

Note that GPP, "general purpose processor", is the ARM core, i.e. what
you need. Those instructions if followed closely will build a cross-
compiler for your C code, situated in something like .../cross/armv7a/
bin .

You have to have a complete Open Embedded installation from
http://elinux.org/BeagleBoardAndOpenEmbeddedGit to build your own
cross compiler and it seems you can't cross compile on Windows.

Hope this helps

I have made several small apps for console with just code sourcery
I hope you find it useful

Here is how:

Setting up Sourcery G++:

1. Install Ubuntu 8.04 (this is the Linux distribution used for development)

2. Create folder CodeSourcery in $HOME:

mkdir $HOME/CodeSourcery

3. Extract all files to folder CodeSourcery:

bizp2 -d arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

tar -xf arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar

Note: The extracted folder should be: $HOME/CodeSourcery/arm-2007q3

4. Add to path the directory $HOME/CodeSourcery/arm-2007q3/bin

PATH=$PATH:$HOME/CodeSourcery/arm-2007q3/bin

5. To verify the correct installation use the following:

arm-none-linux-gnueabi-gcc

Note:

The result should be: arm-none-linux-gnueabi-gcc: no input files

Verify Path if you obtain a different result

Hello world for Beagle Board:

Note: This requires Sourcery G++

1. Have ready hello.c (hello world) and compile it:

arm-none-linux-gnueabi-gcc -o hello hello.c

2. Copy hello to the SD card

On the Beagle Board

3. Execute on the Beagle Board:

./hello

hello.c( hello world)

Kevin,

If you want to develop on Windows there are some suggestions at the
BeagleBoard FAQ http://elinux.org/BeagleBoardFAQ#Windows.2FCygwin_.232.
No step-by-step tutorial, alas.

John

How to compile a C program for beagle board in Windows or Linux?
Is there a step by step tutorial on this? I tried CodeSourery G++ IDE
30-day eval but when I compiled and ran in beagle I got some errors.
Maybe it's the IDE project settings... (Cortex A8, little-endian, ARM
simulator, host...)

If it is a simple program (and you are using Angstrom), try installing
task-native-sdk. I use this to build small programs on the Beagle
itself.

Philip