Pandora Compiling For Pandora


Oscaruzzo

Member
Joined
Sep 26, 2005
Messages
227
Age
49
Location
Italy
Website
Visit site
I'm starting to wonder what's the best way to compile (and package) an app for Pandora.

Since OP hasn't currently released any "organic" SDK, what sort of setup is being used for the apps that are already on the appstore? Did everyone build their own cross compiler? Are they running gcc on the Pandora? Is there some compiler ready for the pandora? What about the libraries?

Thanks
 
Also see my random blog entry on setting up a prebuilt gcc cross-compiler on x86 linux (or in a x86 VM):

http://www.rjmitchell.ca/~jeff/blog2009/2010/06/02/getting-up-and-going-with-a-crosscompiler-for-pandora-arm-in-5-minutes/

Theres really your main two options -- build on pandora (woo!), or build in a cross compiler. Neither is that difficult to set up for command line jockies :)

jeff
 
The pulling lib's off the firmware, and then finding some matching headers in a Linux .iso are 'interesting' stages for installing a SDK!

I am quite surprised there still isn't anything a lot simpler available, e.g. a zip file that contains the exes, headers and libs, ready to rock'n'roll on Windows and Linux. Then the instructions could be:

1. Extract archive to a folder of your choosing
2. Set environment variable PANDORA_SDK_ROOT to the directory you extracted to above
3. Bring up a shell to %PANDORA_SDK_ROOT%\samples\helloworld and type make

Isn't something along the lines of the above a pretty common way to handle this sort of thing?

Steve
 
skeezix said:
Great, when can you get on it? ;)

jeff

I was thinking that the only way this is going to get done is if I do it myself so yes point taken.

Do you have a working windows setup? If so could you upload the headers/libraries/exes somewhere and link me up with it, I'll zip it up, add a helloworld example, and then upload it and link to it on this thread!

Steve
 
Last edited by a moderator:
compiling onboard = quickest way to get started and actually do something, and is in fact the best way to go from code -> run on real hardware .. by the time a cross compile has done its deeds and a bin is loaded across the network, a compiler on board has already gone edit/build/run/play/run/edit/play/play ..

headers onboard is also a great bonus as is full base os access if you want to build shims and protection. an external sdk can interfere with real world testing and i always test on end user environments, first of all, so ymmv ..
 
And if you're scared of installing stuff on the NAND, there's a pre-packaged dev PND I've done kicking about that uses some AUFS hacks to work, or you could go the whole hog and AUFS 99% of the file system off to SD, or even boot from a file system on SD geared up for dev purposes :)

This is probably one of the best things about the Pandora just now, so many choices to do what you want, and all of them are right!

I admit that cross-compiling can be more convenient if your porting to multiple machines and your environment is setup specifically for this, but for single platform stuff, sticking a compiler on the Pandora via one means or another is probably one of the better ways to go, as then you can code on the move if the mood takes you.

If you're still needing a set of includes and libs for the Pandora, gimme a shout as I still have the extracted ipk files kicking about from the very quick dev PND I did. You should probably get away with using the CodeSourcery toolchain with them for your cross-compiler needs.

[edit]
Actually, here you go: http://www.stuckiegamez.co.uk/apps/pandora/devpnd.tar.gz .. it's a 32mb archive ( amusingly a hellova lot smaller than the PND.. yay for uncompressed ISOs ;) ) and contains all the extracted ipk gubbins in there from a fresh Pandora.
Most of it's probably not going to be hugely useful, but you'll want /usr/include and /usr/lib at least, I'd imagine :)
[/edit]
 
Something to bear in mind (and correct me if I'm wrong) is that when torpor says to 'compile on the Pandora', he doesn't mean to type the source code out on the Pandora itself. As geek-chic as that would be, I'm led to believe (I'm not a C coder) that it would be a little more awkward that a full-on codemonkey would prefer it to be. :)

And now I'm off to reread torpor's link to see how wrong my recollection was.

This was the bit I was thinking of:
torpor said:
Also, I should explain that you don't *need* to use the Pandora to edit code, just to build it - so you could mount your Pandora home drive on your main PC and edit files with your proper editor, USB keyboard/mouse and 26" screen, then just execute a make command on the Pandora to build and test the project .. its even possible to set up vim so that you can just execute make in the PC vim environment, call out (over ssh) the Pandora build script, and get error messages and navigation on your host vim in return .. this is very slick actually and if it weren't for the speed of compiles, you wouldn't even know your Pandora is involved. Well, that can be solved with a bit of overclocking in the Makefile too, I suppose .. haven't tried that yet, but as I go on I'll try to refine things and produce a Makefile that does all these tricks for you, so you don't have to figure it out.
 
Last edited by a moderator:
Rockthesmurf said:
The pulling lib's off the firmware, and then finding some matching headers in a Linux .iso are 'interesting' stages for installing a SDK!

I am quite surprised there still isn't anything a lot simpler available, e.g. a zip file that contains the exes, headers and libs, ready to rock'n'roll on Windows and Linux. Then the instructions could be:

1. Extract archive to a folder of your choosing
2. Set environment variable PANDORA_SDK_ROOT to the directory you extracted to above
3. Bring up a shell to %PANDORA_SDK_ROOT%\samples\helloworld and type make

Isn't something along the lines of the above a pretty common way to handle this sort of thing?

Steve

Yeah, I can only agree! I'm surprised that there hasn't been anything like this put together yet, it should be top priority to get a stable, easy-to-get-started-dev package released so that developers can start DEVELOPING instead of having to days mucking about with installing a virtual Linux machine, setting up cross-compiler-chains, trying to figure out which libs are needed etc. etc.
Somehow it seems that just because we are developers, we must LOVE sitting in Linux and editing config files and figuring out which header file version is the correct to get OpenGL running and which strange libs we need to install to be able to compile, scratch our heads because libasdfxyz version 2.00a isn't compatible with libasdfxyz version 2.01a etc. etc.
I hate that stuff, I want to write my C code, type 'make' and have a working executable.
 
Last edited by a moderator:
Torpor, your idea is nice, but it requires a Pandora. A nice "classical" chroot environment would be useful.
 
Hopefully someone can create and release and ready to roll VM all setup for cross compiling.

Incidentally, would using LLVM and associated compiler (which now claims to support NEON) provide any speed benefit over GCC? Is is the step to portable bytecode likely to drop performance?

EDIT: Prob not, no. compiling via LLVM bytecode going to add overhead, so unlikely to be worth it.
 
Back
Top