![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on [Tutorial]The Easy + Quick Way To Start Developing in C/C++!! within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; EDIT:Tutorial Added. Enjoy! P.S. Since this text is automatically formatted, there may be some spaces where they don't need to ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 | |
|
EDIT:Tutorial Added. Enjoy!
P.S. Since this text is automatically formatted, there may be some spaces where they don't need to be. So if you see spacing like "controlle r", understand that i didn't do that on purpose and that it should be "controller". ###INTRODUCTION### For some months now, I have been wanting to start/try developing for the PSP in C/C++. I read some of the tutorials explaining how to set up and use mingw or cygwin. Most of the tutorials were complex, and required a lot of downloading of huge files. I have dial-up, so I couldn’t really sit there all day and watch these files download. I am sure some others feel this way also. Anyways, I think that this may be one of the easiest and quickest(because of the small download sizes)ways to set up the PSPSDK, and the toolchain/compiler on a windows machine. So here we go: ###INSTALLATION### 1.) Go download the precompiled windows toolchain/compiler + PSPSDK from: http://xorloser.com/PSPDevWin32.zip 2.) Extract the .zip file somewhere on your hard-drive. 3.) Launch the .exe file and go through the installation. You should install the package to X:\pspdev\ where X is the letter of your hard-drive. This directory is the default setting on the installer anyways. 4.) Find your way to your x:\pspdev\ folder using the Windows Explorer. Create a new .bat file in that folder and name it whatever you want. I named mine start.bat. Next, make sure your .bat file includes the following code: Code:
set path=%path%;x:\pspdev\bin set PSPSDK=x:\pspdev\psp\sdk cmd 6.) Use the Windows search engine to search for a file called cygwin1.dll. Look at the file properties for all of the results and keep the newest one in x:\pspdev\bin\. Delete the other older files. I use the cygwin1.dll file with the build date of 2006-01-20 13:28 and it works great. If you don’t delete the other files the compiler will get an error. 7.) Now, you are done! Congrats, you have a working psptoolchain and PSPSDK along with the compilers installed on your computer. ###COMPILING AN EXAMPLE FILE### a.) Double-click your .bat file that you created in step 4 of the installation. It should start with the command prompt saying something like this: Code:
C:\pspdev>set path=C:\Python24\.;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WSG32\;C:/pspdev/bin;C:/pspdev2/bin;c:\pspdev\bin C:\pspdev>set PSPSDK=C:\pspdev\psp\sdk C:\pspdev>cmd Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\pspdev> b.) Type cd psp\sdk\samples\controlle r\basic and hit enter to go to the x:\pspdev\psp\sdk\samples \controller\basic directory. You should get something like this: Code:
C:\pspdev\psp\sdk\samples\controller\basic> You should get something like this in the command prompt and and eboot in the x:\pspdev\psp\sdk\samples \controller\basic folder: Code:
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o main.o main.c
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -LC:/pspdev/psp/sdk/l
ib main.o -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lp
spnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -
o controller_basic.elf
psp-fixup-imports controller_basic.elf
mksfo 'Basic controller sample' PARAM.SFO
psp-strip controller_basic.elf -o controller_basic_strip.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL \
NULL NULL NULL \
NULL controller_basic_strip.elf NULL
rm -f controller_basic_strip.elf
C:\pspdev\psp\sdk\samples\controller\basic>
###Conclusion### So did you like this tutorial? Any feedback/suggestions/problems is welcome. dalejrrocks@rambler.ru or nascar_sk8ing_technology@ yahoo.com. Or PM me on the forums. Enjoy, Nick/dalejrrocks ----------------------------------------------------- ----------------------------------------------------- This came straight from xorloser.com Quote:
EDIT: You don't need cygwin or mingw with this. Read the later posts + the tutorial. Last edited by dalejrrocks; 05-25-2006 at 08:06 PM.. Reason: Added a tutorial |
||
|
|
|
|
|
#3 |
|
I hope so. I am downloading it now, but it's taking me a while on dialup. Dialup sucks. It would be nice if this could compile eboots because that would allow more people to get into C developing easier and cygwin and mingw are big to download on slow connection. Wow, that's some compression.
|
|
|
|
|
|
|
#5 |
![]() ![]() Psp Dev
|
No you don't need cygwin. It uses DOS instead. I personally wouldnt use it because the toolchain is outdated.
|
|
|
|
|
|
#6 | ||
|
FROM THE README FILE INCLUDED WITH THE PACKAGE:
Quote:
Quote:
|
|||
|
|
|
|
|
#7 |
![]() ![]() ...in a dream...
|
...I love you![]() :humpe d:![]() the toolchain wont install via cygwin... so this shall be mine...
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#9 |
![]() ![]() ...in a dream...
|
Ahh... what do you mean other ones? I uninstalled cygwin now, i had them both installed, but now im reinstalling fresh...
I did what you said and itnsaid it couldnt find make or w/e... im retrying now without cygwin installed
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#10 |
|
You mean step 6 right? Well, go search for cygwin1.dll . I came up with like three results. Then you can right click them and look at properties. I looked at build date. Find the newest one and then right click and delete the older files. Put the newest one in the X:\psp\bin folder. Make sure you only have one cygwin1.dll file left on your pc. does that help? I had cygwin installed at first and it compiled with it installed too. Then I deleted it and it compiles fine without it.
|
|
|
|
|
|
|
#11 |
![]() ![]() ...in a dream...
|
....
Code:
C:\pspdev>set path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Sys rogram Files\Zone Labs\ZoneAlarm\MailFrontier";C:\Program Files\ \2.0\bin;C:/pspdev/bin;C:/pspdev/bin;C:\pspdev\bin C:\pspdev>set PSPSDK=C:\pspdev\psp\sdk C:\pspdev>cmd Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\pspdev>cd psp\sdk\samples\controller\basic C:\pspdev\psp\sdk\samples\controller\basic>make make: psp-config: Command not found Makefile:16: /lib/build.mak: No such file or directory make: *** No rule to make target `/lib/build.mak'. Stop. C:\pspdev\psp\sdk\samples\controller\basic>
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#12 |
|
Go to the controller/basic folder and open up makefile in notepad! Then make sure you have this line: "PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak" if that doesnt work go to your .bat file that you made and make sure that you have this line : "set PSPSDK=x:\pspdev\psp\sdk "
Does that work? I just tried it and it compiled fine. |
|
|
|
|
|
|
#13 |
![]() ![]() ...in a dream...
|
where 'x' is my drive?
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#15 |
![]() ![]() ...in a dream...
|
yes... its all right... the makefile, the batch file...
Code:
C:\pspdev\psp\sdk\samples\controller\basic>dir Volume in drive C has no label. Volume Serial Number is 8024-A36B Directory of C:\pspdev\psp\sdk\samples\controller\basic 05/25/2006 08:34 PM <DIR> . 05/25/2006 08:34 PM <DIR> .. 05/18/2006 06:56 AM 2,953 main.c 05/18/2006 06:56 AM 304 Makefile 2 File(s) 3,257 bytes 2 Dir(s) 64,711,352,320 bytes free C:\pspdev\psp\sdk\samples\controller\basic>make make: psp-config: Command not found Makefile:16: /lib/build.mak: No such file or directory make: *** No rule to make target `/lib/build.mak'. Stop. C:\pspdev\psp\sdk\samples\controller\basic>
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#16 |
|
Remove the space between the samples and the \ symbol, it was there because of text formating and try. The problem is somewhere in your paths. Or try uninstalling the whole package and then reinstalling and going through the steps again.
Last edited by dalejrrocks; 05-25-2006 at 09:30 PM.. |
|
|
|
|
|
|
#17 |
|
and you don't have to type in the dir command. Sorry for the double-post.
Your .bat file that you made should look like this (your drive is c, right?) : set path=%path%;C:\pspdev\bin set PSPSDK=C:\pspdev\psp\sdk cmd Last edited by dalejrrocks; 05-25-2006 at 09:32 PM.. |
|
|
|
|
|
|
#18 |
![]() ![]() Psp Dev
|
Must have updated it then. I remember the old Win32 version.
Hmm when I type make I get... C:\PSPDev\psp\sdk\samples \controller\basic>make 'make' is not recognized as an internal or external command, operable program or batch file. Last edited by MikePiP; 05-25-2006 at 09:32 PM.. |
|
|
|
|
|
#19 |
|
MikePiP : Make a .bat file like the tut says and launch it like any app. That should work. It will define the paths and then you can just use cd to get wherever you need to and type make as long as there's a makefile in that directory.
Well, I g2g to bed. I got school tomorrow. Good Luck! :icon_smil Just follow the tutorial closely. It works. Last edited by dalejrrocks; 05-25-2006 at 09:43 PM.. |
|
|
|
|
|
|
#20 |
![]() ![]() Psp Dev
|
Well I have it all set up. I pretty much know what im doing... except why Im getting this error.
My start.bat looks like this: set path=%path%;C:\pspdev\bin set PSPSDK=C:\pspdev\psp\sdk cmd Its pointing right to where the make batch is so... I don't get why its giving me this error. |
|
|
|
|
|
#21 |
|
Your folder name is different for your actual folder and in your batchfile look:
"C:\PSPDev\psp\sdk\sample s \controller\basic>make" <<<<<< PSPDev "set path=%path%;C:\pspdev\bin <<<<< pspdev set PSPSDK=C:\pspdev\psp\sdk <<<<< pspdev cmd" Try changing the folder names. |
|
|
|
|
|
|
#22 |
![]() ![]() Psp Dev
|
O O. Sorry I accidently installed it over the old version. I uninstalled it and reinstalled now. Thats why your seeing that.
EDIT: I fixed it. Last edited by MikePiP; 05-26-2006 at 10:05 AM.. |
|
|
|
|
|
#23 |
![]() |
When I run this, I get:
Code:
C:\pspdev\psp\sdk\samples\controller\basic>make process_begin:CreateProcess((null), psp-config --pspsdk-path, ...) failed. Makefile:16: /lib/build.mak: No such file or directory make: *** No rule to make target `/lib/build.mak'. Stop. C:\pspdev\psp\sdk\samples\controller\basic> |
|
|
|
|
|
#24 |
|
I am not sure because I didn't get this error. Try uninstalling everything and trying again. Follow the tutorial and make sure that your paths are correct. And read the previous posts, there maybe a solution somewhere in there for you. When you get it to work, tell me what was wrong so I can add it to the tutorial as a common error.
Thanks Last edited by dalejrrocks; 05-26-2006 at 03:57 PM.. |
|
|
|
|
|
|
#25 | |
![]() ![]() Psp Dev
|
No My folder names are the same. That wasnt my problem.
I left the enviroment as the installer did. I just added cmd to the end. It worked ![]() Quote:
2. You get that second error because it can't find build.mak |
|
|
|
|
|
|
#26 |
|
Go check and see if build.mak exists. It should, I've installed this many times and it was always there. And if you have the old Win32 version of this delete it, and the new one, and reinstall the new one.
Or try this: (MikePip's version of your .bat file) set PSPDEV=C:/pspdev set PATH=%PATH%;%PSPDEV%/bin cmd I've tried both my and Mike's .bat files and they both work perfectly. If these posts aren't any help, try listing exactly what you did or follow the tutorial EXACTLY. Good Luck |
|
|
|
|
|
|
#28 | ||
![]() |
Quote:
Quote:
|
||
|
|
|
|
|
#30 |
![]() |
i like the tutorial but i have an problem i created the start.bat and typed wot u say and when i run it i get this:
C:\pspdev>set path=C:\PROGRAMAS\FICHEIR OS COMUNS\ADOBE\AGL;C:\Progr amas\Panda So ftware\Panda Platinum 2005 Internet Security\;C:\pspdev\bin C:\pspdev>set PSPSDK=C:\pspdev\psp\sdk C:\pspdev>cmd 'cmd' is not recognized as an intern or extern command, operational program or batch file. help needed please!!! Double Post Merge the cmd thing is not working any sugestions???? Double Post Merge well someone know how to run an .exe file using a .bat??? if yes tell me and i can put this working Double Post Merge WORKING NOW!!!!!!!!! i copy/paste the cmd.exe from system32 into the pspdev folder |
|
|
|
![]() |
| Tags |
| c or c , developing , easy , quick , start , tutorialthe |
| Thread Tools | |
|
|