| View previous topic :: View next topic |
| Author |
Message |
kecC
Joined: 04 Jul 2005 Posts: 17
|
Posted: Fri Jul 29, 2005 1:47 am Post subject: Problem with usb libraries |
|
|
Hi.
I'm trying to make a homebrew to connect my PSP to the PC, but I dont know very sure how I have to do it.
There are 4 functions in pspusb.h -> sceUsbStart(); sceUsbStop(); sceUsbActivate(); sceUsbDeactivate();
How I have to use them to connect my PSP to PC? In the homebrew i've done a code that when you push CIRCLE usb have to connect to PC, and when you push TRIANGLE usb disconnect from the PC.
Anyone can help me please?
Thanks for all! |
|
| Back to top |
|
 |
Warren
Joined: 24 Jan 2004 Posts: 173 Location: San Diego, CA
|
Posted: Fri Jul 29, 2005 2:46 am Post subject: |
|
|
| Look at the usb/storage sample |
|
| Back to top |
|
 |
kecC
Joined: 04 Jul 2005 Posts: 17
|
Posted: Fri Jul 29, 2005 6:24 am Post subject: |
|
|
where can i look that?
Thanks |
|
| Back to top |
|
 |
Arwin
Joined: 12 Jul 2005 Posts: 426
|
|
| Back to top |
|
 |
kecC
Joined: 04 Jul 2005 Posts: 17
|
Posted: Fri Jul 29, 2005 8:54 am Post subject: |
|
|
I've looked the sample and I've done my file, but when i'm going to compile it, it says me:
| Code: |
main.o: In function 'main':
main.c:(.text+0x1f8): undefined reference to 'sceUsbStart'
main.c:(.text+0x214): undefined reference to 'sceUsbStart'
main.c:(.text+0x224): undefined reference to 'sceUsbstorBootSetCapacity'
main.c:(.text+0x248): undefined reference to 'sceUsbGetState'
main.c:(.text+0x29c): undefined reference to 'sceUsbDeactivate'
main.c:(.text+0x2c0): undefined reference to 'sceUsbGetState'
main.c:(.text+0x2f8): undefined reference to 'sceUsbActivate'
collect2: ld returned 1 exit status
make: *** [usbstorage.elf] Error 1
|
That seems like if the usb functiones there wouldn't be defined, but the includes to pspusb.h and pspusbstor.h are OK.
Anyone can help me, i'm very lose :S:S.
Thanks!
Bye.[/code] |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Fri Jul 29, 2005 9:02 am Post subject: |
|
|
You have to add the libraries 'pspusb' and 'pspusbstor' to your makefile.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
kecC
Joined: 04 Jul 2005 Posts: 17
|
Posted: Fri Jul 29, 2005 9:52 am Post subject: |
|
|
| I've done that, and it continues says me the same. :S |
|
| Back to top |
|
 |
apache37
Joined: 04 Jun 2004 Posts: 76
|
Posted: Fri Jul 29, 2005 9:53 am Post subject: |
|
|
| Paste your makefile here |
|
| Back to top |
|
 |
kecC
Joined: 04 Jul 2005 Posts: 17
|
Posted: Fri Jul 29, 2005 10:02 am Post subject: |
|
|
| Code: | TARGET = usbstorage
OBJS = main.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR = -lpspusb -lpspusbstor
LDFLAGS =
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak |
|
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Fri Jul 29, 2005 2:46 pm Post subject: |
|
|
Should be
| Code: |
LIBS = -lpspusb -lpspusbstor
LIBDIR =
|
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
kecC
Joined: 04 Jul 2005 Posts: 17
|
Posted: Fri Jul 29, 2005 8:21 pm Post subject: |
|
|
if I put that, it says me:
| Code: | /cygdrive/c/PSPDev/bin/../lib/gcc/psp/4.0.0/../../../../psp/bin/ld: cannot find -lpspusb
collect2: ld returned 1 exit status
make: *** [usbstorage.elf] Error 1
|
Do I need any other library?
I only have pspusb.h and pspsubstor.h in the dir of psp libraries.
Thanks.
Bye. |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Fri Jul 29, 2005 8:45 pm Post subject: |
|
|
In the lib folder you should have about 20 files that are named 'libpspXYZ.a' This is where libpspusb.a and libpspusbstor.a live.
In the include folder parallel to that you should have a load of .h files.
I can tell you've not updated your toolchain very recently too.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
kecC
Joined: 04 Jul 2005 Posts: 17
|
Posted: Fri Jul 29, 2005 9:10 pm Post subject: |
|
|
I only have 6 :S.
Where can i get them? |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
|
| Back to top |
|
 |
2Xtremes2004
Joined: 31 Aug 2005 Posts: 53
|
Posted: Tue Jun 06, 2006 8:37 am Post subject: |
|
|
I keep getting the following error when I try to compile the usb sample code that comes with the pspsdk:
error: too few arguments to function 'sceUsbDeactivate'
Can anyone spare a few moments to help me, Thanks. _________________ I want my money back!? |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
|
| Back to top |
|
 |
|