forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Perfected Code::Blocks method?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
mjoey



Joined: 31 Mar 2008
Posts: 4

PostPosted: Mon Mar 31, 2008 5:01 am    Post subject: Perfected Code::Blocks method? Reply with quote

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.
http://rapidshare.com/files/103615479/PSPSDK.zip.html

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?[/b]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group