Hi there folks. I'm looking at implementing some things for MapThis, notabely .GPX support and perhaps vector maps support, but that might be a bit ambitions for me, anways, in order to get started, I've downloaded and installed the PSPSDK and PSPToolchain packages from the ps2dev folks.
I tried compiling the stock code to see if I could get it to work.
I'm working on Ubuntu 8.04, and I have a PSP-2002 running 4.01 M33-2.
Unmodified the code compiles, but doesn't generate the EBOOT file because the .png files need to be .PNG, easy fixed. But the then generated EBOOT doesn't work on my PSP. So I look in the makefile and discover that changes are needed to get it to compile to 3.XX (and above I guess) firmware. I do this and get:
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -DDANZEFF_SCEGU -DNDEBUG -D_PSP_FW_VERSION=371 -c -o main.o main.c
main.c: In function ‘main’:
main.c:1941: warning: implicit declaration of function ‘sceUtilityLoadUsbModule’
main.c:1941: error: ‘PSP_USB_MODULE_ACC’ undeclared (first use in this function)
main.c:1941: error: (Each undeclared identifier is reported only once
main.c:1941: error: for each function it appears in.)
main.c:1951: error: ‘PSP_USB_MODULE_GPS’ undeclared (first use in this function)
make: *** [main.o] Error 1
A bit of research turns up that you need to include some header files and link in the psputility library, adding the code:
diff -u src.orig/main.h src/main.h
--- src.orig/main.h 2008-10-14 16:17:25.000000000 +1100
+++ src/main.h 2008-10-14 16:20:32.000000000 +1100
@@ -26,6 +26,13 @@
#include "line.h"
+#include <pspusb.h>
+#include <pspusbcam.h>
+#include <psputility.h>
+#include <psputility_usbmodules.h>
+
+
+
#define PSP_WIDTH 480
#define PSP_HEIGHT 272
#define RADIUS 0
diff -u src.orig/makefile src/makefile
--- src.orig/makefile 2008-10-14 16:17:25.000000000 +1100
+++ src/makefile 2008-10-14 16:19:29.000000000 +1100
@@ -14,7 +14,7 @@
CFLAGS = -O2 -G0 -Wall -g -DDANZEFF_SCEGU -DNDEBUG
#LDFLAGS = -mno-crt0 -nostartfiles
LDFLAGS = -mno-crt0
-LIBS = -lpspdebug -lpsprtc -lpspgum -lpspgu -lpsppower -lpspusb -lpng -lz -ljpeg -lm -lc -lpspwlan -lmad -lpspaudiolib -lpspaudio -g
+LIBS = -lpsputility -lpspdebug -lpsprtc -lpspgum -lpspgu -lpsppower -lpspusb -lpng -lz -ljpeg -lm -lc -lpspwlan -lmad -lpspaudiolib -lpspaudio -g
################################################## #################
#HOLUX GPSlim236+ version DEFINITIONS::uncomment the lines below
all the objects compile, but linking seems to be a problem
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -g -DDANZEFF_SCEGU -DNDEBUG -D_PSP_FW_VERSION=371 -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx -mno-crt0 main.o graphics.o font.o utils.o attractions.o line.o nmeap01.o danzeff.o geocalc.o sceUsbGps.o geodata.o mp3player.o basic.o menu.o sioprx.o display.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lpsputility -lpspdebug -lpsprtc -lpspgum -lpspgu -lpsppower -lpspusb -lpng -lz -ljpeg -lm -lc -lpspwlan -lmad -lpspaudiolib -lpspaudio -g -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o mView.elf
main.o: In function `main':
/home/paw900/Downloads/MapThis0520/src/main.c:1941: undefined reference to `sceUtilityLoadUsbModule'
/home/paw900/Downloads/MapThis0520/src/main.c:1951: undefined reference to `sceUtilityLoadUsbModule'
collect2: ld returned 1 exit status
make: *** [mView.elf] Error 1
So, I'm a bit stuck, anyone able to help out?
Cheers.
Bookmarks