GP2X Debugging The 940t


andrew_j_w

Still Fresh
Joined
Sep 18, 2005
Messages
59
Hi,

Does anyone have any tips or tricks they use to help debug things running on 940t? I have some code that runs fine on my PC, but when I run it on the GP2x I get nothing...

Obviously gdb/valgrind doesn't work, and I haven't been able to get my implementation of printf to give me anything back yet.

What would be really nice is a GP2x emulator, so I can see what is going on. I guess Squidge's project died?

Cheers,
Andrew
 
The only proper way to debug the 940 is the configure the CFG pins on the processor appropriately and use JTAG. No one has yet figured out if the CFG pins are routed out of the processor however (and if so, where to).

The only other option is to try your code on the 920 in HH-mode/JTAG, and if it works there, copy to 940 and hope (or if there's no IO, just try under Linux via gdb).

The GP2X emulator isn't dead, but it's not had much work done on it in a long while as Linux refuses to play ball, and I've no idea why. It also emulates a GP2X at approximately 2mhz on a 3ghz processor.
 
Does anyone have any tips or tricks they use to help debug things running on 940t? I have some code that runs fine on my PC, but when I run it on the GP2x I get nothing...

Did you manage to get a simple 'poke into the framebuffer' program to work from the 940 ?
Because the hard part is to setup your program on the 940. Once there, there are little difference.

Personnaly, I use a 940 special version of the printf("I'm there") debuging method, which consist
of flipping the video mode to follow the code pointer. Not as profesionnal as a proper JTAG installation, but still enought.
 
Last edited by a moderator:
Yup, if you don't have any 940 startup code, just ask, and I'll paste mine, which should give you full speed.
 
Did you manage to get a simple 'poke into the framebuffer' program to work from the 940 ?
Because the hard part is to setup your program on the 940. Once there, there are little difference.

Yeah, I have a nice little program which fades the screen from black to white on the 940t. It runs fine.

I think the start up code I'm using is yours Squidge :)

I guess changing the colour of the screen to indicate where it has got to is the best I can do at the moment... oh well!

Thanks,
Andrew
 
Last edited by a moderator:
The only proper way to debug the 940 is the configure the CFG pins on the processor appropriately and use JTAG. No one has yet figured out if the CFG pins are routed out of the processor however (and if so, where to).

The only other option is to try your code on the 920 in HH-mode/JTAG, and if it works there, copy to 940 and hope (or if there's no IO, just try under Linux via gdb).

The GP2X emulator isn't dead, but it's not had much work done on it in a long while as Linux refuses to play ball, and I've no idea why. It also emulates a GP2X at approximately 2mhz on a 3ghz processor.


Well, writing a GDB stub for the 940 wouldn't be that hard i suppose.
Only a matter of setting up some kind of communication, if you want to debug it
from the 920 or via UART or smth.

Getting that damn TAP controller working would be more fun ofcourse. :D
 
Last edited by a moderator:
Back
Top