I program in C# and Java right now but I will be moving to C or C++ to
program the beagleboard because it seems easier but I can't seem to
find a tutorial describing how to compile and run the simplest code.
Here's what I have
Angstrom - Console no gui running on the beagleboard
I want to start simple so lets say I want to compile a "hello world"
program on my pc and then load it to the beagleboard. I know that a
cross compiler is needed to compile it for the ARM architecture but I
found NO tutorials or explanations just people posting links to
websites with very vague (if any) instructions.
I just downloaded the C6000 Code Generation Tools but have absolutely
no idea on how to use it.
Could someone please give me a nice explanation on how I would go
about writing the hello world program, compiling it for the
beagleboard, and then actually running it on the beagleboard!
--
You received this message because you are subscribed to the Google Groups "Beagle Board" group.
To post to this group, send email to beagl...@googlegroups.com.
To unsubscribe from this group, send email to beagleboard...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/beagleboard?hl=en.
I own a Beagleboard Rev C that is running Basic Karmic (9.10)
Beagleboard xfce4 version. In my case, to compile a simple hello world
program I ran this on my terminal (in Beagleboard) to install gcc
libraries and everything "sudo apt-get install build-essential" after
this I was able to build and compile a hello world program.
Create a file (in terminal):
1. sudo vi hello.cpp
2. type:
#include <iostream>
int main()
{
std::cout << "Hello, Beagleboard" << std::endl;
return 0;
}
3. Compile with : g++ hello.cpp -o hello
4. Run it with: ./hello
That's it, I am not sure if this is relevant to you question but I
hope it helps.
Thank you,
Abraham
[…]
> Could someone please give me a nice explanation on how I would go
> about writing the hello world program, compiling it for the
> beagleboard, and then actually running it on the beagleboard!
As Abraham suggested, you can compile it directly on the BeagleBoard, or
you can do cross compile your program. In contrast to SV I would suggest
to follow [1] and for bigger projects use OpenEmbedded and create a
recipe for your program.
Thanks,
Paul
I am starting to understand it now, in a little bit I will try to get
the hello world program running.
Am Sonntag, den 24.01.2010, 18:24 -0600 schrieb SV:
> I am curious to know if code-sourcery toolchain has any problems
> that are serious enough to cause issues for bigger projects? I thought
> it is fairly standard.
Sorry, I did not want to apply that there are any issues. I just got
into BeagleBoard and the cross compiling world and am pretty satisfied
with OpenEmbedded and did not look yet into code sourcery’s tools.
I think though that it was mentioned on this list that when using a
distribution based on OpenEmbedded like Ångström, it might be easier
using OpenEmbedded framework.
Thanks and sorry for the confusion,
Paul
> Hi Paul,
> I am curious to know if code-sourcery toolchain has any problems that are serious enough to cause issues for bigger projects? I thought it is fairly standard.
Your toolchain needs to match the one used to compile the distro you are using. If it doesn't match you're opening yourself to a world of pain.
And no, angstrom isn't currently using the CSL toolchain.
regards,
Koen
Could someone please give me a nice explanation on how I would go
about writing the hello world program, compiling it for the
beagleboard, and then actually running it on the beagleboard!
>
> Could someone please give me a nice explanation on how I would go
> about writing the hello world program, compiling it for the
> beagleboard, and then actually running it on the beagleboard!
>
>
> 1. On host m/c , i have arm cross compiler installed .
>
> 2. Following is the params what i used to compile my helloworld.c
>
> arm-none-linux-gnueabi-gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -static -o $2 $1
You do know -Os is horribly broken on virtually all gcc based compilers that support cortex-a8?
You do know -Os is horribly broken on virtually all gcc based compilers that support cortex-a8?
> arm-none-linux-gnueabi-gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -static -o $2 $1