Getting Up And Running Developing For The Pandora


Glom

Still Fresh
Joined
Jul 23, 2010
Messages
6
Hello.

I've been tracking the progress of the pandora project for sometime now and the system is appealing to me, more and more.
Since I've never programmed for a Linux platform and it's about 10 years since I actively used Linux on a computer, it's safe to say I'm a bit rusty and that a lot of lore on the subject has gone missing.

I am therefore seeking guidance, as to what I should read up on, to start programming for the pandora. Are there any books the community would recommend for reading. anything on Linux, embedded OS or whatever? Is any book in the genre 'programming for Linux' worth looking into? My personal goal would be understanding the system in its entirety.


Kind regards,
Glom
 
Glomyar said:
Hello.

I've been tracking the progress of the pandora project for sometime now and the system is appealing to me, more and more.
Since I've never programmed for a Linux platform and it's about 10 years since I actively used Linux on a computer, it's safe to say I'm a bit rusty and that a lot of lore on the subject has gone missing.

I am therefore seeking guidance, as to what I should read up on, to start programming for the pandora. Are there any books the community would recommend for reading. anything on Linux, embedded OS or whatever? Is any book in the genre 'programming for Linux' worth looking into? My personal goal would be understanding the system in its entirety.


Kind regards,
Glom

To be honest theres not anything really linux specific you need to know to code. Most devs and projects use SDL since its cross platform and hides all the specific bits. You can develop programs on a normal x86 machine and it will just work will a cross-compile for other devices.
If you didnt use SDL then you would run into linux specifics like oss, alsa, fbdev, etc.

Probably the best way to start learning is to just start using linux. Maybe join a distribution community.
 
Last edited by a moderator:
Depends entirely on your existing programming experience and what you want to do.
Most of the basic stuff is the same no matter what platform you program for. The difference only shows up in the libraries you use. There are Windows only libraries, there are Linux only libraries, and there are cross platform libraries that work on anything.
There's nothing really special about programming for Linux over programming for Windows, especially if you're already familiar with the cross platform libraries like SDL and GTK.
 
Thank you for your reply.

Already you've given me som scraps of information.

alsa is for sound I see, think I'll stay out of this.
oss seem also to be about sound, although a bit simpler?

fbdev seems to be an abstraction layer acting as a common interface for drivers for the graphics hw. seems like it simplifyes the whole process down to a call for image bliting(keeping in mind that you've got a driver and its configured).

edit:

I guess the smart thing to do, would be using the cross platform libs at first, then dig deeper afterwards.

Would reading books such as these be useful Embedded Linux Primer, Building Embedded Linux Systems. Or are these books more for creating embedded linux distros such as Ångstrøm?
Linux Device Drivers might also be useful.
 
You do not want to start out with device drivers or embedded programming; the Pandora is a capable computer running a full operating system. ALSA, OSS, fbdev etc are all low-level drivers, which we try to abstract away using things like SDL or Qt. To get you a better answer, an idea of just what you want to write may help. Are you already familiar with some programming languages? Are you looking to use 3D graphics or networking? Sometimes joining an existing project is a good option too.

For understanding the system as such, architectural books may be more help than those about kernel pieces. I'm not sure exactly which to suggest.
 
Yes I'm already familiar with some programming languages. I don't focus on languages, but on programming concepts.
As for what exactly I'm trying to do.. I'm not sure yet, there isn't anything specific atm. Haven't acquired a pandora yet. But I'm sure something will present itself once I do.

I guess I just want to learn what I can about the system atm. :)
 
Glomyar said:
Yes I'm already familiar with some programming languages. I don't focus on languages, but on programming concepts.
As for what exactly I'm trying to do.. I'm not sure yet, there isn't anything specific atm. Haven't acquired a pandora yet. But I'm sure something will present itself once I do.

I guess I just want to learn what I can about the system atm. :)

well keep in mind the pandora is basically a umpc with an 800x480 resolution. With that in mind I think you can start with doing something on the desktop/laptop.
Why not learn SDL, i recommend the Lazy Foo tutorials. http://lazyfoo.net/SDL_tutorials/
Learning SDL give you a tool that works on every major OS.
 
Last edited by a moderator:
Ok. looked into SDL. seems quite simple, nothing unexpected. Seems to handle alot of what's needed for game developement.

If let's say i wanted to take an IR receiver or something, creating the right support circuits and wanted to use them with the pandora. I probably would use a GPIO port. Would I need to alter the kernel source or is this possible to do outside of it(doing some assembly perhaps)? keeping in mind that I probably would need to do some interrupt handling? as in detecting when we got a new incoming IR signal(port got HIGH/LOW)..and then reading the port value at certain points in time.

As a sidenote, I've been skimming through what documentation I can find on the pandora, but I can't seem to find any info on the pandoras timer resolution? As I don't have a pandora at hand I can't find out myself.
 
For an IR receiver, you probably want to take a look at the LIRC project. The question is how to connect the GPIO driver to a LIRC driver; I'm not sure what interface is available for the gpio, but many lirc drivers already use hooks into other drivers.
 
All the GPIO lines should be accessible as files somewhere in the /sys/ directory. Literally, to output to a GPIO line, you just open the right file and write "1" to it. Same thing to read from it, just open it and read the first character: 1 or 0.
 
WizardStan said:
All the GPIO lines should be accessible as files somewhere in the /sys/ directory. Literally, to output to a GPIO line, you just open the right file and write "1" to it. Same thing to read from it, just open it and read the first character: 1 or 0.

Since this is for an IR receiver, the problem becomes setting an interrupt for the GPIO line or else I recon you would have to continously have to poll the line, which isn't very efficient. I've been digging around the pandora depository and the documentation for the OMAP IC looking into the GPIO lines. Does the keyboard use GPIO lines or are they using an I2C bus? not sure atm. And is the touchscreen using a GPIO line?

Anyways, I've been looking for some documentation on what hardware might be connected to GPIO lines and I'm not entirely sure which edition of the OMAP chip is used... 34xx??
 
Last edited by a moderator:
Glomyar said:
Since this is for an IR receiver, the problem becomes setting an interrupt for the GPIO line or else I recon you would have to continously have to poll the line, which isn't very efficient.
Depending on what you actually want to do with it, you could also wire it (almost) directly to the serial port. That may be easier.
 
Last edited by a moderator:
Back
Top