![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on Instructions to install Cygwin and the latest psptool chain within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I havnt coded in a long long time and ive got a new laptop and i want to get back ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() |
I havnt coded in a long long time and ive got a new laptop and i want to get back into it. where are step by step instructions to install cygwin and the latest toolchain version. like i said, ive been gone for a while and im not sure what i need and what the most recent releases are. I just want to be able to develop with the latest toolchain/pspsdk and whatever else i need.
im on windows xp just so everyone know Last edited by vodkkaa; 01-23-2009 at 05:33 AM.. |
|
|
|
|
|
#2 |
![]() Enter Custom Title
|
|
|
|
|
|
|
#3 |
![]() |
__________________
[spoiler=My Releases So Far] PSP_Operator v2.0 Final (and earlier; stopped with this one) Mario's Road v2.0 (working on 2.5:D) UMD_Operator v0.0.2 (and earlier; stopped with this one) PSP-Quiz v0.1 (working on v0.2 already:D) [/spoiler] |
|
|
|
|
|
#4 | |
![]() ![]() Enter Custom Title
|
Hi!
![]() Quote:
http://www.sakya.it/wiki/index.php?n=PSP.Cygwinpspsdk Ciaooo Sakya
__________________
"And they're giving me a wonderful potion, 'Cos I cannot contain my emotion. And even though, I'm feeling good, Something tells me, I'd better activate my prayer capsule." Supper's Ready (Genesis) |
|
|
|
|
|
|
#5 |
![]() |
Ok
Thanks for that other one though in the past I had much problems installingCygwin and yours worked fine
__________________
[spoiler=My Releases So Far] PSP_Operator v2.0 Final (and earlier; stopped with this one) Mario's Road v2.0 (working on 2.5:D) UMD_Operator v0.0.2 (and earlier; stopped with this one) PSP-Quiz v0.1 (working on v0.2 already:D) [/spoiler] |
|
|
|
|
|
#6 |
![]() |
i installed using the way tinman gave and everything went well. now ive got two more questions. whats a good editor to use. i am currently using devcppp but everytime i open a source file, i get an error "Windows cannot find the file ........" after i hit OK i get a message from devcpp saying "There doesnt seem to be GNU makefile in PATH or in DevC++ bin path." after i hit ok to that i can finally get working on my code. its kind of annoying to have to go through both of these messages everytime i want to open up a main.c. so can anyone suggest a better editor or a way to fix my problems with devcpp.
my second question is, how do i program for the 3.xx kernel. is there a 3.xx sdk out that inlcudes samples or do i just have to put something in the makefile to allow it to compile as a 3.xx homebrew. |
|
|
|
|
|
#7 |
![]() Enter Custom Title
|
vodkkaa code::blocks works very well from what I have heard.
I've been messing around with code::blocks IDE and setting up psp to compile perfectly with it and I've finally come to finish it after around 1-2 hours of messing. No more need for custom makefiles etc..., even goes as far as to make a eboot file if wanted. %CYGWIN% = path to your cygwin directory Step 1 - Set up your PSPSDK Kit I'm not going to go over this, but the way I set it up was by using cygwin for the sdk. Once you set this up, you can continue on your way :). Step 2 - Setting up your Compiler 1. On the settings tab, press 'Compiler & Debugger'. 2. Select the GNU GCC Compiler and press 'copy'. 3. Type in "PSPCompiler". It should now be your selected tab. 4. Goto the 'Toolchain executables' tab, and set the following: Compiler's installation directory: PATH_TO_PSPSDK (mine is: %CYGWIN%\usr\local\pspdev ) Program Files: C Compiler - psp-gcc.exe C++ Compiler - psp-g++.exe Linker for dynamic libs - psp-g++.exe Linker for static libs - psp-ar.exe Debugger: gdb.exe Resource compiler: windres.exe Make program: make.exe 5. Head to the 'Additional Paths' sub-tab and press add -- add the location to your cygwin bin folder. (mine is: %CYGWIN%\bin) 6. Head back to the "Search Directories" tab. Under compiler, add the following paths: %CYGWIN%\usr\local\pspdev \psp\sdk\include %CYGWIN%\usr\local\pspdev \psp\include Under Linker, add the following paths: %CYGWIN%\usr\local\pspdev \psp\sdk\lib %CYGWIN%\usr\local\pspdev \psp\lib 7. Head back to the "Compiler Settings" tab, and goto #defines I define _PSPSDK for cross-compiling (since i love to compile for linux/windows/psp/windows mobile 6 :p) Congrats! Step 3 - Setting up your first Project Just thank me.. I made this 100x easier for you :). Download the attachment project file to test it :) I advise you to use this as a base for new projects. Step 4 - Customizing your eboot 1. Goto Project -> Build Options 2. Select your PSP-Target 3. Goto the subtab "Custom Variables" 4. Alter these as you please, also allows relative paths. Step 5 - Customizing post-build scripts 1. Goto Project -> Build Options 2. Select your PSP-Target 3. Goto the subtab "Pre/post build steps" 4. The bottom field is for post-build scripts, by default I have it remove the sfo, elf, and stripped-elf file. You can delete the line to change it though Step 6 - Finished Hope this works for you all -- if there is any problems, please tell me and I'll look to have it fixed. If theres anything else I'm missing or if I totally overlooked something and a similar guide existed -- well another isn't bad, right? Via: Ps2dev Edit: your 2nd question. Porting a 1.50 firmware homebrew to 3.xx firmware 3.xx firmwares require your homebrew be in prx format. To get your homebrew in this format, you need to follow a few basic steps: 1. Modify your Makefile - You need to add the following to your Makefile to compile a prx (before the include $(PSPSDK)/lib/build.mak line): Code:
BUILD_PRX = 1 PSP_FW_VERSION = 371 2. Set your homebrew to user mode - Your homebrew needs to start in user mode. To do this, change the 2rd argument in PSP_MODULE_INFO to 0. For most homebrew you will also need to increase your heap size. The heap size is the amount of memory available to malloc. I set mine to 20mb. The bellow code should be at the top of your main source file (normally main.c). Code:
PSP_MODULE_INFO("My Homebrew", 0, 1, 0);
PSP_HEAP_SIZE_KB(20480);
Alternatively you can use PSP_HEAP_SIZE_MAX(); if you have a toolchain compiled on or after Sep. 30th, 2007 (revision 2321). This will allocate as big of a heap as it can. Please note you should recompile your entire toolchain (or at least pspsdk and newlib) to use this, otherwise your homebrew will crash with a Exception - Bus error (data). 3. Try running your app - You should now be able to compile your app with a normal make and copy over the EBOOT.PBP per usual. There is no kxploit or % folder for 3.xx firmware. If you are running your application from psplink, you need to run the prx file instead of the elf file or it will not run. At this point your homebrew should run unless you have kernel calls in your code. If your code has kernel calls you will get a 0x8002013C error when you try to start the homebrew. Don't panic, move on to step 4. If your homebrew runs, great, skip step 4. 4. Locate and deal with your kernel calls - You need to figure out what is a kernel call and what isn't. To do this, you can use prxtool -f <prx file>. Here is a example output: Code:
$ prxtool -f project.prx ... output left out (it's a lot of output) ... Import 9, Name UtilsForUser, Functions 1, Variables 0, flags 40010000 Functions: 0x79D1C3FA [0x0008CF34] - UtilsForUser_79D1C3FA Import 10, Name LoadExecForUser, Functions 2, Variables 0, flags 40010000 Functions: 0x05572A5F [0x0008CF3C] - LoadExecForUser_05572A5F 0x4AC57943 [0x0008CF44] - LoadExecForUser_4AC57943 Import 11, Name IoFileMgrForKernel, Functions 1, Variables 0, flags 00010000 Functions: 0x411106BA [0x0008CF4C] - IoFileMgrForKernel_411106BA Done If you look at the above output you can see there is a import called IoFileMgrForKernel. This import has one function. Refer to this page: http://silverspring.lan.st/1.5x/kd/iofilemgr.html. Search on the page and you will find that 0x411106BA matches the function sceIoGetThreadCwd. You can now search for this function and either (a) replace the kernel call with user mode code -or- (b) move the kernel call into a kernel mode prx and load that kernel mode prx from your homebrew. Option B is out of the scope of this tutorial so search the forums to figure out how to do this. Option A is the preferable solution unless you have to use a kernel call. I went to the main page http://silverspring.lan.st and clicked on 1.5x firmware. From this page I found sceIOFileManager in the list and clicked on it to get to the above page. A search function would have been nice. As for SDK's get the attached SDK, Alex's 4.01 SDK, and this Last edited by tinmanx; 01-23-2009 at 05:54 PM.. |
|
|
|
![]() |
| Tags |
| chain , cygwin , install , instructions , latest , psptool |
| Thread Tools | |
|
|