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 

Activating USB in a kernel mode prx (CF 3.52)?

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



Joined: 28 Apr 2006
Posts: 190

PostPosted: Thu Sep 27, 2007 7:56 pm    Post subject: Activating USB in a kernel mode prx (CF 3.52)? Reply with quote

Hi! :)

I'm experiencing problems activating usb in a prx (kernel mode) under CF 3.52 update 4.

I've always activated USB with this code (taken from the sdk sample):
Code:
int USBinit(){
    u32 retVal;
    //start necessary drivers
    LoadStartModule("flash0:/kd/semawm.prx");
    LoadStartModule("flash0:/kd/usbstor.prx");
    LoadStartModule("flash0:/kd/usbstormgr.prx");
    LoadStartModule("flash0:/kd/usbstorms.prx");
    LoadStartModule("flash0:/kd/usbstorboot.prx");

    //setup USB drivers
    retVal = sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0);
    if (retVal != 0) {
      return -1;
    }
    retVal = sceUsbStart(PSP_USBSTOR_DRIVERNAME, 0, 0);
    if (retVal != 0) {
      return -1;
   }
    retVal = sceUsbstorBootSetCapacity(0x800000);
    if (retVal != 0) {
      return -1;
   }
   return 0;
}


and then
Code:
int USBActivate(){
    sceUsbActivate(0x1c8);
    return 0;
}


This code seems to fail in my prx.
The prx doesen't even load and start (returning "Library not found").
The prx loads fine if I comment all the sceUSB* functions.
What's wrong?

Many thanks. :)

Ciaooo
Sakya
Back to top
View user's profile Send private message Visit poster's website
septem



Joined: 29 Aug 2007
Posts: 21

PostPosted: Fri Sep 28, 2007 4:42 am    Post subject: Reply with quote

I had the same problem, you need to remove one of the libs that are used in makefile, I guess that was one of -lpspusb... you must try for yourself- delete any that's not necessary to compile.
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