Debugging IOP Modules

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
ubergeek42
Posts: 83
Joined: Wed Jul 13, 2005 12:25 am

Debugging IOP Modules

Post by ubergeek42 »

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?
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

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.
ubergeek42
Posts: 83
Joined: Wed Jul 13, 2005 12:25 am

Post by ubergeek42 »

Thanks for the lead, but I can't load the module:

Code: Select all

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.
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

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.
ubergeek42
Posts: 83
Joined: Wed Jul 13, 2005 12:25 am

Post by ubergeek42 »

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.
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

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.
ubergeek42
Posts: 83
Joined: Wed Jul 13, 2005 12:25 am

Post by ubergeek42 »

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/
Post Reply