Thanks
Printable View
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.
Did you install PSPSDK etc. from SVN? On their website they don't have the latest version.
You could also try compiling my version, see if that works, and what the differences then are with the code you're trying to compile. You can find it here: http://stuff.nieko.net/psp/mapthis/m...0-%20Nieko.zip
Ah, the SVN PSPSDK did the trick! I'll report back when I have something useful :)
Hello there.
I am running on Ubuntu, have pspsdk installed, my own homebrew application compiling and works well on 5.00 M33.6.
But, I've never used in my application libjpeg.
I am trying to compile latest mapthis source and got a message about incompatibility of libjpeg.
Only the changes I have done this is in a makefile, because i am using PSP-290.
See here makefile:
================================================== ============
TARGET = mView
PSPSDK=$(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin
PSP_EBOOT_PIC1 = PIC1.png
PSP_EBOOT_ICON = ICON0.png
################################################## #################
#PSP-290/USB versionSPECIFIC DEFINITIONS::uncomment the lines below
################################################## #################
PSP_FW_VERSION=371
BUILD_PRX = 1
CFLAGS = -O2 -G0 -Wall -g -DDANZEFF_SCEGU -DNDEBUG
##LDFLAGS = -mno-crt0 -nostartfiles
LDFLAGS = -mno-crt0
LIBS = -lpspdebug -lpsprtc -lpspgum -lpspgu -lpsppower -ljpeg -lpspusb -lpng -lz -lm -lc -lpspwlan -lmad -lpspaudiolib -lpspaudio -g
################################################## #################
#HOLUX GPSlim236+ version DEFINITIONS::uncomment the lines below
################################################## #################
#CFLAGS = -O2 -G0 -Wall -g -DDANZEFF_SCEGU -DNDEBUG -DGENERIC
#LIBS = -lpspdebug -lpsphprm_driver -lpsprtc -lpspvfpu -lpspgum -lpsppower -lpng -lz -ljpeg -lm -lpspwlan -lmad -lpspaudiolib -lpspaudio -lpspgu
OBJS = 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
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = mView
include $(PSPSDK)/lib/build.mak
=============================================
See log here:
=============================================
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 -lpspdebug -lpsprtc -lpspgum -lpspgu -lpsppower -ljpeg -lpspusb -lpng -lz -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
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libjpeg.a when searching for -ljpeg
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/psp/lib/libjpeg.a when searching for -ljpeg
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/psp/bin/../lib/libjpeg.a when searching for -ljpeg
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/bin/ld: cannot find -ljpeg
collect2: ld returned 1 exit status
make: *** [mView.elf] Error 1
==============================================
Any advise from your side?
Thank you in advance.
==============================
Thank You for PM.
Problem solved.
It was an issue with PATH env. settings
I'm using Minimalist PSPSDK to compile MapThis!. For the MapThis!, I'm able to compile without any problem, but when I try to compile sioprx.prx I've this error:
================================================== ===
Makefile:29: warning: overriding commands for target `clean'
D:/PSP/sdk/psp/sdk/lib/build.mak:219: warning: ignoring old commands for target
`clean'
psp-gcc -ID:/PSP/sdk/psp/sdk/include/libc -I. -ID:/PSP/sdk/psp/sdk/include -O2 -
G0 -Wall -g -D_PSP_FW_VERSION=150 -c -o main.o main.c
make: *** No rule to make target `sioprx.o', needed by `sioprx.elf'. Stop.
================================================== ===
I haven't changed the Makefile provided on MapThis! 05.20 source. I'm only trying to compile this 'cause when I try to run my compilation of MapThis! it works once. The second time I try to run it gives me an error that game could not be started.
Thanks in advance
Where do I put the src folder?
i very like this
its so nice