GP2X Using The Gp2x As A Low Level Arm Development Device


chris_r

Active Member
Joined
Jun 16, 2004
Messages
745
I'm a third year electronic engineering student and so I've done quite a bit of programming on PIC chips using development boards. I thought to broaden my horizons I'd try some ARM programming as it's widely used in industry.

What I wanted to know is if I can use my GP2X for proper low level programming, or if linux blocks you off from directly accessing peripherals/registers etc.
 
Last edited by a moderator:
'chris_r' said:
I'm a third year electronic engineering student and so I've done quite a bit of programming on PIC chips using development boards. I thought to broaden my horizons I'd try some ARM programming as it's widely used in industry.

What I wanted to know is if I can use my GP2X for proper low level programming, or if linux blocks you off from directly accessing peripherals/registers etc.
You can: the way to do it is to go through the /dev/mem device as root (almost everyone uses GP2X exclusively as root). That'll give you access to everything and Linux doesn't get in the way too much. The one thing you're limited from is using privileged instructions - if you want to do that you'll have to start writing kernel modules or do some other hackery (you can switch to system mode pretty easily through a uname hack, no idea if it'll stay persistently)

But if you just want to learn ARM there's no reason to bang on the rest of the GP2X hardware.
 
Last edited by a moderator:
Exophase has pretty much said it all. Linux is perfectly capable for most task of learning arm unless you want to go further afield and learn the MMSP2 SoC as well. You can debug your software under Linux using the standard GDB.
 
If you want to get into ARM programming (especially low level for embedded purposes), you might want to consider the Hitex USB Sticks.

They are mini development kits and are available with a number of different ARM based CPUs - All the way up to Cortex.

They're also reasonably priced.

See http://www.hitex.com/index.php?id=339
 
Last edited by a moderator:
Thanks for your replies everyone. Yes I am looking into embedded applications which is why I thought the GP2X hardware would have enough to play around with to learn how to properly interface.

Exophase. When you say linux doesn't get in the way "too much" what do you mean? Is it anything that might create a problem for me at such an early stage?

I don't know what the uname hack is but I'll have a look into it.

Those hitex sticks look quite interesting, I'll have to have a look into them.

Thanks guys.
 
Last edited by a moderator:
Basically, you'll be stuck in user mode. So you can't do stuff that requires supervisor access. If you need supervisor access, try out one of my hacks here: www.gp32x.de/board/index.php?showtopic=29451
 
Last edited by a moderator:
'chris_r' said:
Thanks for your replies everyone. Yes I am looking into embedded applications which is why I thought the GP2X hardware would have enough to play around with to learn how to properly interface.

Exophase. When you say linux doesn't get in the way "too much" what do you mean? Is it anything that might create a problem for me at such an early stage?

I don't know what the uname hack is but I'll have a look into it.

Those hitex sticks look quite interesting, I'll have to have a look into them.

Thanks guys.
In addition to what Squidge said, what I was referring to is that Linux drivers will be claiming some of the upper memory for itself. Whether or not you can happily take that memory and use it for your own purposes depends on what it was taken for and how you're using it. I don't really know the specifics on GP2X, unfortunately, but for instance if you declare a framebuffer somewhere you have to make sure that you're not overwriting sound buffers /dev/dsp is using. Things like that.
 
Last edited by a moderator:
I'm not sure, but there is a coprocessor in a gp2x that you can be play with...
 
Last edited by a moderator:
Back
Top