Programming On Pandora


I would really love to see a tutorial on how to get set up with an IDE, like code::blocks or similar, and link all the libraries (if that is how it's done). Then maybe a simple hello world program for the pandora.
 
Richo said:
I would really love to see a tutorial on how to get set up with an IDE, like code::blocks or similar, and link all the libraries (if that is how it's done). Then maybe a simple hello world program for the pandora.

Me too! I have been looking for something like this, but all I found was a few links on how to learn programming sdl. Wouldn't it be cool if you could just download a pre-packaged pandora sdk from let's say developer.openpandora.org?
 
Last edited by a moderator:
bja said:
Richo said:
I would really love to see a tutorial on how to get set up with an IDE, like code::blocks or similar, and link all the libraries (if that is how it's done). Then maybe a simple hello world program for the pandora.

Me too! I have been looking for something like this, but all I found was a few links on how to learn programming sdl. Wouldn't it be cool if you could just download a pre-packaged pandora sdk from let's say developer.openpandora.org?
I'm still not certain that you type people understand what you're asking for. If you do then please explain it to me with as much detail as you can.
There is no Pandora "SDK", there will never be an SDK, there is no need for an SDK. You can use any library you want that compiles to ARM. Any SDK you try to create will either be so huge for all the possible libraries it contains, or it will contain such a small subset as to be useless for anything but the most simplistic programs. Do you include GTK or QT? Irrlicht or Ogre? Or none? Or all?
There isn't a "Desktop SDK". If you can write a program for a PC, you can write a program for the Pandora. The only difference is the compiler, and I have yet to encounter an IDE that didn't allow you to specify the compiler to use. That is the only catch: where do you get an ARM cross compiler? For Linux, it's easy: CodeSorucery is a dedicated cross compiler, and gcc has the ability to cross compile arm, apparently (though I've not tried it). Just replace "GCC=gcc" (etc) in your Makefile with the appropriate command and VOILA! Pandora compatible application. You may need to download the ARM compatible library you want to use, but it's installation will basically be the exact same as the PC version would be.
I don't use Mac or Windows if I can help it, so someone else will have to find a suitable cross compiler for that. But when you do, it's easy to set in pretty much any IDE. In Dev-CPP, Tools->Compiler Options->Programs, and set them there. That's it!
 
Last edited by a moderator:
Richo said:
I would really love to see a tutorial on how to get set up with an IDE, like code::blocks or similar, and link all the libraries (if that is how it's done). Then maybe a simple hello world program for the pandora.
I might write this when I get my Pandora, I'm not all that interested in C++ programming right away but I'll eventually be wanting to write C++ programs...
 
Last edited by a moderator:
WizardStan said:
I don't use Mac or Windows if I can help it, so someone else will have to find a suitable cross compiler for that. But when you do, it's easy to set in pretty much any IDE. In Dev-CPP, Tools->Compiler Options->Programs, and set them there. That's it!

GCC can be built for Windows or Mac, and CodeSourcery provide binaries for Windows at least.
 
Last edited by a moderator:
WizardStan said:
I'm still not certain that you type people understand what you're asking for. If you do then please explain it to me with as much detail as you can.

Certainly. I want a pre-packaged pandora devkit with arm-gcc and a few pre-compiled libraries (at least libSDL with network, audio, and image) and some documentation. It would be super convenient if I could download this package from developer.openpandora.org, unpack it and run make to get a simple example application running.

E.g.

Code:
$> wget http://developer.pandora.org/sdk/pandora-devkit-2010.3.tar.bz2
$> tar xjf pandora-devkit-2010.3.tar.bz2
$> ls -l pandora-devkit-2010.3
drwxr-xr-x  5 bja bja   4096 2010-02-19 21:20 arm-pandora-gcc
drwxr-xr-x  5 bja bja   4096 2010-02-19 21:20 bin
drwxr-xr-x  5 bja bja   4096 2010-02-19 21:20 docs
drwxr-xr-x  5 bja bja   4096 2010-02-19 21:20 examples
drwxr-xr-x  5 bja bja   4096 2010-02-19 21:20 lib
drwxr-xr-x  5 bja bja   4096 2010-02-19 21:20 include
drwxr-xr-x  5 bja bja   4096 2010-02-19 21:20 whatever
-rw-r--r--  1 bja bja   4896 2010-02-16 21:28 README
-rw-r--r--  1 bja bja  34143 2010-02-16 21:28 Makefile
total 7

Test compile and run it on your local machine...

Code:
$> cd pandora-devkit-2010.3/examples/SDL/helloloworld/
$> make target=i686-gnu-linux
$> ./helloloworld

Then compile and deploy it to the pandora...

Code:
$> make target=arm-pandora-linux
$> make pnd?

WizardStan said:
There is no Pandora "SDK", there will never be an SDK, there is no need for an SDK. You can use any library you want that compiles to ARM. Any SDK you try to create will either be so huge for all the possible libraries it contains, or it will contain such a small subset as to be useless for anything but the most simplistic programs. Do you include GTK or QT? Irrlicht or Ogre? Or none? Or all?

I disagree. Even if the devkit only contained a single library, libsdl, it would be useful for a lot of people. And perhaps the devkit could be improved overtime by adding more libraries as separate downloads. I think the purpose of the devkit would be to lower the threshold for new programmers. Hardcore developers will of course have all of this stuff sorted already.

WizardStan said:
There isn't a "Desktop SDK". If you can write a program for a PC, you can write a program for the Pandora. The only difference is the compiler, and I have yet to encounter an IDE that didn't allow you to specify the compiler to use. That is the only catch: where do you get an ARM cross compiler? For Linux, it's easy: CodeSorucery is a dedicated cross compiler, and gcc has the ability to cross compile arm, apparently (though I've not tried it). Just replace "GCC=gcc" (etc) in your Makefile with the appropriate command and VOILA! Pandora compatible application. You may need to download the ARM compatible library you want to use, but it's installation will basically be the exact same as the PC version would be.
I don't use Mac or Windows if I can help it, so someone else will have to find a suitable cross compiler for that. But when you do, it's easy to set in pretty much any IDE. In Dev-CPP, Tools->Compiler Options->Programs, and set them there. That's it!

The point of a devkit is to get started quickly. Sure, I can download the cross compiler (in fact i already have), download the libraries I need, configure and compile them for the pandora, and so on. But I much rather download a devkit, find a sutiable example, and compile and run it.
 
Last edited by a moderator:
I tend to agree with bja. I understand perfectly why Pandora doesn't need an SDK, but I also understand why some people want one. Even if it does just provide what you can get by clicking two or three weblinks, even if it does have a very narrow scope. It could really help newbies get the ball rolling, and I think we'd see a lot more people trying their hand at coding rather than "getting around to it later."

The SDK question has been asked sooo many times over the last two years, often by people outside this site who are seeing Pandora for the first time. Instead of explaining why it doesn't need one every time (which usually involves a number of paragraphs & links), wouldn't it be nice to just say Yes? :)
 
In my opinion, all of this confusion is *exactly* why we should have a compiler onboard, so that we can use the libraries that are already *installed on the Pandora itself* without having to go through any other setup hassle, and we can then easily include examples onboard as well .. just like the AI Touchbook, which requires no further setup in order to build software for it, because the compiler is onboard and can therefore use all the libraries that are shipping on a standard Touchbook OS release.

A separate SDK would be nice, too, but if we can't have that at least having a compiler onboard will get things started .. and the Pandora *does* have a set of standard API's and libraries for people to learn to use - SDL, OpenGL ES, Open AL (I think, not sure on this one yet), and so on .. heck even Posix/libc/ncurses is onboard and you can use that to develop a game if you want to (text adventures and so on).

IF we had a compiler-onboard as default, with no further stress, we can then work directly on the Pandora to build software for it - it would be the first option, and an easy one for new-comers to use to get started - and with this onboard we can then standardize a set of tutorials for how to get an SDL-helloloworld built, or how to do a simple OpenGLES game, and so on .. but as it stands now, *without* a compiler onboard, the requirement to get a separate entire build system working - on Mac, Windows and Linux environments and all the varieties and hassles that entails - simply makes the 'get started now' aspect not feasible. Without a compiler-onboard, the SDK/API/external tools setup is overwhelming and huge - we have to build everything separately, 4 or 5 times over, for each different Host-PC environment that could possibly exist, and this just isn't going to happen smoothly. Compiler-onboard solves all that - you don't need to install anything extra, just save your sources onto the Pandora (mount it over your network so you can use your favourite editor on your PC) and then press a Build button to get the binary working .. easy as pie, and simple to explain to beginner developers who *won't* get through a complicated SDK setup on a Host PC without tearing their hairs out in frustration.

See? This argument keeps coming up. Compiler-onboard, folks. DJWillis & co., please, please take this into consideration. A few extra megabytes for the compiler in the PandoraOS is going to make a *huge* difference to the investment required to get new development happening for Pandora ..
 
I have recently started to learn Python and pygame. Very keen to see how the Pandora performs and what pygame can deliver.

Python is a very easy scripting language to pick up. Useful for more than just games. pygame itself makes manipulating sprites etc very easy.
 
With a C/C++ compiler onboard it also makes *PORTS* a lot easier to get started .. look, its just 100% sensible to do this, and there is no good reason not to do it - the compiler is only a 15 megs extra! Just do it!
 
torpor said:
With a C/C++ compiler onboard it also makes *PORTS* a lot easier to get started .. look, its just 100% sensible to do this, and there is no good reason not to do it - the compiler is only a 15 megs extra! Just do it!
Who's been saying it won't have GCC on board? It is, in fact, only a few hundred K, so even more reason it shouldn't not be included.
 
Last edited by a moderator:
Who's been saying it won't have GCC on board?

The last time we had a thread about whats going to be included in the PandoraOS, there was a lot of resistance to the idea .. if that has now changed, I'm very happy because I will use it a lot.

I guess the only question is whether the onboard gcc will include NEON/other-ARM optimizations or .. VFP .. or all that jazz. I'll wait and see, I guess.

But if there really is going to be a compiler onboard (I'll be happy!) then it should really be easy to produce a set of tutorials for developing Pandora software using the onboard tools and libs available .. this is good news!
 
torpor said:
The last time we had a thread about whats going to be included in the PandoraOS, there was a lot of resistance to the idea .. if that has now changed, I'm very happy because I will use it a lot.
Resistance from the board, perhaps, and that thread was more a "crosscompiling on desktop is easy and faster" rather than "compiling on the Pandora is a bad idea". Technically valid, since the Pandora would be noticeably slow for sufficiently large projects, but I don't think I remember anyone saying "don't compile on the Pandora ever"
 
Last edited by a moderator:
WizardStan said:
torpor said:
The last time we had a thread about whats going to be included in the PandoraOS, there was a lot of resistance to the idea .. if that has now changed, I'm very happy because I will use it a lot.
Resistance from the board, perhaps, and that thread was more a "crosscompiling on desktop is easy and faster" rather than "compiling on the Pandora is a bad idea". Technically valid, since the Pandora would be noticeably slow for sufficiently large projects, but I don't think I remember anyone saying "don't compile on the Pandora ever"

I'm gonna compile some code on my pandora... I'd love to have more time for homebrewing, but I don't have time at home nor at job for this... guess that leaves only the train.... and I quite hate having to take out a laptop out in the train...
 
Last edited by a moderator:
I guess there is some kind of "SDK" for the Pandora if you take libpnd into account? Anyhow, compiling on the pandora should contribute to the wear of your SD cards, eyes and joints. I don't think that you enjoy this - and if you don't enjoy coding you will get nowhere ;-)
 
Wear of the SD Cards? Well, playing a game will also wear down your SD cards. As for eyes and joints - I think the idea would be that you'd ssh to your Pandora to do builds from your desktop, where hopefully you've already got a big screen and nice keyboard and comfy mouse and so on ..
 
torpor said:
Wear of the SD Cards? Well, playing a game will also wear down your SD cards. As for eyes and joints - I think the idea would be that you'd ssh to your Pandora to do builds from your desktop, where hopefully you've already got a big screen and nice keyboard and comfy mouse and so on ..
If you've already got a desktop, why not just setup the cross compiler and build on your desktop?
 
Last edited by a moderator:
WizardStan said:
torpor said:
Wear of the SD Cards? Well, playing a game will also wear down your SD cards. As for eyes and joints - I think the idea would be that you'd ssh to your Pandora to do builds from your desktop, where hopefully you've already got a big screen and nice keyboard and comfy mouse and so on ..
If you've already got a desktop, why not just setup the cross compiler and build on your desktop?

Because he doesn't want to?
 
Last edited by a moderator:
Back
Top