PSPLink USB debug, can't quite make it work

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Def Base
Posts: 6
Joined: Mon Jul 17, 2006 9:24 am

PSPLink USB debug, can't quite make it work

Post by Def Base »

Hi,

I have a bit of a problem with USB debugging with the PSPLink gdbserver. Here's what I've done so far (SuSE box, not Cygwin).

Installed the toolchain, sdk, pspgdb etc. Tested that everything works fine, which it does. I can build the gu/sprite sample from the SDK and deploy it through PSPLink, it runs on the PSP perfectly and I can start/reset PSPLink with no problems. So it all seems set up right.

So next I want to try debugging the sprite sample. I start usbhostfs_pc as root in one shell with the dir with my code in as the root. I start up PSPLink on my PSP, usbhostfs_pc reports "Connected".

I edit the makefile and add -g to cflags for the sprite sample, then make it again.

Code: Select all

psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -g -G0 -Wall -O2   -c -o sprite.o sprite.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -g -G0 -Wall -O2  -L. -L/usr/local/pspdev/psp/sdk/lib   sprite.o ball.o ../common/callbacks.o ../common/vram.o -lpspgum -lpspgu -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o sprite.elf
psp-fixup-imports sprite.elf
psp-strip sprite.elf -o sprite_strip.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL  \
        NULL NULL NULL  \
        NULL  sprite_strip.elf NULL
rm -f sprite_strip.elf
I start pcterm, this connects properly and usbhost reports connected. I then do a "debug ./sprite.elf". This outputs:

Code: Select all

host0:/>  debug ./sprite.elf
host0:/>  PSPLink GDBServer (c) 2k6 TyRaNiD/Lovely2
GDBServer: Loaded host0:/sprite.elf - UID 0x044C767F
It also doesn't return to the host0:/ prompt afterwards, no matter what. I switch to a third shell and start psp-gdb:

Code: Select all

(gdb) target remote localhost:10001
Remote debugging using localhost:10001
Ignoring packet error, continuing...
[New thread 0]
0x089000e4 in ?? ()
And that's it. No matter what I can't actually get sprite.elf to load and start, for gdb to break at main or in fact anything at all.

All help appreciated, thanks.
Def Base
Posts: 6
Joined: Mon Jul 17, 2006 9:24 am

Post by Def Base »

ok, I've solved it, sort of. If I recheck gdbdebug in usbhostfs, it keeps going to off for some reason. If I keep turning it on before I psp-gdb connect it works. Odd, but sorted.
Post Reply