forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

psplink debugging/shell problems

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
JoePub



Joined: 21 Aug 2008
Posts: 10

PostPosted: Wed Aug 27, 2008 11:16 pm    Post subject: psplink debugging/shell problems Reply with quote

Hi Guys,

I am writing an application that is now in need of remote debugging. I have setup psplink with the M33 4.01 firmware (running with 1.50 compatibility). The application in a network based app which connects to the wifi and then sends the controller details over TCP.

I initially was using a PRX and the new API calls which are compatible with WPA access point, but since psplink requires a 1.50 firmware I have now altered the code so that it compiles a version which will be compatible on 1.50 firmware.

Now I can run the compiled 1.50 version of the application and run it from the GAME150 folder no problem. But if I try to execute or debug the application via the psplink shell, the module gets loaded but seems to hang the PSP and I have to do a hard reset (shell is still active though).

Anybody have any idea what the cause of this could be?

Module defintion below

Code:
#if _PSP_FW_VERSION < 200
PSP_MODULE_INFO(PSP_REMOTE, 0x1000, 0, 1);
PSP_MAIN_THREAD_ATTR(0);
#else
PSP_MODULE_INFO(PSP_REMOTE, PSP_MODULE_USER, 0, 1);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER | THREAD_ATTR_VFPU);
#endif
PSP_HEAP_SIZE_KB(10240);


Makefile
Code:

  INCDIR =
  TARGET = pspremote
  OBJS = pspremote.o menu.o net.o librjoy.o
  LIBS = -lstdc++

  CFLAGS = -O0 -G0 -Wall -g3
  CXXFLAGS = -fno-exceptions -fno-rtti

  BUILD_PRX = 1
  LIBDIR =
  EXTRA_TARGETS = EBOOT.PBP
  PSP_EBOOT_TITLE = PSP Remote
 
  PSPSDK=$(shell psp-config --pspsdk-path)
  include $(PSPSDK)/lib/build.mak

librjoy.o: ../../pspremote_server/librjoy.cpp
   $(CC) $(CFLAGS) $(CXXFLAGS) -c ../../pspremote_server/librjoy.cpp




EDIT:

I seem to be able to run other applications fine from the shell, for instance the simple netsample works fine from the shell and the controller sample works from the shell
Back to top
View user's profile Send private message
sturatt



Joined: 13 Jul 2006
Posts: 46

PostPosted: Wed Aug 27, 2008 11:25 pm    Post subject: Reply with quote

Quote:
but since psplink requires a 1.50 firmware

you could use psplinkusb which supports newer kernel stuff


I know that doesnt solve the debugging problem, but you might want to post all of the steps you are going through to start debugging as well.
Back to top
View user's profile Send private message
JoePub



Joined: 21 Aug 2008
Posts: 10

PostPosted: Wed Aug 27, 2008 11:26 pm    Post subject: Reply with quote

ah, interesting. Didn't know there was such a thing.
Back to top
View user's profile Send private message
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Thu Aug 28, 2008 12:41 am    Post subject: Reply with quote

you've got a Makefile.oe that build psplinkusb for a kernel >= 3

if you have a slim don't forget to patch from directory boot271 the makefile
replace mksfo ..... by mksfoex -d MEMSIZE=1 'PSPLink v3.0 OE' PARAM.SFO
add after BUILD_PRX = 1
PSP_LARGE_MEMORY = 1

and in main.c this PSP_HEAP_SIZE_KB(-64);

to debug i use de usb version
launch usbhostfs_pc
launch pspsh like this
in pspsh debug ./your.prx

launch psp-gdb like this
psp-gdb ./your.elf
target remote : 1001


and enjoy :p:p:p

don't forget to compile your homebrew with the -g flag
Back to top
View user's profile Send private message Send e-mail MSN Messenger
JoePub



Joined: 21 Aug 2008
Posts: 10

PostPosted: Thu Aug 28, 2008 12:43 am    Post subject: Reply with quote

sturatt wrote:
Quote:
but since psplink requires a 1.50 firmware

you could use psplinkusb which supports newer kernel stuff


I know that doesnt solve the debugging problem, but you might want to post all of the steps you are going through to start debugging as well.


I have found the issue. I had BUILD_PRX=1 even though I was building it for a 1.50 firmware, since psplink can't load PRX files (even if wrapped inside EBOOT.PBP) i guess it was locking up before the load.

Omitting BUILD_PRX from the makefile when building for 1.50 done the trick. It now loads under psplinkusb running under 1.50 compatibility mode
Back to top
View user's profile Send private message
JoePub



Joined: 21 Aug 2008
Posts: 10

PostPosted: Thu Aug 28, 2008 12:48 am    Post subject: Reply with quote

sauron_le_noir wrote:
you've got a Makefile.oe that build psplinkusb for a kernel >= 3

if you have a slim don't forget to patch from directory boot271 the makefile
replace mksfo ..... by mksfoex -d MEMSIZE=1 'PSPLink v3.0 OE' PARAM.SFO
add after BUILD_PRX = 1
PSP_LARGE_MEMORY = 1

and in main.c this PSP_HEAP_SIZE_KB(-64);

to debug i use de usb version
launch usbhostfs_pc
launch pspsh like this
in pspsh debug ./your.prx

launch psp-gdb like this
psp-gdb ./your.elf
target remote : 1001


and enjoy :p:p:p

don't forget to compile your homebrew with the -g flag


Ah great, so this will allow me to debug v3/4 EBOOT/PRX's too? So the OE version is compatible with M33 also?

Can the OE version run both 1.50 EBOOT's and 3x/4x EBOOT/PRX'es, or is this a feature of the M33 GAME150 folder only when executed from the PSP menu.

Thanks for the help.

EDIT:

forgot to ask, is there a way also to get the USBHostFS_PC proggie to reconnect when the psplink resets. At the moment, when it resets, USBHostFS shoots up to 100% CPU and the pspsh is no longer responsive. Which mean I have to reset it all every time I start a debugging session.
Back to top
View user's profile Send private message
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Thu Aug 28, 2008 4:27 am    Post subject: Reply with quote

Forget the add after BUILD_PRX = 1
PSP_LARGE_MEMORY = 1
and in main.c this PSP_HEAP_SIZE_KB(-64);

etc il is now in the svn repository i have just test 3.x 4.x homebrew don't use 1.5 anymore
but i think it is just a guess if someone can confirm that you can both debug 1.5 and 3.x 4.x with the OE release of psplink.
For the owner of psplink a proposition: why not rename OE in OE3x4x because it is confusing if you see OE and you debug 3.x M33 and 4.x M33 homebrew see the previous questions
So Makefile.oe can become Makefile.oe3x4x
Back to top
View user's profile Send private message Send e-mail MSN Messenger
JoePub



Joined: 21 Aug 2008
Posts: 10

PostPosted: Thu Aug 28, 2008 4:35 am    Post subject: Reply with quote

Well thanks for your replies. I am happy with just debugging 3x/4x EBOOT's for now, which works like a charm under psplinkusb. Thanks again.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group