Win32 native Toolchain for PSPSDK
Cool, but I see that the SDL you included is linked against pspgl (presumably for SDL's OpenGL support), is that necessary? ie:
x:\workspace\minpspw\devpaks\017_SDL\SDL\src\video\psp/SDL_pspgl.c:109: undefined reference to `eglGetDisplay'
I tried to build the SDL from svn.pspdev.org, but couldn't make it past configure because the test compile requires libpspuser. Maybe there's a newer SDL that doesn't require it, or can it be made available for your toolchain?
Anyway, for those wondering (probably everyone knew but me...), you need to link -lGL, -lGLU, and -lpspvfpu to get it. Too bad that's not part of sdl-config --libs.
x:\workspace\minpspw\devpaks\017_SDL\SDL\src\video\psp/SDL_pspgl.c:109: undefined reference to `eglGetDisplay'
I tried to build the SDL from svn.pspdev.org, but couldn't make it past configure because the test compile requires libpspuser. Maybe there's a newer SDL that doesn't require it, or can it be made available for your toolchain?
Anyway, for those wondering (probably everyone knew but me...), you need to link -lGL, -lGLU, and -lpspvfpu to get it. Too bad that's not part of sdl-config --libs.
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
Yes it works if I install the Devpaks. But doesn't 0.8.10 come preinstalled with all those libs that are mentioned?Heimdall wrote:if you installed the libs, it should be there. The header file under:
C:\pspsdk\psp\include\png.h
and the lib file:
C:\pspsdk\psp\lib\libpng.a
I've installed the 0.8.10 to C:\pspsdk and i get those files.
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Use it more for Development than for Gaming.
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
Oh... That is the reason why.Heimdall wrote:Using only the 0.8.10 full installer it works.
You must use the full installer, not the lite (without docs, libs). And by default they are selected to install unless you de-select them.
Can you create a new type next time "PSP SDK - No Docs + All Libs".
I check the header files and dont use the Doxygen at all.
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Use it more for Development than for Gaming.
MinPSPW has been updated to GCC 4.3.3 and it's internal libGMP to the latest release. Get it from:
Full SDK (SDK + Docs + Libs): https://sourceforge.net/project/showfil ... _id=656864
Lite (only the SDK): https://sourceforge.net/project/showfil ... _id=656869
No SDK + Libs yet but for the ones using Eclipse I've started to write a small eBook (still in very very very alpha stage) on to use MinPSPW + Eclipse as a full development Environment: (Code, Compile, Link, Deploy and Debug) using the visual IDE. Read it here: http://minpspw.sourceforge.net/files/pspeclipse.pdf
Full SDK (SDK + Docs + Libs): https://sourceforge.net/project/showfil ... _id=656864
Lite (only the SDK): https://sourceforge.net/project/showfil ... _id=656869
No SDK + Libs yet but for the ones using Eclipse I've started to write a small eBook (still in very very very alpha stage) on to use MinPSPW + Eclipse as a full development Environment: (Code, Compile, Link, Deploy and Debug) using the visual IDE. Read it here: http://minpspw.sourceforge.net/files/pspeclipse.pdf
Hi, I just got the SDK and have been playing around with it. I can get the examples to compile just fine with Make, but I'm still having problems integrating with code::blocks.
Here are my settings.
Compiler:
-I. -IC:/pspsdk/psp/sdk/include
-IC:/pspsdk/psp/include
-O2 -G0 -Wall -D_PSP_FW_VERSION=150
Linker:
-I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150
-L.
-LC:/pspsdk/psp/sdk/lib
-LC:/pspsdk/psp/lib
-LC:/pspsdk/lib
-lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel
Command line macro: $proj_name is defined elsewhere
$compiler $options $includes -c $file -o $object
psp-fixup-imports $exe_output
mksfo $proj_name PARAM.SFO
psp-strip $exe_output tmp.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL NULL NULL NULL NULL tmp.elf NULL
It compiles just fine but I get the following linking errors when I try the control test sample.
...and so on down the line.
Does anybody have any advice?
Here are my settings.
Compiler:
-I. -IC:/pspsdk/psp/sdk/include
-IC:/pspsdk/psp/include
-O2 -G0 -Wall -D_PSP_FW_VERSION=150
Linker:
-I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150
-L.
-LC:/pspsdk/psp/sdk/lib
-LC:/pspsdk/psp/lib
-LC:/pspsdk/lib
-lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel
Command line macro: $proj_name is defined elsewhere
$compiler $options $includes -c $file -o $object
psp-fixup-imports $exe_output
mksfo $proj_name PARAM.SFO
psp-strip $exe_output tmp.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL NULL NULL NULL NULL tmp.elf NULL
It compiles just fine but I get the following linking errors when I try the control test sample.
Code: Select all
Linking console executable: bin\Debug\psphi.exe
C:\pspsdk\psp\lib\libc.a(_exit.o): In function `_exit':
../../../../../../../newlib-1.16.0/newlib/libc/sys/psp/libcglue.c:890: undefined reference to `sceKernelSelfStopUnloadModule'
../../../../../../../newlib-1.16.0/newlib/libc/sys/psp/libcglue.c:897: undefined reference to `sceKernelExitThread'
C:\pspsdk\psp\lib\libc.a(_sbrk.o): In function `__psp_free_heap':
../../../../../../../newlib-1.16.0/newlib/libc/sys/psp/libcglue.c:576: undefined reference to `sceKernelFreePartitionMemory'
C:\pspsdk\psp\lib\libc.a(_sbrk.o): In function `_sbrk':
../../../../../../../newlib-1.16.0/newlib/libc/sys/psp/libcglue.c:549: undefined reference to `sceKernelMaxFreeMemSize'
Does anybody have any advice?
NM figured it out on my own, just needed to link to libc as well.longjoel wrote:Hi, I just got the SDK and have been playing around with it. I can get the examples to compile just fine with Make, but I'm still having problems integrating with code::blocks.
Here are my settings.
Compiler:
-I. -IC:/pspsdk/psp/sdk/include
-IC:/pspsdk/psp/include
-O2 -G0 -Wall -D_PSP_FW_VERSION=150
Linker:
-I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150
-L.
-LC:/pspsdk/psp/sdk/lib
-LC:/pspsdk/psp/lib
-LC:/pspsdk/lib
-lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel
Command line macro: $proj_name is defined elsewhere
$compiler $options $includes -c $file -o $object
psp-fixup-imports $exe_output
mksfo $proj_name PARAM.SFO
psp-strip $exe_output tmp.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL NULL NULL NULL NULL tmp.elf NULL
It compiles just fine but I get the following linking errors when I try the control test sample.
...and so on down the line.Code: Select all
Linking console executable: bin\Debug\psphi.exe C:\pspsdk\psp\lib\libc.a(_exit.o): In function `_exit': ../../../../../../../newlib-1.16.0/newlib/libc/sys/psp/libcglue.c:890: undefined reference to `sceKernelSelfStopUnloadModule' ../../../../../../../newlib-1.16.0/newlib/libc/sys/psp/libcglue.c:897: undefined reference to `sceKernelExitThread' C:\pspsdk\psp\lib\libc.a(_sbrk.o): In function `__psp_free_heap': ../../../../../../../newlib-1.16.0/newlib/libc/sys/psp/libcglue.c:576: undefined reference to `sceKernelFreePartitionMemory' C:\pspsdk\psp\lib\libc.a(_sbrk.o): In function `_sbrk': ../../../../../../../newlib-1.16.0/newlib/libc/sys/psp/libcglue.c:549: undefined reference to `sceKernelMaxFreeMemSize'
Does anybody have any advice?
Well, I thought I had it working, but it wasn't producing the elfs right, so i switched to theslightly annoying eclipse platform. but I can post the steps I used, and maybe somebody could pickup from there.Heimdall wrote:Hi longloel, maybe you could explain how to setup code::blocks in a mini tutorial? I usually use Eclipse and visual studio but have no experience on Code::Blocks, is there any special trick to get it working or does it work out of the box?
First thing I did was autodetect the compiler settings. This is simple with the pspsdk, you just follow code::blocks instructions and it will pick the right compiler for you. Just set the base directory to c:\pspsdk and you are golden.
Second thing I did was build the elf_template from the command line, but piping the output to a file, so i could grab everything it built and feed it back into the compiler settings in code::blocks.
compiler settings were:
-I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150
linker settings were:
-IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150 -L.
-LC:/pspsdk/psp/sdk/lib -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet
-lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel
I think it's a bug, but no matter what i set the extension of the compiled file, it always returns to .EXE, but that doesn't matter, it should still be an .ELF at heart
I then created a batch file I could use to deal with the rest of the process to convert the file to an eboot.
c:\pspsdk\bin\make_eboot.bat
psp-fixup-imports %1
mksfo %2 PARAM.SFO
psp-strip %1 -o tmp
pack-pbp EBOOT.PBP PARAM.SFO NULL NULL NULL NULL NULL tmp NULL
where %1 is the elf/exe file name, %2 is the title of the eboot i think?
Then from codeblocks I add this in as a new tool, using
Name: Eboot maker
Executable: C:\pspsdk\bin\make_eboot.bat
Parameters: ${TARGET_OUTPUT_FILE} ${PROJECT_NAME}
for me this builds just fine, and the tool runs just fine, but the PSP won't load up the eboot file. It gives me the kernel mode error, the one that starts with 8001 something.
So for now i'm using eclipse. If anybody want's to help me keep working on this, with me, just message me here or hit me up on AIM.
Years ago i got code::blocks working with the SEGA Dreamcast doing something similar. I think it would be cool to have a self-contained deployable SDK. [The PSP is far less frusturating than the DC was. Better community too.]
Can you make a minor update with this fix:
http://forums.ps2dev.org/viewtopic.php?t=11006
http://forums.ps2dev.org/viewtopic.php?t=11006
I love the native toolchain, it works nice. Thanks Heimdall :)
I have a question: is there no boost::weak_ptr support in the sdk at this moment? I tried porting a game to the psp and the only problem I have is that there is no implementation of the weak_ptr template. I tried to add the weak_ptr.hpp file manually but obviously that didn't work.
I have a question: is there no boost::weak_ptr support in the sdk at this moment? I tried porting a game to the psp and the only problem I have is that there is no implementation of the weak_ptr template. I tried to add the weak_ptr.hpp file manually but obviously that didn't work.
Setting up pspsdk on ubuntu and upcoming tutorials: http://www.guztech.nl
Already started on it :) patching patching patching, i'll make an announcement soon with the build. Now the thing is, should it go on the 0.8.x or 0.9.x series, meaning newlib 1.16 and newlib 1.17...jojojoris wrote:Can you make a minor update with this fix:
http://forums.ps2dev.org/viewtopic.php?t=11006
For using boost you need to look into this site:Oguz286 wrote:I love the native toolchain, it works nice. Thanks Heimdall :)
I have a question: is there no boost::weak_ptr support in the sdk at this moment? I tried porting a game to the psp and the only problem I have is that there is no implementation of the weak_ptr template. I tried to add the weak_ptr.hpp file manually but obviously that didn't work.
http://boost4psp.wiki.sourceforge.net/
I never tried it on the psp myself.
latest build includes the patch:Heimdall wrote:Already started on it :) patching patching patching, i'll make an announcement soon with the build. Now the thing is, should it go on the 0.8.x or 0.9.x series, meaning newlib 1.16 and newlib 1.17...jojojoris wrote:Can you make a minor update with this fix:
http://forums.ps2dev.org/viewtopic.php?t=11006
https://sourceforge.net/project/showfil ... _id=661742
Just released the 0.9.2 build:
this includes:
* newlib 1.17
* psplink fix for the slim
* C++ exceptions working sample
* installer size reduced by not including NLS messages (only english) because of some issues with japanese users
get it here: http://downloads.sourceforge.net/minpsp ... -0.9.2.exe
this includes:
* newlib 1.17
* psplink fix for the slim
* C++ exceptions working sample
* installer size reduced by not including NLS messages (only english) because of some issues with japanese users
get it here: http://downloads.sourceforge.net/minpsp ... -0.9.2.exe
Heimdall, I'm trying to use Eclipse but I have a problem.
I installed your last toolchain.
I have Eclipse with Qt Integration that I launched
I follow your instructions in your .PDF file about Eclipse.
When I try to build I get this :
Did I miss something ?
I installed your last toolchain.
I have Eclipse with Qt Integration that I launched
I follow your instructions in your .PDF file about Eclipse.
When I try to build I get this :
Code: Select all
**** Build of configuration Default for project Spinning Cube ****
(Cannot run program "make": Launching failed)
Ok found, I just need to have a start.bat (to launch Eclipse for PSPSDK) which setup the environment the right way :
Code: Select all
@echo off
echo Setting up environment for PSPSDK...
set PATH=C:\pspsdk\bin
set PATH=%PATH%;%SystemRoot%\System32
echo Starting eclipse...
call "M:\dev\eclipse\eclipse.exe" -clean
I don't understand...
I was able to debug cube.prx as stated in your eclipse.pdf yesterday or yesterday but one.
but now, when I run pspsh through Eclipse, I have a void console, no message at all. I can type and be sure that they are executed but i cannot see anything except from what I type.
I also tried through cmd.exe. I got the same thing.
SO I tried to type "debug cube.prx" and run Cube Spinning Debug. Eclipse fails to connect.
It drives me crazy.
I was able to debug cube.prx as stated in your eclipse.pdf yesterday or yesterday but one.
but now, when I run pspsh through Eclipse, I have a void console, no message at all. I can type and be sure that they are executed but i cannot see anything except from what I type.
I also tried through cmd.exe. I got the same thing.
SO I tried to type "debug cube.prx" and run Cube Spinning Debug. Eclipse fails to connect.
It drives me crazy.
Some progress but just some. I need to close FireFox so PSPSH can run properly (displaying a prompt like "host0:>") .
And yes debugging is not working properly. When I tried cube.prx (-g -O0), it seemed to work. But with my source (-g O2), I have kind of erratic behavior in the source windows.
In fact, I need to debug per instruction to be sure to follow the execution flow. And the normal "step in", "step over" and "step out" don't seem to work as I used to with visual studio, making them mostly unusable.
There is also an issue with stepping over sce-like functions : it breaks in the stub function (jr $ra; syscal ...) and trying to step out is like resuming execution. Quite an annoyance.
Is that normal ?
And yes debugging is not working properly. When I tried cube.prx (-g -O0), it seemed to work. But with my source (-g O2), I have kind of erratic behavior in the source windows.
In fact, I need to debug per instruction to be sure to follow the execution flow. And the normal "step in", "step over" and "step out" don't seem to work as I used to with visual studio, making them mostly unusable.
There is also an issue with stepping over sce-like functions : it breaks in the stub function (jr $ra; syscal ...) and trying to step out is like resuming execution. Quite an annoyance.
Is that normal ?
Hi, i´m trying to use minpspw with eclipse, i'm reading the pspeclipse document, but i got stuck in the Makefile Discovery Options -> Discovery Options part because the Discovery profile list is empty so i can't set the Compiler Invocation Command to psp-gcc. I've just installed the c/c++ Developers version of eclipse as the tutorial suggested but maybe i'm missing something. Hope someone can help.
Thanks in advance.
Thanks in advance.