Windows PSPSDK Help
Windows PSPSDK Help
OK,
I've read the information regarding how to set this up. I have been running code on my 1.0 psp and would like to test some stuff on my 1.5 american psp. But none of the information provided makes any sense for a windows guy like me.
Can someone please post a win32 setup (seems someone already did this, I've got it). But I really need and I think alot of us out here really need a simple tutorial on how to get a hello world in C++ working. This will really help us along. I'm using VS.NET 2003 and would like to use that for the IDE.
Does anyone know anything that could help not only me but the community. I've seen a lot of posts regarding peices of this, but lets just finalize one way of doing it.
Thanks guys
Jeff.
I've read the information regarding how to set this up. I have been running code on my 1.0 psp and would like to test some stuff on my 1.5 american psp. But none of the information provided makes any sense for a windows guy like me.
Can someone please post a win32 setup (seems someone already did this, I've got it). But I really need and I think alot of us out here really need a simple tutorial on how to get a hello world in C++ working. This will really help us along. I'm using VS.NET 2003 and would like to use that for the IDE.
Does anyone know anything that could help not only me but the community. I've seen a lot of posts regarding peices of this, but lets just finalize one way of doing it.
Thanks guys
Jeff.
I had a little trouble too, but got it set up eventually. Try this:
INSTALLATION ----------
1: download TommyKat's PSPSDK 1.0+Beta Win32 installer ( http://forums.ps2dev.org/viewtopic.php?t=2371 )
2: download KaL's Win32 compiled PSP toolchain ( http://ipdred.free.fr/pspdev_wo.zip )
3. install PSPSDK 1.0+Beta to the default directory of c:\PSPdev
4. copy all the DLLs in pspdev_wo.zip's pspdev\bin folder to C:\PSPDev\bin
5. *NEW* copy make.exe in pspdev_wo.zip's pspdev\bin folder to C:\PSPDev\bin
6. edit start.bat so it contains:
- set path=%path%;c:\pspdev\bin
- set PSPSDK=C:\PSPDev\psp\sdk
- cmd
Compiling the sdktest example ----------
1. open C:\PSPDev\psp\sdk\samples\sdktest\Makefile, and remove the " PSPSDK=$(shell psp-config --pspsdk-path) " line.
2. run start.bat inside c:\PSPDev
3. inside the newly-opened CMD navigate to C:\PSPDev\psp\sdk\samples\sdktest
4. type make, and you should get a EBOOT.PBP inside C:\PSPDev\psp\sdk\samples\sdktest
Compiling Nem's Hello World ----------
1. download the Hello World src at http://sec.pn.to/pub/hellopsp_src_Rel1.zip, and extract somewhere
2. you can go ahead and delete mk.bat, outpatch.exe, and outpatch.cpp b/c you won't need them
3. edit hellopsp.c, and :
- add these above the "pg.h" and "bitmap.c" includes:
#include <pspkernel.h>
#include <pspdebug.h>
#include <stdlib.h>
#include <string.h>
- change the xmain function to main
- insert
PSP_MODULE_INFO("HELLOPSP", 0, 1, 1);
right before int main(void)
4. edit pg.c and replace all the pspXXX functions to sceXXX (e.g. pspDisplayWaitVblankStart becomes sceDisplayWaitVblankStart)
5. copy the Makefile (make sure it's had the 'PSPSDK=$(shell psp-config --pspsdk-path)' line removed) from the sdktest to helloworld's folder.
6. edit the Makefile, change OBJS = main.o to OBJS = hellopsp.o pg.o
7. change the eboot title if you want
8. run start.bat inside c:\PSPDev, and navigate to helloworld's folder
9. type/run make
10. should get an EBOOT.PBP inside your helloworld folder
NOTES:
I don't use Visual Studio, so I have no idea how to set it up
the reason you have to change helloworld so much is because it originally uses it's own startup asm code, which isn't needed now b/c of PSPSDK (and PSPSDK's way of doing things is a little different/newer).
to add an icon (ICON0.PNG) to the EBOOTs make gives you, use PBP unpacker ( http://www.pdc.me.uk/pbp/ ).
Hope this helps :)
INSTALLATION ----------
1: download TommyKat's PSPSDK 1.0+Beta Win32 installer ( http://forums.ps2dev.org/viewtopic.php?t=2371 )
2: download KaL's Win32 compiled PSP toolchain ( http://ipdred.free.fr/pspdev_wo.zip )
3. install PSPSDK 1.0+Beta to the default directory of c:\PSPdev
4. copy all the DLLs in pspdev_wo.zip's pspdev\bin folder to C:\PSPDev\bin
5. *NEW* copy make.exe in pspdev_wo.zip's pspdev\bin folder to C:\PSPDev\bin
6. edit start.bat so it contains:
- set path=%path%;c:\pspdev\bin
- set PSPSDK=C:\PSPDev\psp\sdk
- cmd
Compiling the sdktest example ----------
1. open C:\PSPDev\psp\sdk\samples\sdktest\Makefile, and remove the " PSPSDK=$(shell psp-config --pspsdk-path) " line.
2. run start.bat inside c:\PSPDev
3. inside the newly-opened CMD navigate to C:\PSPDev\psp\sdk\samples\sdktest
4. type make, and you should get a EBOOT.PBP inside C:\PSPDev\psp\sdk\samples\sdktest
Compiling Nem's Hello World ----------
1. download the Hello World src at http://sec.pn.to/pub/hellopsp_src_Rel1.zip, and extract somewhere
2. you can go ahead and delete mk.bat, outpatch.exe, and outpatch.cpp b/c you won't need them
3. edit hellopsp.c, and :
- add these above the "pg.h" and "bitmap.c" includes:
#include <pspkernel.h>
#include <pspdebug.h>
#include <stdlib.h>
#include <string.h>
- change the xmain function to main
- insert
PSP_MODULE_INFO("HELLOPSP", 0, 1, 1);
right before int main(void)
4. edit pg.c and replace all the pspXXX functions to sceXXX (e.g. pspDisplayWaitVblankStart becomes sceDisplayWaitVblankStart)
5. copy the Makefile (make sure it's had the 'PSPSDK=$(shell psp-config --pspsdk-path)' line removed) from the sdktest to helloworld's folder.
6. edit the Makefile, change OBJS = main.o to OBJS = hellopsp.o pg.o
7. change the eboot title if you want
8. run start.bat inside c:\PSPDev, and navigate to helloworld's folder
9. type/run make
10. should get an EBOOT.PBP inside your helloworld folder
NOTES:
I don't use Visual Studio, so I have no idea how to set it up
the reason you have to change helloworld so much is because it originally uses it's own startup asm code, which isn't needed now b/c of PSPSDK (and PSPSDK's way of doing things is a little different/newer).
to add an icon (ICON0.PNG) to the EBOOTs make gives you, use PBP unpacker ( http://www.pdc.me.uk/pbp/ ).
Hope this helps :)
Last edited by cable16 on Tue Jul 05, 2005 1:12 am, edited 1 time in total.
cable16 I've done all you have said, but when i have to type "make" for get the EBOOT.PBP of sdktest, it doesn't works.
It says me (i'm spanish and i don't know how can I translate that, I'm going to try) "make" isn't recognized like a internal or external comand, program or other thing [archivo por lotes ejecutable].
I think the problem is something related to the path. I've seen the Enviorement Variables (in My Computer) and exist another variable called path of the MS Visual Studio .NET, but i don't know if it's that or another thing.
Could you help me?
Thank you!
Byezz
[Sorry, my english is very poor]
It says me (i'm spanish and i don't know how can I translate that, I'm going to try) "make" isn't recognized like a internal or external comand, program or other thing [archivo por lotes ejecutable].
I think the problem is something related to the path. I've seen the Enviorement Variables (in My Computer) and exist another variable called path of the MS Visual Studio .NET, but i don't know if it's that or another thing.
Could you help me?
Thank you!
Byezz
[Sorry, my english is very poor]
I've done that, but continuos without work.
If you prefer, tell me how can I install Dev-Cpp with make for it works.
Thanks.
kecC
EDIT: A get it! I have put the Variables in Enviorement Variable (on My computer), and I write the line " PSPSDK=$(shell psp-config --pspsdk-path) " in the Makefile, and it works me!
Thanks for all!
If you prefer, tell me how can I install Dev-Cpp with make for it works.
Thanks.
kecC
EDIT: A get it! I have put the Variables in Enviorement Variable (on My computer), and I write the line " PSPSDK=$(shell psp-config --pspsdk-path) " in the Makefile, and it works me!
Thanks for all!
I made a tutorial for this with pics. (from installing cygwin to putting the compiled sample on the psp.
http://psplinuxdev.com/ click on the side psp-sdk.
http://psplinuxdev.com/ click on the side psp-sdk.
-
- Posts: 27
- Joined: Sun Jun 26, 2005 5:43 am
-
- Posts: 27
- Joined: Sun Jun 26, 2005 5:43 am
hey cable16, would you mind sharing how you setup Dev-cpp (I'm guessing your reffering to Bloodshed) and the config file you used I also use Bloodshed's ide and seems to be giving me some trouble. I would appreciate a little walkthrough similar to your above post for setting up the PSPSDK and toolchain. Thanks in advanced.
actually I haven't set up pspsdk to work with dev-cpp. I had a copy of make.exe (needed by PSPSDK) already on my PC, that had been installed with a totally unrelated install of dev-c++.
Agoln recently made a tutorial ( http://forums.ps2dev.org/viewtopic.php? ... light=devc ) for setting dev-c++ with the sdk, but it won't work for me. I'll try to figure it out, and post as soon as I can.
Agoln recently made a tutorial ( http://forums.ps2dev.org/viewtopic.php? ... light=devc ) for setting dev-c++ with the sdk, but it won't work for me. I'll try to figure it out, and post as soon as I can.
What doesn't work about it? I know that I have an error or two with the pic's, I kinda threw the tutorial together in about 30 minutes on my lunch break at work, today at lunch I will be fixing the couple of pictures (mainly I said that there was a psp-gdb and MAKEFILE.bat instead of build.mak.cable16 wrote:Agoln recently made a tutorial ( http://forums.ps2dev.org/viewtopic.php? ... light=devc ) for setting dev-c++ with the sdk, but it won't work for me. I'll try to figure it out, and post as soon as I can.
Lego of my Ago!
alright here is my error i get when compiling with dev-c++:
Here is my makefile:Code: Select all
Compiler: PSP SDK Complier Executing make... make.exe -f "Makefile" all psp-gcc -I. -Ipsp-config -I--pspsdk-F:/PSPDEV/sdk/include -O2 -G0 -Wall -c -o main.o main.c main.c:14:23: error: pspkernel.h: No such file or directory main.c:15:22: error: pspdebug.h: No such file or directory main.c:16:20: error: stdlib.h: No such file or directory main.c:17:20: error: string.h: No such file or directory main.c:20: error: parse error before string constant main.c:20: warning: type defaults to 'int' in declaration of 'PSP_MODULE_INFO' main.c:20: warning: data definition has no type or storage class main.c:23: error: parse error before '|' token main.c:23: warning: type defaults to 'int' in declaration of 'PSP_MAIN_THREAD_ATTR' main.c:23: warning: data definition has no type or storage class main.c: In function 'exit_callback': main.c:33: warning: implicit declaration of function 'sceKernelExitGame' main.c: In function 'CallbackThread': main.c:43: warning: implicit declaration of function 'pspDebugScreenPrintf' main.c:45: warning: implicit declaration of function 'sceKernelCreateCallback' main.c:45: error: 'NULL' undeclared (first use in this function) main.c:45: error: (Each undeclared identifier is reported only once main.c:45: error: for each function it appears in.) main.c:46: warning: implicit declaration of function 'sceKernelRegisterExitCallback' main.c:48: warning: implicit declaration of function 'sceKernelSleepThreadCB' main.c: In function 'dump_threadstatus': main.c:55: error: 'ThreadStatus' undeclared (first use in this function) main.c:55: error: parse error before 'status' main.c:58: warning: implicit declaration of function 'sceKernelGetThreadId' main.c:59: warning: implicit declaration of function 'memset' main.c:59: warning: incompatible implicit declaration of built-in function 'memset' main.c:59: error: 'status' undeclared (first use in this function) main.c:62: warning: implicit declaration of function 'sceKernelReferThreadStatus' main.c: In function 'SetupCallbacks': main.c:81: warning: implicit declaration of function 'sceKernelCreateThread' main.c:84: warning: implicit declaration of function 'sceKernelStartThread' main.c: In function 'main': main.c:92: warning: implicit declaration of function 'pspDebugScreenInit' main.c:93: error: 'g_elf_name' undeclared (first use in this function) main.c:97: warning: implicit declaration of function 'sceKernelSleepThread' make: *** [main.o] Error 1 Execution terminated
Where would i put theCode: Select all
TARGET = sdktest OBJS = main.o INCDIR = CFLAGS = -O2 -G0 -Wall CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) LIBDIR = LDFLAGS = EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = SDK Test v1.0 PSPSDK := psp-config --pspsdk-F:/PSPDEV/sdk include F:/PSPDEV/lib/build.mak
on the "PSPSDK" line in the makefile-L"[path to sdk include directory]".
One quick question... in your code, do you do includes like "stdio.h" or <stdio.h>
If you use ""s, then use <>'s for standard headers, while ""s for headers you make yourself.
<>'s say to look for the headers in the standard header location, while ""s are usually for relative path's.
If you use ""s, then use <>'s for standard headers, while ""s for headers you make yourself.
<>'s say to look for the headers in the standard header location, while ""s are usually for relative path's.
Mangus wrote: Where would i put theon the "PSPSDK" line in the makefile-L"[path to sdk include directory]".
Code: Select all
CFLAGS = -O2 -G0 -Wall -L"[path to sdk include directory]"
Lego of my Ago!
i'm using the standard <> style, the source i'm attempting to compile is actually the sdktest source.
I guess i should explain, I have the directories in the Dev-C++ set to folders that I made that contain many of the files from the sdk folders and the PSPDev's folders as well (in other words I took the includes from PSPdev/include, PSPDev/psp/include, and PSPDev/psp/sdk/include and stuck them in the PSPDEV/include folder on another HDD, i did this for bin, include, lib, and i copied the folder sdk for PSPDev/psp and placed it in my HDD that has the new PSPDEV folder on it.)
i'm trying to see if i can compile on the Dev-C++ with out creating my own makefile (let Dev-C++ auto-generate one for me, but it always creates one improperly) i want to use the new PSPDEV folder mentioned above to keep the number of directory paths to a min in the Dev-C++>Tools>Compiler Options>Directories, which now point to my new folders for the include and other things
I guess i should explain, I have the directories in the Dev-C++ set to folders that I made that contain many of the files from the sdk folders and the PSPDev's folders as well (in other words I took the includes from PSPdev/include, PSPDev/psp/include, and PSPDev/psp/sdk/include and stuck them in the PSPDEV/include folder on another HDD, i did this for bin, include, lib, and i copied the folder sdk for PSPDev/psp and placed it in my HDD that has the new PSPDEV folder on it.)
i'm trying to see if i can compile on the Dev-C++ with out creating my own makefile (let Dev-C++ auto-generate one for me, but it always creates one improperly) i want to use the new PSPDEV folder mentioned above to keep the number of directory paths to a min in the Dev-C++>Tools>Compiler Options>Directories, which now point to my new folders for the include and other things
should i delete the PSPSDK line or keep the current one, because after adding what you told me to to CFLAGS i get this and i don't think it is right.
I'm aslo concerned with the "" part it appears to be placing the .c source file after the .o object file, but the -c command is already stated before the -o is, i don't know why it is doing this perhaps you do?
it is part of an error i recieve now and the rest is the same as before.Code: Select all
psp-gcc -I. -Ipsp-config -I--pspsdk-F:/PSPDEV/sdk/include -O2 -G0 -Wall -L"F:/PSPDEV/sdk/include" -c -o main.o main.c
I'm aslo concerned with the "
Code: Select all
-c -o main.o main.c
I think I may have messed up when telling you to do a -L for includes, -L is used for libraries, while -I is used for includes.
While I am unsure of this or not... I believe that if you specify that you wish to use your own Makefile in Dev-C++, then adding directories to the Compiler Options->directories setting woudln't do anything. I believe that a bulk of those options are for if you are having Dev-C++ make the Makefile for you.
As for moving files around, I would just modify the make file so that it has a -I[path to sdk include] and -L[path to libraries] in the cflags.
While I am unsure of this or not... I believe that if you specify that you wish to use your own Makefile in Dev-C++, then adding directories to the Compiler Options->directories setting woudln't do anything. I believe that a bulk of those options are for if you are having Dev-C++ make the Makefile for you.
As for moving files around, I would just modify the make file so that it has a -I[path to sdk include] and -L[path to libraries] in the cflags.
Lego of my Ago!
That is fine.Mangus wrote: it appears to be placing the .c source file after the .o object file, but the -c command is already stated before the -o is, i don't know why it is doing this perhaps you do?
What gcc is doing is that you specify that you wish to only compile it, but don't build an executble (-c). Then you specify that you wish to name the output file main.o (-o main.o). At the end, you are just telling it what file you wish to compile, (main.c).
Lego of my Ago!
ok, well do you recommend deleting the PSPSDK line or maybe after looking into it i should place , and remove the that currently is there, i don't think that psp-config is neccesary because i would be telling where the SDK is and then i wouldn't even need to put in the CFLAGS, because the make file calls build.mak, which puts the value stored in PSPSDK and adds /include to the end of it on the list of options following the psp-gcc command
Code: Select all
-I [dir of sdk]
Code: Select all
psp-config --pspsdk-F:/PSPDEV/sdk
Code: Select all
-I [dir of sdk's include]
yeah but its not helping any, i've given up on running the original make file. have you successfully made a eboot.pbp using the dev-c++ and if so just explain how. I recommend that a new, more compatible makefile be written for Dev-C++ and some one figure out a proper way to group the folders of the include, lib, etc. I'm lost because this seems like the makefiles and locations of the include, lib, etc. folders aren't compatible with Dev-C++.
Well, I got it working now, I wasn't slamming your tutorial or anything, the problem was with my makefiles. I addedWhat doesn't work about it? I know that I have an error or two with the pic's, I kinda threw the tutorial together in about 30 minutes on my lunch break at work, today at lunch I will be fixing the couple of pictures (mainly I said that there was a psp-gdb and MAKEFILE.bat instead of build.mak.
Code: Select all
PSPSDK = $(shell psp-config --pspsdk-path)
Code: Select all
include C:\PSPDev\psp\sdk\lib\build.mak
this works fine and dandy for me. I can compile C programs just fine.
Is there a way of getting this to work with C++ though? From what i've read, everyone who gets the same errors has been told to just install the latest sdk but i can't seem to get how to do it when using the win32 versions of things posted by cable16
Is there a way of getting this to work with C++ though? From what i've read, everyone who gets the same errors has been told to just install the latest sdk but i can't seem to get how to do it when using the win32 versions of things posted by cable16
The win32 installers don't install the latest SDK. To be sure you have the latest, you have to run ooPo's toolchain.sh from psptoolchain.
Yeah, I know I promised a beta last week, but we'll get a new one out soon enough, and most of these problems will disappear.
Yeah, I know I promised a beta last week, but we'll get a new one out soon enough, and most of these problems will disappear.
Your path is wrong. Check out wiki.pspdev.org/psp:programming_faqquetz67 wrote:I cant get it to work, make gives me:
psp-gcc -I. -IC:\PSPDev\psp\sdk\/include -O2 -G0 -Wall -c -o hellopsp.o hellop
sp.c
make: psp-gcc: Command not found
make: *** [hellopsp.o] Error 127
Dont understand why, there is a psp-gcc.exe in PSPDev\bin (and he finds the make there)
And ideas?
Lego of my Ago!