Building PS2 Toolchains and PS2SDK in MingW


There has been some trouble with building the PS2 toolchains in Cygwin and therefor I tried to build the PS2 toolchains in MinGW instead, which can be considered to be a lightweight version af Cygwin. This tutorial will cover how to build the toolchains and also offer binaries of the toolchain for MinGW.h2. Installing MinGW

Windows Vista

If you are trying to build the toolchains under Windows Vista, then the process is a little different. Please read the instructions for building in Windows Vista in this post by chp on the PS2Dev forums, before reading the rest of this tutorial. I have mirrored the files required in the Vista instructions by chip here:

First of all you need to download the following files

The MinGW and MSYS files can also be downloaded from the MinGW website . The mingw-packages-ps2dev is a file I have put together to ease the process of building the PS2 toolchains, it contains bison, flex, libiconv and libtool from GnuWin32 , Subversion , wget and Pthreads Win32.

First of all you need to install MinGW and choose to the current package and also choose to install MinGW make. Next install MSYS and choose y (yes) to the post install and follow the instructions. In the directory where you choose to install MSYS, there is a file named rxvt.exe in the bin directory, rename this file something else, like rxvt2.exe. Now extract the contents of the mingw-packages-ps2dev archive into the directory where you installed MinGW, when asked if you wish to overwrite files which already exist, choose no to all. You are now ready to build the PS2 toolchains.

Installing the PS2 toolchains

First thing you need to do is to add the PS2Dev enviroment variables your MSYS login script. This is done by adding the following to etc/profile in the MSYS directory. Use an editor which supports Unix file format like Crimson Editor (Preferences → File → Save in Unix format) to edit the file.

export PS2DEV=/usr/local/ps2dev
export PATH=$PATH:$PS2DEV/bin
export PATH=$PATH:$PS2DEV/ee/bin
export PATH=$PATH:$PS2DEV/iop/bin
export PATH=$PATH:$PS2DEV/dvp/bin
export PS2SDK=$PS2DEV/ps2sdk
export PATH=$PATH:$PS2SDK/bin

Once you have done this, you are ready to either build the PS2 toolchains yourself or download the ones I have compiled.

Option 1: Build the PS2 toolchains (recommended)

Log into MinGW using MSYS (you should have a shortcut on your desktop). Now export the ps2toolchain scripts by ooPo from ps2dev on Github using the following command in a directory without spaces (you can check this by typing pwd )

git clone

Change to the ps2toolchain directory (cd ps2toolchain) and type


This will start the process of building the PS2 toolchains, ps2sdk and ps2client, see the Cygwin tutorial for more details. Once this is done, you need to copy over the pthreadGC2.dll file to the directoy where ps2client is installed (in MSYS, local/ps2dev/bin), you either do this manually or by typing

cp /mingw/lib/pthreadGC2.dll $PS2DEV/bin

That is it, you are done. If you run into trouble try this thread on PS2Dev forums.

Option 2: Download the PS2 toolchains

If you wish to just download the PS2 toolchains for MinGW, first create the directory local/ps2dev in the directory where you can MSYS have installed (where the bin, doc, etc. are) and download the following files and extract them into the local/ps2dev directory.

Windows XP – Built July 28th 2007