Perfected Code::Blocks method?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
mjoey
Posts: 4
Joined: Mon Mar 31, 2008 2:36 am

Perfected Code::Blocks method?

Post by mjoey »

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]
Post Reply