Preview – GPH Caanoo handheld gaming device

September 2nd, 2010

We’re all gadget nutbars, aren’t we? I’ve been doing mobile development in homebrew, shareware and commercial arenas for 10+ years and can even today build some of my apps for a dozen platforms all in one shot :) Disclosure — yes, I’m one of the guys who spent way too much time on the Pandora… and also the Wiz, the GP2x F100 and F200, the GP32, and you name it, so I think I’m a pretty balanced (pre)reviewer.

Regarding the Caanoo, I’ve been on the fence – it seemed to arrive a little too quick on the heels of the Wiz in my books so I’ve worried there may be some disappointment from the Wiz community; only time will tell if GPH keeps up support for the Wiz (in terms of WiFi and games on their homespun FunGP store) but it is heartening that they have said that “Yes!” they are still behind the Wiz.. but understandably just a bit tired out in launching the new device. Fair enough! Further, with specs rather similar to the Wiz itself, I wasn’t sure if I needed to upgrade or not.

Well, GPH very gratiously sent me a white Caanoo for development (and no, I do not mark something up just because I got a freebie! This is my ‘first impressions’ but rest assurred I will be fair .. buying me out costs a hell of a lot more than a device! GPH if you’re listening – send me a Camaro and we’ll talk!)

Now, my wordy stream of consiousness ‘first impressions’ .. sorry for the length!

Main stuff:

In hand ergonomics and look: Pretty fine, I have to admit; it reminds me of the old GP32 though of course not as bulky or rounded. It feels pretty solid though does have some creek in a few places when you twist it a touch, but nothing to worry about (and quite possibly is a result of the stylus slot.) I liked the Wiz when it came around due to its pocketability and gorgeous screen (compared against the gp2x), but after the device-honeymoon phase I found the small size and tiny d-pads buttons more annoying than beneficial. In the end when I’m commuting I don’t really have down-time (usually driving or with my little one) and so the pocketability isn’t really of value to me. All told, the Caanoo is a much better looking and feeling machine if you can deal with the size. The larger screen and better button placement is all win. To sum — its actually a pretty attractice machine, is solid feeling, and everything seems placed well. It _immediately_ replaced my Wiz. (Disclosure; I got sent a developer Wiz (GPH is _really_ cool in this regard, they’ve been trying very hard to make good with the developer community; this is doubly commendable for reaching out to the English and Spanish homebrew communities.) I also _bought_ a Wiz to show support and get the same specs as everyone else.)

Size: The unit actually fits loosely into a PSP sleeve, so its smaller than the PSP; it should fit into a jeans pocket pretty well, but it is a little large. This is a benefit to me (since I don’t carry gadgets in pocket for the most part), but may be a concern for some; those people can stick with a Wiz. I’d say the size is a win.

Screen: Sure, its no OLED like on the Wiz (what was a goregeous bright little screen we must all admit), but its nice and big and sharp; it doesn’t have the black levels or intensity of the OLED but as a mobile dev I long ago grew accustomed to these sorts of screens and I think most are in a similar boat – but the size and crispness go a long way. (Okay sure, I’m a purist in some regards and collect arcade machines, with their giant 30 year old fuzzy-pixel monitors, so you’d think crispness wouldn’t matter; but in the small mobile space, crispness works really well. The blur in big arcade monitors is great when your pixels are the size of your finger ;) I did notice in some lighting conditions and on-screen colour situations that it was a touch brighter at the bottom than the top, but its barely noticable. Being a TFT (I think?) screen I thought it would actually be a little worse (more like the PDAs of years gone by) but its an excellent screen without too much ’stage bloom’ on one side like most TFTs have. In daylight visibility is not too shabby, which is a traditional weakness of TFT. It is pretty odd that the screen plastic overlaps the display by a little bit, but I suspect this is to cover another traditional TFT oddity — the ‘white band’;
many LCD screens have a bright white single-pixel boarder round the outside – not too annoying really, but odd nonetheless. Either way, the casing covers probably 4 a pixels on each side which is a little much. (Given a large set of the use-cases will be emulation, video and music playing its not a problem — most arcade or home console games focused most activity on the middle of the screen to avoid bezel problems like this, and of course music doesn’t care. Applicatoins may have to compensate however, and your Galaga game will suffer a touch with enemies who deliberately hide in the bezel. So instead of calling it a 320×240 screen you might want to call it a 310×230 and center it :) The screen is a touchscreen and seems as accurate as PDAs of yore as well, unlike the pretty atrocious touchscreen on the F200 and Wiz. I’ve not worked it hard, but it doesn’t seem to have the big dead-regions of those guys. So its a great screen, but it does have some trim.

Joystick: An old rant is that I actually liked the wobbly top heavy GP32 joystick, and really liked the Neo Geo Pocket stick; but its been years since I really used those so I can’t fairly compare. The Caanoo has a joystick and not a d-pad or discus-of-control, and it is clearly superior to the GP2x F100 stick and the really goofy F200-button-pad-thing; the Wiz d-pad was not too mechanically bad, but just too small for my fingers and so just worked out not to be too good. With all of this behind, you can pretty much argue the Caanoo stick is right off the top better than anything GPH has done, and more to point — it turns out to be a fairly accurate controller as well. The material is grippy enough to not have your thumb sliding off and feels good, without sticking too far out. Now, I’ve not looked into the APIs or hardware to know ‘how analog’ it is or if the firmware or apps are mapping to digital ordinals on their own and with what approach etc etc, but with Mame4all (the only app I’ve tried so far as not much is natively available yet) it works out quite well; trying hard-ordinals like Pacman, no problem; trying shmups like Sky Shark / Flying Shark (one of my favourites, and actually the first actual cabinet I bought :) works pretty well though a little diagonally at times; I tried to get a good feel for the stick using Gauntlet (I own two of those cabinets ;) and while a thumb controller can never compare to a real joystick, it works pretty well when trying to line up shots to the creature-spawn points. Now, I suck at playing games, so not being 100% precise is probably a large part my fault (I’m nbever all that precise with dpads either), but this is a good stick, one of the very best mobile controllers I’ve used. (I’ve not really used a NDS enough to say, but I find the PSP d-pad anoying in the first few iterations but pretty good on the PSP-slim (PSP-2000); I’d say this stick is about that good, though a totaly differenyt kind of animal of course.) I’ve not tried the stick in a more purely analog mode, and will have to get to coding before I get a good feel there, but I feel confident in saying — GPH did good here. Controls are a traditional weakness of GPH, and I think they nailed this one pretty well. The stick does have a push-for-button, and its pretty stiff so might be usable; in general I just hate push-me buttons on a stick since I want to whale on the stick and not accidentally press buttons, but this one may be okay (like in an xbox or ps2 controller .. stiff enough you don’t hit it normally, but good in a pinch.) the corresponding d-pad buttons are well placed and well spaced (the opposite of the Wiz), and work well.

Battery: I’ve not measured to see the lifespan, but it seems pretty good; the only point I can make is that it is not designed to be user-removable. I’ve not disssembled yet to know if it in fact _is_ user changable or if its custom and hard to access, but its important to note. I think the PSP did it well where batteries are available on every corner, but most devices have a built-in and unremovable battery, so you can’t fault the Caanoo for it. Still, I prefer otherwise. But its not like the battery will not last as long as you’re using the device (a few years), so not really a concern.

Specs and Utility: It perhaps need to be said, the unit is more or less similar to a Wiz in specs; its sort of a Wiz v 3.0 — larger (a win in my book), with improved interfaces and buttons and the g-sensor and so on, but still more or less a Wiz. Technology is not moving forward too much here, but ergonomics is. This is a game-playing device, really oriented to 8- and 16-bit style of games (witness the emulated games in the FunGP store), and not a general purpose gadget per se. I honestly don’t think it’d make a good book reader due to the low rez of the display (and the built in book reader is really what I’d call a ‘text file reader’ since it doesn’t do any ebook format of note), but as an mp3 player, emu player, etc, it is well designed. Obviously, and especially being Linux based, you can push its limits and go nuts (that _is_ why we’re all here, right?), but I don’t think it’ll really be _fun_ to use as a VNC terminal say. But for your retro gaming and general hacking, it actually seems pretty ideal, what with that screen rez being pretty ideal. I don’t mean to suggest the unit is designed for Linux geeks, it is _very_ accessible for avergae joe.

Boot time: Very fast! I’ll have to check what they did there.. nice :)

Minor stuff:

SD Slot: Good old solid SD slot, and with a port cover (like most ports on the unit, nicely done!); a minor beef is the slot is a little over recessed so hard to push the SD in that list little bit to stick it in place or eject it; not something to concern over.

Power Switch: big and Battlestar Galactica style, I dig it; a big orange switch on the side .. nice and easy to work, no sloppyness. When I saw pics I thought it looked goofy, but in person.. great. On the left side of the unit is a big LED to indicate on or charge state, and and again .. big and BSG style, and awesome. The looks are good.

Headphones: As with most devices, the headphone jack is on the bottom; I wish otherwise, but what can you do? Typical for these kidns of devices.. I don’t know why :)

Shoulders: The ‘trigger’ buttons are mechanically fine, but as with any small handheld, they’ll be positioned in an awkward place; theres nothign a mobile can do about it, so these are pretty good in terms of the mobile space.

Menu and software: its ‘just a menu’, which is to say it works, swooshes nicely and has some animation, but it stays out of the way and gets to the point pretty well, so good enough; I’m not a UI guy (as in, I’m a pretty forgiving guy when it comes to menus and hardware; sometimes I wish I was more picky, but blessedly I’m not!) So the menu seems great. I mostly look at a menu as — its either there, or its bad, so this is good — I don’t notice it, so it did the right job!

Disliked:

The Speakers — this is the achillies heal of the Caanoo. It doesn’t sound too bad, but it does sound a little weird — like sound coming from the next room over down the hall; its obvious the sound is being pointed out the back and sounds a little muffled as a result (especially if your hands accidentally cover the grills, but thats not too much an issue.) A few times I found myself wanting to subconsiously flip the unit over to hear clearer. The sound is crisp in headphones of course, but the speakers facing backwards is just wrong. I appreciate the mechanical realestate challenges, but it has to be said .. the speakers are of good quality, just placed in the wrong spot.

Untested:

I didn’t try the motion sensor or feedback-buzzer.

I didn’t try Wifi since their Wifi-module is not available yet; I must say I find it very distasteful to list the unit as having Wifi (with an asterisk saying an external module is needed) — check the review sites and videos, and you’ll see most of them miss the asterisk and assume the unit actually has Wifi, when _it does not._ Anyway, browsing on the small res screen is not the best thing ever (check your PDAs of yore on 320×320 of 160×160), but it’d be handy for multiplayer gaming or game-ladders, etc. It should be pretty good on the Caanoo as with any Linux device, but its not something they should push in advertising per se. *shrug*

I didn’t try the GPU (or really try to push hard performance. This sort of machine is not designed to be a speed demon, but is instead designed to have the specs good enough and then some for its target of games.)

Final word:

In the end — I thought the Caanoo might have come too soon and not been enough of an upgrade; if you’re tight for cash or pocket space this might still be the case. But I gotta say – given a Caanoo, _I_ would never go back to the Wiz — the larger size is great for me and I really think they’ve got a hit for ergonomics and changes. Its not a giant leap forward, but its definatley the way to go for new buyers or those looking for a change.

Author: skeezix Categories: Day by Day, Gaming, Technology Tags: , , , , ,

Zombies and advertising

August 20th, 2010

A zombie is a rotting body; once all the flesh is gone.. is it a skeleton warrior, or does it expire?
If you cut a zombie in half (or tear off the limbs etc), which parts are ‘alive’?
If they can become skeletons or nearly so, can they go underwater without lungs? Outer space?

Things have been busy, so little Pandora firmware work of late, but I just saw a note that advertising may reach into ebooks. I tell you this now – the day they add adverts to books, is the day I stop buying books. I draw the line there dear friends.

Author: skeezix Categories: Day by Day Tags: , ,

Tempting fate ..

July 31st, 2010
Comments Off

Note to dumbass software companies (I’m looking at you, Blizzard; and maybe Valve, though never had a problem since HL2’s release so many years ago) –

When you release a patch to an application, do _NOT EVER_ disable the application from working ‘until the user gets the patch.’ In the case of a game, sure, if it has a single player component, that has to work. Multiplayer, I could see a case for disabling it if the patch would cause disadvantages. But here I sit, with my new Starcraft 2 game, ready to play the single player component (offline, if it can manage such an incomprehensible thing) … but alas it wants to patch up from 1.0 to 1.0.1 — and the game will not run until I get it. And the patcher is broken, probably due to server clog. Brillant.

Lazyness is a virtue … but stupidity is unforgivable.

This is the same as setting the default action to “yes, please!” when presenting the option “Format your hard drive, destroying all data?”; don’t default to pissing your users off.

Author: skeezix Categories: Day by Day Tags:

Progress

July 28th, 2010
Comments Off

I may have said it before, but I’ll say it again as its bothering me right now.
One of the big problems with DIY (Doing It Yourself) is that you have to.. well, do it all yourself; running your own mailserver is pretty easy, but to this day setting up a CalDAV calendar server is still a right pita, imho; certainly, integrating services is a pain, and more to point .. keeping configuration, and software versions and patches up to date for security is an awful time sink. So the spammers and naughty-doers of the world are really just driving everyone to Google Apps, Yahoo Mail, etc. In addition to wasting everyones time, they’re actively driving people to centralized systems .. the privacy destroying systems. Great.
Likewise my point — one of the problems with MS Windows as an OS is its vast instability, driving people to online apps, or alternative OSes and environments (phones, etc.) By extension .. if your system starts acting weird, you just don’t know if its a virus or not; you can run all the anti-virus applications you like (and your kids will laugh at you for having to have done this, when they grow up..) and you’ll never really know. You could even boot from a clean disk and analyze the suspect disk, but theres just no way to really know. Certainly, this problem afflicts all operating systems, but none so much as Windows.
In this case, I suspect my CMOS battery is shot, so the system can’t keep the time; boot up Windows, and sometimes the date is 2058. Whats great is it can’t run Windows Update or do an Internet based Date Sync (ntpdate etc).. they fail, which sure makes me think virus; but if I set the date back manually, things work again. Leave it to MS to build a time-sync system that only works when the date is actually right (!).
Anyway, so here I have a problem.. is the battery kaput, or is the system virused?
Answer: is this the last straw that finally makes me just shoot this OS? I live in unix and linux most of the time anyway, but I do like having Windows around for gaming, and am stuck with it for itunes to sync to my phone. (Most of which could be done in a VM, to keep Windows contained.)
So here again.. the bad guys are driving us, changing us. Meh.

Aside: If you go to McDonalds (yech!) to get a happy meal.. for boys, they’ll give super hero toys; for girls, little bobble-headed kitten things. bleh :)

Author: skeezix Categories: Day by Day Tags:

Kids and being new to TV

June 23rd, 2010
Comments Off

“Is there people dressed up in costumes in the TV”, my brilliant little one asked me. I briefly considered saying “Yes”, but opted for responsible instead (just this once); didn’t want her to get freaked out about little people trapped in there or anything :)

Later she asked my wife “can I go into the TV?”; again, my wife thought about saying ‘yes’, then realized .. our kid _would find a way in_, so best not to encourage that :)

Author: skeezix Categories: Day by Day Tags: , ,

Mobiles – how to kill your touchscreen

June 7th, 2010
Comments Off

Posting this to my favourite forum over at gp32x:

Word to the wise –

I don’t know how the TS (touchscreen) on the Pandora display is made/etc/so/on, but for PDAs I’ve done an infinite amount of development over the last 15 years. The way you wreck the TS on a PDA touchscreen is this — _removing_ a screen protector. Putting them on is an art (keep a credit card handy for pushing out bubbles if its a soft film kind), but the trick is removing them — especially if its been on for awhile. (Most protectors suggest removal and cleaning every month or two, because they want you to buy more; but in practice unless you hammer the hell out of them, you can leave them on for months or years. But when you take them off, the things are pretty suckered on there — if you pull them at a 90 degree peel, then you’re essentially pulling directly up on the TS and separating it from the underlieing screen. And what that means is you’re creating a very good opportunity to cause displacement in where the touch is registering, relative to where you’re actually touching it.

And guess what — when you’re applying your screenprot and you get it not quite right, you’ll want to peal it off and retry right?

Be gentle — last thing you want to do with your screenprot is bugger up your TS day one :)

Author: skeezix Categories: Technology Tags: , ,

Pandora: Running firmware from SD card instead of NAND (flash)

June 7th, 2010

I don’t have time right now for a full and proper right up, but hopefully these tips will get you going or experimenting.

Aside; I think DJWillis has a script that will pull the firmware out of NAND and deposit it on an SD card ready to go (more or less), so that will probably come to light soon. For now, suffer with my quike write-up!

The full ‘raw’ boot process goes through a number of steps (ie: The OMAP itself knows how to read a bit from a FAT filesystem on SD, and bull up a file called MLO to be first stage of the boot process, which in turn can pull up stage 2, etc.) I’m not going to go into that here, but our good man DJWillis posted in some detail here at Distant Earth

Fortunately, most people will have a flashed unit, where the boot files (such as MLO/etc) are in NAND and good to use. This makes the whole process a lot easier and less fiddly – we can piggy back on these guys, and our dear friend notaz has added some grand features to make booting from SD while using these bootfiles a piece of cake. Namely – you can set up a file called ‘autoboot.txt’ to tell the system what to do with a firmware on SD when the user doesn’t do anything special, and you can set up a file called ‘boot.txt’ to instruct the loader what to do when the user explicitly asks for an SD boot.

I’m writing this off the cuff; normally for development we booted the full bootfiles from SD, and after doing that several thousand times I can tell you how to do that in my sleep (maybe I should, for completeness, in another article.) Due to being over-busy the last couple weeks I’ve not had time to fiddle with this approach yet, so please let me know if the sun crashes into the Earth.

The basic process should be something like this…

Prepare the SD card

Nowadays, this is a much simpler thing than it was earlier during Pandora’s development lifecycle.

Format the SD as one big ext2 partition.

For Linux, it should be a piece of cake; for Windows/OSX you may well need an ext2fs driver, etc, but of course I heartily recommend either dual botting with Linux (or FreeBSD!), or setting up a VM (such as VMWare, VirtualBox, etc) to do your development and SD hacking in.

(You can also use ext3 as far as I know, but in my experience ext3 seems more prone to meltdown when cutting the power without a sync, and also took much longer to perform sync after large volume of data writes. Hence, ext2fs was my choice most of the time; note also that ext2fs does not like to be cut off before a sync, so when booting from SD .. be sure to always shutdown normally, otherwise you risk SD corruption leading to a fresh format; not really a problem since you’ll likely keep all your user data on SD2, but still.)

A few minutes ago, I wrote up the following; it doesn’t have to be like this anymore, so its much easier to just skip to the next section now ;)

Out of date:

In short; you’ll want to partition the SD into two (or more of course) partitions — the first one being small and formatted to FAT, and then the main body being a larger one, formatted (ideally) to ext2fs.

EDIT: Actually, it turns out boot.txt can be read from ext2fs, so we do not need the FAT partition at all; just format the whole SD as ext2fs ine one big partition, drop boot.txt on it, and good to go.

Order is important — first should be FAT, the second should be ext2fs. (Historically, we’ve used a small first partition since OMAP seems to not like giant multi-GB partitions, but thats probably a non-issue for our purposes here.)

The long version:

Edit: Make one big partition, and format it to ext2fs; previously I noted the two partition approach:

To partition and format the SD under Linux, this page seems a pretty good how-to: Linux Beagleboard Guide

For Windows, I imagine using the built in Disk Manager tools would be sufficient; sometimes you need to hit the SD with a good solid format, often using Panasonic formatter or the HP formatter, etc; they do a good thorough job. Try this guy, for instance: HP Formatter (requires USB SD widget, often will not recognize built in SD slots on a laptop)

Set up boot.txt

The NAND bootfiles take care of most of our heavy lifting; we do not need to set up MLO, u-boot or other handy bits. (Thanks notaz!)

We do need a boot script to instruct how to load the system. I’ve not had time to try this file out, so please let me know how it goes; this should boot the kernel from NAND (flash), and then start up the firmware from the second partition on the first SD (in your ext2fs partition.)

Using your favourite TEXT EDITOR (vi, emacs, windows Notepad, etc .. but not MS Word, etc) create “boot.txt” on your SD, in the FAT partition. As always, thanks to notaz:

setenv bootargs root=/dev/mmcblk0p1 rw rootdelay=2 vram=6272K omapfb.vram=0:3000K
ubi part boot && ubifsmount boot && ubifsload ${loadaddr} uImage && bootm ${loadaddr}

The firmware

You could probably just copy much of the firmware right off your NAND onto your second partition of your SD, using the Terminal or even Thunar directory browser. ie: cp / /media/mmcblk0p1 and good to go :)

An _OUT OF DATE_ firmware file in tarball format can be found here: Codejedi site

Untar this into your ext2fs partition, and you should be good to go.

(One untarred, you could further edit it to change /etc, add more packages, modify its boot, etc. Do that later if you want, a firmware on SD is pretty handy; pop it into your parent Linux box and hack away!)

Fire it up

When powering up the Pandora, hold right-trigger down to get presented with a boot menu; here you can select an alternate boot option (other than NAND, say), or power the unit off again. Pick “SD1:1″ and hit “B” to start the boot process, and it should read your boot.txt and fire up the firmware, without touching your NAND (beyond the bootfiles/kernel.)

Let me know how it goes, I’m jugglgin 35 things right now, so can’t keep on top of everything :)

Author: skeezix Categories: Technology Tags: , ,

Getting up and going with a crosscompiler for Pandora (ARM) in 5 minutes

June 2nd, 2010
Comments Off

This is a quick write-up just to provide a tipping-off point; if you would like a more in depth article, let me know (skeezix skeleton org) and I can write up something when I get a moment; I’m hoping that a few tidbits here will just provide some ‘eureka!’ moments and folks will be be off and going :) I wrote this seat of my pants, so don’t expect it to be very well organized!

Components you need to build ‘hello world’ for your Pandora (or other non-native platform.): a toolchain, libraries, and somewhere to run the toolchain.

Where to Run:

This usually a ‘given’ — you run on your PC, the very same one you’re using to run your web browser on

If you’re a little nutty like me, theres lots of other options, but normal folks – just skip this:  You could well build on a remote shell server, or your Pandora or smartphone, or any number of options (cloud based server?) So for most people.. think — you need a toolchain for Windows to run on your Windows box (or under cygwin, say.) But what I do is run from VMs, which I copy between USB and hard drives and all over the darned place. VM – a virtual machine. I’ve built up a number of them for various specific uses, and carry them around on a flash thumb drive (pick up a 16GB or 32GB flash drive for your keychain, say. Boot time is pretty fast actually, but shutting down the VM and storing the RAM snapshot etc back to a flash drive takes a few minutes. You could copy it to the local hard drive before/after if you wanted.) You could use the VM on a machine and never move it around, or transfer it on SD cards, whatever you like to do. (ie: There are uses for all combinations .. you might never move the VMs around, but want 5 different testing or build environments, or maybe you need move them all around all the time.) As an aside, an interesting hack is to make your flash drive bootable — I can boot from my flash drive into an OS, and I can run the VM off the flash drive to get the VM. To do both, I make a small bootable OS that has VMWare Player on it (use VirtualBox or whatever you prefer), then mount the VM and go. Or just use VMWare Player on the native OS wherever you’re sitting — so on the flash thumbdrive, I usually carry the VM, VMWare Player for installing to various OSes, and a bootable OS on the thumbdrive itself :)

I bought VMWare Workstation years ago and still use it, but you can get away for free with VMWare Player (and hand edit the conf files, or use online tools to generate them.) But VirtualBox and a half dozen other products are free or vary in price, so look around. Either way though you just get a VM hypervisor, a blank disk image (I keep zipped blank drive images around in a tiny zip file; since they’re _empty_, they compress like 99%, so one tiny zip has 1GB, 5GB, 8GB, 16GNB disk images, and its a few K of zip :), and OS .iso’s — suck down a Ubuntu .iso, and you can set it up into a VM in 20 minutes.

But for most people, they will just run the toolchain in their native OS.

Toolchain:

This is the ‘confusing part’; you can either roll your own (ie: build a cross compiler from sources, which takes an hour), or you can pull down someone elses prebuilt toolchain.

For purposes of the 5 minute setup, just grab CodeSourcery’s prebuilt gcc for the command line:

http://www.codesourcery.com/sgpp/lite/arm/portal/subscription3057

When using a prebuilt toolchain, just pick a directory and unpack it. Add it to your path, and you’re done.

ie: Create /code/toolchain and extract it all there, then add /code/toolchain/bin to your $PATH. Now you’ve got arm-none-linux-gcc (for example.) In CSL’s case, it comes with some basic core libs (like glibc) etc, so you can spit out Hello World there.

Consider: Extract, set path, build hello world — thats what, 1 minute of work, after the download?

Libraries:

For any remotely useful application, you need to link against libraries. And I dunno about you, I really don’t want to compile 200 libraries to get going, but you could do that. What I do, is use a copy of the Pandora firmware and pull all the libraries out of that.

We didn’t modify any headers, so you can compile against whatever Linux headers you already have (/usr/include); if you’re on Linux and don’t have them, you can ask your package manager to fetch them for you. If you’re on Windows, well, suck them out of a Linux distro’s .iso :)

As I code in a Linux VM (on a linux box, or a Mac, or Windows, or whatever), the Linux VM has my native and cross compiler toolchains and all the headers.

An OUT OF DATE copy of the Pandora first firmware is here:

http://www.codejedi.com/pandora/libpnd/pandora-xfce-image-omap3-pandora-20101705-image-for-checking-fixes.tar.bz2

Look in /usr/lib there, and you see a pile of libs you can use for linking.

Remember, those are already on real Pandora’s, so you don’t need to include them in your app or pnd-file. They’re _just for linking_, and then when you build hello.bin for running, thats the only file you need to copy around.

NOTE: Your toolchain’s linker naming policy might be different, so libfoo.so.1.2.3 in /usr/lib of the firmware might not get found when you -L to it; I created a short sh-script to ln -s to common names.. so libfoo.so.1.2.3 also gets a symlink of libfoo.so.1 and libfoo.so, so that it’ll be found by my cross compilers ld.

Tieing it all together:

1) Preparation; -> well, setting up a VM might take you 20mins, but I don’t count that in the timer; I already had one :)

i) Set up your VM, or whatever OS you want to run your toolchain in. ie: Install an OS. Make it have Linux headers, which is probably just default for many Linux distros, or maybe you need to add the basic developer package. (For random libs, you’ll want to pull down other packages too.. for SDL, your Linux distro will have the native libSDL, but not the SDL headers; so you might well need to apt-get sdl-1.3-dev (or whatever) to get the headers. We really should supply a list of packages to get, so that you have all the headers in your native linux that the Pandora would have libs for. But I digress, and its not hard to piecemeal them over time.)

ii) Build, or suck down a prebuilt, toolchain -> depends on your bandwidth speed of course :)

2) Set it up

i) Set the toolchain up in some well defined path; Try something like /devo/toolchains/arm/codesourcery/2009-q3/ (say), so that you have …../2009-q3/bin with the tools in it. It will use relative paths, so can find oits own libs and bits it needs. -> if using CodeSourcey (say), we’re saying: untar or unzip the files, and that takes .. 2 minutes.

ii) Set your PATH; something like “set PATH=${PATH}:/devo/toolchains/arm/codesourcery/2009-q3/bin”; then when you type arm-none-linux-gcc and hit return, it’ll say “no input files” instead of “file not found”, and that means you’re good to go. -> 30 seconds

iii) Extract the Pandora firmware to /devo/pandora/firmware/prerelease (say), so that …../prerelease/usr/lib has all the lib*so* files in it. -> 2 minutes

— thats it, 5 minutes of setup :)

3) Use it

i) When compiling., specify -I/usr/include – many prebuilt crosscompilers will drop native paths (rightly so), thinking you’ll tell them somewhere else to go; but I just use the native headers anyway, so -I/usr/include works fine

ii) Specify a lib path; something like -L/devo/pandora/firmware/prerelease/usr/lib (or whatever) will make most things happy; sometimes you’ll need to specify a hint to ld so that when it pulls in one lib, and that lib depends on another, it’ll still find the subsequent ones; its all pretty easy stuff.

iii) Set your CC/etc in the Makefile, since you want to use arm-none-linux-g++ instead of “g++” (the native one.)

Piece of cake!

I know, I’m glossing over quite a lot here, but feel free to ask!

Shoes

May 3rd, 2010
Comments Off

Are shoes just footsteps not yet taken?

Author: skeezix Categories: Day by Day Tags:

Not good :)

April 20th, 2010
Comments Off

Definition – middle age; when you start to be able to carry a conversation about aches and pains, rather than just ignore them ;) Today I’m feeling wiped out and tired (from staying up too late of course, night after night, with the little one sapping away all the energy :) Aside of all this, I’m experimenting with altering one of my ‘default profiles’ used across a dozen machines — the profile that sets _font size_ in terminals, specifically. Yeah. Cranking up font size is a bad sign. Maybe its just for the day, though, alright?

Author: skeezix Categories: Day by Day Tags: