PDA

View Full Version : BeagleBoard



noeska
25-09-2009, 07:56 PM
Today i got the opengles2 demos working on my beagleboard. And i am a bit impressed 8).

What is the beagleboard. It is a small 3 by 3 inch mainboard. Runs on linux. Has an arm cpu, and an 3d accelerator that is opengles 2.0 compatible. More info can be found on http://www.beagleboard.org

Next is install freepascal on it and test my opengles unit and demo application on real hardware ... :)

paul_nicholls
26-09-2009, 01:53 AM
The BeagleBoard seems excellent, especially the Pico projector to go with it :)

cheers,
Paul

noeska
18-10-2009, 09:27 PM
Got the freepascal crosscompiler (win32-armlinux) to output working binaries today :)

Here is the shopping list:
CodeSourcery G++ Lite (2009q1-203) : http://www.codesourcery.com/sgpp/lite/arm/portal/release858
FreePascal 2.2.4 : http://www.freepascal.org/download.var
(Tortoise) SVN to get the latest FPC sources : http://tortoisesvn.net/
Latest SVN source (revision 13908)

The recipie:
Install G++ Lite
Install FPC 2.2.4 into D:\FPC\2.2.4
Make an arm-linux subdir under the fpc bin directory and copy the following files from the g++ bin to it (also rename arm-none-linux-gnueabi-* to arm-linux-* )
ar, as, ld, objdump and strip.
Place the latest FPC sourcen in the FPC main dir. (something like d:\fpc\2.2.4)
Make a compilearm.bat file with the following content:


make distclean
make crossall install CPU_TARGET=arm OS_TARGET=linux OPT="-Aas -dFPC_ARMEL -O- -gl" CROSSPORT="-Aas -CpARMV7M -CfVFP -O-" CROSSBINDIR="D:\FPC\2.2.4\bin\arm-linux" BINUTILSPREFIX=arm-linux- INSTALL_PREFIX=D:\FPC\2.2.4
pause

Execute that bat file. After a (long) time it is complaining about a ppcarm file that cannot be copied.

From the compiler directory we need to copy the ppc.exe and ppcrossarm.exe to the i386-win32 folder for fpc. Be sure to rename ppc.exe to pccarm.exe.

next we need co copy the arm-linux form the rtl\units folder to the fpc units folder.

From that moment on you can compile with the following bat file:


ppcrossarm -TLINUX hello.pp
pause


That should be all ...

paul_nicholls
18-10-2009, 09:41 PM
Nice :)

cheers,
Paul

JSoftware
19-10-2009, 06:24 AM
Why do you use no optimizations?

And good to see you got the thumb2 cg working on the beagleboard :) I plan to buy one myself once

noeska
19-10-2009, 07:39 AM
My intial attempts led me to getting illegal instruction instead of hello world. So on searching the freepascal site and beagleboard irc channel i came to settings i used.

According to the people on the beagleboard irc the ARMV7M is not a good setting as thumb on the beagleboard is suposedly not a good thing. The setting worked for so far though. (hello world worked, adding of intergers worked, adding of floats worked and a basic object with properties worked, but i should probeably stress it harder or turn optimisations on again).

I did not change any fpc sources as it was hard enough to set up the crosscompile environment with the right arm gnu binutils and compile settings. But i believe others have made changes.

Do get a board but do not be offended that you have to connect a null modem cable to it to get it working (but the real challenge is getting something to connect the null modem cable to the beagleboard connector :-) ).

JSoftware
19-10-2009, 08:36 AM
Have you tried armv5 instead? I wrote the thumb-2 cg for fpc, mainly for use in thumb-2 only devices(like cortex-m3), so don't be surprised if there are a few missing things still. If you find out anything crashes it, then be sure to tell me(missing opcodes, etc)

noeska
19-10-2009, 03:00 PM
I have not yet tried ARMV5 .

For the moment i puzzled on how to cross compile an application that needs to be linked against X11 (not to mention libgles later on).

noeska
26-10-2009, 06:50 PM
Ok got it working for compiling an application that uses .so files to the bb.

With codesourcery a lib and /usr/lib are suplied (from what i got the bin utils). Copying them (lib and usr/lib) in the root of the drive where fpc is makes it autodetect them.
But in /usr/lib are some .o files that do not agree with fpc so they must be removed.
Next you get the _fini and _init error again. But that can be solved by copying prt0.o over cprt0.o . And next compiling works.

With using dynlibs it is now possible to use sqlite3 dynamicaly e.g. only calling the libsqlite3.so.0 library at runtime so no more copying over lots of libs.

With that working i can now focus on getting an hello world opengles example working ...

PS CrossCompiling and using dynlibs still does not work for compiling to i386-linux on windows xp. Even my fastcgi application that worked before refuses to compile.
What is the 'standard' crosscompile tool for compiling with gcc on windows for linux? Maybe that comes with some distro independend base .so and .a files.

KidPaddle
21-02-2010, 02:37 PM
I got freepascal cross compiler working for IGEPv2 board, a beagle clone with wifi and ethernet. At this time only with SDL framebuffer device, x11 output doesn't working yet, but this is a step forward.

Thanks for your hint, noeska.

Thomas

KidPaddle
23-02-2010, 07:56 AM
Noeska, exists on the Beagle Board a device /dev/sequence? This is needed by the library SDL_mixer, on my Ubuntu Linux for IGEPv2 board does not existing.

Greetings
Thomas

noeska
23-02-2010, 06:05 PM
No, at least not on my beagleboard.
What linux are you using on your board?
Can you provide some more info on your IGEPv2 board?