| View previous topic :: View next topic |
| Author |
Message |
webjeff
Joined: 05 May 2005 Posts: 66
|
Posted: Sat Jul 02, 2005 2:42 pm Post subject: 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. |
|
| Back to top |
|
 |
cable16
Joined: 22 Mar 2005 Posts: 22
|
Posted: Sun Jul 03, 2005 5:49 am Post subject: |
|
|
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 :)
Last edited by cable16 on Tue Jul 05, 2005 1:12 am; edited 1 time in total |
|
| Back to top |
|
 |
kecC
Joined: 04 Jul 2005 Posts: 17
|
Posted: Mon Jul 04, 2005 11:41 pm Post subject: |
|
|
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] |
|
| Back to top |
|
 |
cable16
Joined: 22 Mar 2005 Posts: 22
|
Posted: Tue Jul 05, 2005 1:10 am Post subject: |
|
|
my mistake, I already had make installed on my system with dev-cpp, so I didn't think to say where to get it.
open up the pspdev_wo.zip you downloaded, go to pspdev\bin and extract make.exe to c:\pspdev\bin.
try running make again, and it should work. |
|
| Back to top |
|
 |
kecC
Joined: 04 Jul 2005 Posts: 17
|
Posted: Tue Jul 05, 2005 8:09 am Post subject: |
|
|
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! |
|
| Back to top |
|
 |
sq377

Joined: 11 Apr 2005 Posts: 87
|
Posted: Wed Jul 06, 2005 1:42 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Blackwidow
Joined: 26 Jun 2005 Posts: 27
|
Posted: Thu Jul 07, 2005 3:56 am Post subject: |
|
|
| so how do you open up the cygwin console window? cause i can`t figure it out |
|
| Back to top |
|
 |
sq377

Joined: 11 Apr 2005 Posts: 87
|
Posted: Thu Jul 07, 2005 4:15 am Post subject: |
|
|
| you should have a shortcut to it. |
|
| Back to top |
|
 |
Blackwidow
Joined: 26 Jun 2005 Posts: 27
|
Posted: Thu Jul 07, 2005 4:33 am Post subject: |
|
|
| i guess cygwin is not installing right. i tried a bunch of times. any ideas |
|
| Back to top |
|
 |
cable16
Joined: 22 Mar 2005 Posts: 22
|
Posted: Thu Jul 07, 2005 5:40 am Post subject: |
|
|
| if it was installed right, run C:\cygwin\cygwin.bat. Change c:\cygwin to wherever you installed it. |
|
| Back to top |
|
 |
Mangus
Joined: 17 Jun 2005 Posts: 33
|
Posted: Thu Jul 07, 2005 1:04 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
cable16
Joined: 22 Mar 2005 Posts: 22
|
Posted: Sat Jul 09, 2005 1:14 am Post subject: |
|
|
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?t=2494&highlight=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. |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Sat Jul 09, 2005 1:31 am Post subject: |
|
|
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. _________________ Lego of my Ago! |
|
| Back to top |
|
 |
Mangus
Joined: 17 Jun 2005 Posts: 33
|
Posted: Sat Jul 09, 2005 2:16 am Post subject: |
|
|
| my error occurs in compiling, it doesn't recognize a single header, causing many of the functions to no longer work. |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Sat Jul 09, 2005 2:22 am Post subject: |
|
|
do you use the standard build.mak (or w/e it's called in the samples) or do you use your own makefile?
If you use your own Makefile, make sure you do a -L"[path to sdk include directory]". _________________ Lego of my Ago! |
|
| Back to top |
|
 |
Mangus
Joined: 17 Jun 2005 Posts: 33
|
Posted: Sat Jul 09, 2005 2:54 am Post subject: |
|
|
alright here is my error i get when compiling with dev-c++:
| Quote: | | Code: | 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 |
|
Here is my makefile:
| Quote: | | Code: | 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 |
|
Where would i put the
| Quote: | | -L"[path to sdk include directory]". |
on the "PSPSDK" line in the makefile |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Sat Jul 09, 2005 3:00 am Post subject: |
|
|
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.
| Mangus wrote: |
Where would i put the
| Quote: | | -L"[path to sdk include directory]". |
on the "PSPSDK" line in the makefile |
| Code: |
CFLAGS = -O2 -G0 -Wall -L"[path to sdk include directory]" |
_________________ Lego of my Ago! |
|
| Back to top |
|
 |
Mangus
Joined: 17 Jun 2005 Posts: 33
|
Posted: Sat Jul 09, 2005 3:19 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Mangus
Joined: 17 Jun 2005 Posts: 33
|
Posted: Sat Jul 09, 2005 3:31 am Post subject: |
|
|
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.
| Quote: | | Code: | | 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 |
|
it is part of an error i recieve now and the rest is the same as before.
I'm aslo concerned with the " | Code: | | -c -o main.o main.c | " 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? |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Sat Jul 09, 2005 3:32 am Post subject: |
|
|
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. _________________ Lego of my Ago! |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Sat Jul 09, 2005 3:36 am Post subject: |
|
|
| 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? |
That is fine.
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! |
|
| Back to top |
|
 |
Mangus
Joined: 17 Jun 2005 Posts: 33
|
Posted: Sat Jul 09, 2005 4:00 am Post subject: |
|
|
ok, well do you recommend deleting the PSPSDK line or maybe after looking into it i should place , and remove the | Code: | | psp-config --pspsdk-F:/PSPDEV/sdk | 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 | Code: | | -I [dir of sdk's include] | 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 |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Sat Jul 09, 2005 4:06 am Post subject: |
|
|
do you have a PSPSDK variable set?
If not, then do set PSPSDK=[some path], and then delete the one in the build.mak
But remember to use /'s instead of \'s in the PSPSDK path. _________________ Lego of my Ago! |
|
| Back to top |
|
 |
Mangus
Joined: 17 Jun 2005 Posts: 33
|
Posted: Sat Jul 09, 2005 8:35 am Post subject: |
|
|
| 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++. |
|
| Back to top |
|
 |
cable16
Joined: 22 Mar 2005 Posts: 22
|
Posted: Mon Jul 11, 2005 10:05 am Post subject: |
|
|
| Quote: | | 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. |
Well, I got it working now, I wasn't slamming your tutorial or anything, the problem was with my makefiles. I added | Code: | | PSPSDK = $(shell psp-config --pspsdk-path) | and | Code: | | include C:\PSPDev\psp\sdk\lib\build.mak | to them and it started working.[/quote] |
|
| Back to top |
|
 |
Sporff
Joined: 11 Jul 2005 Posts: 2
|
Posted: Mon Jul 11, 2005 12:21 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Mon Jul 11, 2005 4:14 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Sporff
Joined: 11 Jul 2005 Posts: 2
|
Posted: Mon Jul 11, 2005 5:40 pm Post subject: |
|
|
| Nevermind, I figured it out. It actually does work with those win32 versions. |
|
| Back to top |
|
 |
quetz67
Joined: 20 Jul 2005 Posts: 5
|
Posted: Wed Jul 20, 2005 9:48 pm Post subject: |
|
|
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? |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Wed Jul 20, 2005 11:14 pm Post subject: |
|
|
| quetz67 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? |
Your path is wrong. Check out wiki.pspdev.org/psp:programming_faq _________________ Lego of my Ago! |
|
| Back to top |
|
 |
|