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 

Debugging IOP Modules

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



Joined: 13 Jul 2005
Posts: 83

PostPosted: Wed Jun 20, 2007 1:09 pm    Post subject: Debugging IOP Modules Reply with quote

Is there any recommended ways for debugging IOP modules, when an IOP reset is used? Is there any way to redirect printf's from IOP modules to be sent over an ee_sio cable?
Back to top
View user's profile Send private message AIM Address MSN Messenger
radad



Joined: 19 May 2004
Posts: 246
Location: Melbourne, Australia

PostPosted: Wed Jun 20, 2007 3:28 pm    Post subject: Reply with quote

I believe the ps2sdk/iop/deug/sior module is for the sio cable. There is an sio_printf function in there. I havent used it myself so I am not sure.
Back to top
View user's profile Send private message
ubergeek42



Joined: 13 Jul 2005
Posts: 83

PostPosted: Wed Jun 20, 2007 10:23 pm    Post subject: Reply with quote

Thanks for the lead, but I can't load the module:
Code:
Binding RPC.
Huh, not available, retrying... ?
Binding RPC.
Huh, not available, retrying... ?
Giving up.

I don't know what this means, so any help would be appreciated.
Back to top
View user's profile Send private message AIM Address MSN Messenger
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Wed Jun 20, 2007 11:45 pm    Post subject: Reply with quote

The IRX is trying to bind with a Remote Procedure Call (RPC) Server on the EE side. You need to link with libsior.a on EE side and call SIOR_Init to create the RPC server, preferably before you load the module.
_________________
Lukasz.dk
Back to top
View user's profile Send private message Visit poster's website
ubergeek42



Joined: 13 Jul 2005
Posts: 83

PostPosted: Thu Jun 21, 2007 5:01 am    Post subject: Reply with quote

Thanks, I figured there had to be something on the ee side, I just didn't have any idea what. (And documentation is kinda lacking in the sdk)

printf seems broken in the sior irx module
It crashes the console, after printing one character(Granted I had need need to be using printf, it was just a constant string)
Using puts works fine, and I can always combine with sprintf to achieve the desired result.

Again, thanks for the help guys.
Back to top
View user's profile Send private message AIM Address MSN Messenger
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Thu Jun 21, 2007 5:41 am    Post subject: Reply with quote

ubergeek42 wrote:

printf seems broken in the sior irx module
It crashes the console, after printing one character(Granted I had need need to be using printf, it was just a constant string)
Using puts works fine, and I can always combine with sprintf to achieve the desired result.


This could possibly be related to the fact the sprintf appears to be broken on the IOP, check this thread:

http://forums.ps2dev.org/viewtopic.php?t=8326

I'd recommend adding your own sprintf, possibly porting the EE one from ps2sdk.
_________________
Lukasz.dk
Back to top
View user's profile Send private message Visit poster's website
ubergeek42



Joined: 13 Jul 2005
Posts: 83

PostPosted: Thu Jun 21, 2007 6:29 am    Post subject: Reply with quote

Hmm, I was just coming over to the forums to search for that, I vaguely remembered reading that topic(but at the time was uninterested in the iop)

Thanks for the tip on how to do it as well.

Edit: wow the ee version of printf is crazy, I found a simpler implementation(which does what I need it to do, basic debug) written for embedded systems, and it seems to work well.

http://www.menie.org/georges/embedded/
Back to top
View user's profile Send private message AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 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