psptoolchain under Mac OS X

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

Moderators: cheriff, TyRaNiD

Post Reply
bulb
Posts: 50
Joined: Thu Jan 19, 2006 10:59 pm

psptoolchain under Mac OS X

Post by bulb »

Hi,

I have recently acquired a Macbook and wanted to start some PSP development on it. I was using already built pspdevkit on my Windows machine before, so I was totally new to the building process of PSP SDK.

I have used nice instructions on http://www.ragnaru.com/, though I could not complete build without errors. Well, only the psplinkusb wasn't built, PSP SDK was.

Maybe the psptoolchain has been changed after the guy on http://www.ragnaru.com/ made his tutorial or my system was cleaner than his - I didn't install any required package by hand, I was only using MacPorts and here lies the problem. MacPorts installs everything in /opt directory, but psplinkusb requires certain things in /usr directory.

Here are further steps if you want to successfully build psplinkusb on Mac OS X:

1. Assuming you are in the psptoolchain directory, type: cd build

2. Type:

export C_INCLUDE_PATH="/opt/local/include"
export CPLUS_INCLUDE_PATH="/opt/local/include"
export LIBRARY_PATH="/opt/local/lib"

3. Change psplinkusb/Makefile.clients to make SDL version of remotejoy (remove conditional build):

$(MAKE) -C tools/remotejoy/pcsdl all
$(MAKE) -C tools/remotejoy/pcsdl install
$(MAKE) -C tools/remotejoy/pcsdl clean

4. Change /psplinkusb/tools/remotejoy/pcsdl/Makefile:

Add -DSOL_TCP=6 to CFLAGS

5. Build psplinkusb with ../scripts/009-psplinkusb.sh

You can get away with symbolic links (for step 2 and 3), though I favour this approach. Missing definition workaround is really nasty, I would really like to know which required package I am missing.

Regards,
B.
BlackDiamond
Posts: 16
Joined: Sat Jul 02, 2005 7:31 pm
Location: Paris, FRANCE

Post by BlackDiamond »

For step 4, you should instead add to CFLAGS -DSOL_TCP=IPPROTO_TCP since this is the equivalent under Mac OS X (and, I guess, other BSDs). I already found find all those by trial and error. Maybe something like:

Code: Select all

#ifndef SOL_TCP
	#define SOL_TCP IPPROTO_TCP
#endif
should be added in one of the header files.

Btw, I actually use Eclipse for easy remote debugging :p. Can XCode work well with psp-gdb?
bulb
Posts: 50
Joined: Thu Jan 19, 2006 10:59 pm

Post by bulb »

I haven't tried XCode yet, had to solve a problem with usbhostfs_pc first. Will post how XCode fares.
Post Reply