Roe
Well-Known Member
This thread is going to guide you through the process of installing cygwin and the PSP toolchain on Windows to get ready for compiling programs. So with that said, on with the guide!
Step 1: "The Option Screen"
1.Firstly download this file HERE. This is the file that will download all the files needed to run cygwin.
2. Run it and you should get a screen with some info on cygwin on it. Press next and there will be a screen with 3 options. Depending on your situation you can choose any of them:
Option A: Install from Internet: Use this if you are on the computer you want to install cygwin on.
Option B: Download without Installing: Use this if you are on a different computer to the computer you want to install cygwin. It will download what you want to a folder and you can put it on a removable storage device and install it later.
Option C: Install from Local Directory: Use this option if you have the files from using Option B.
3. I will guide you through "Option A" now and make the adjustments necessary for the other two options below.
4. Select Install from Internet and you will be presented with a screen asking you three things:
a. The Root Directory. This is where you want to install cygwin to. The default is "X:/cygwin" but you can change it to wherever you want as long as the path doesnt have any spaces in it.
b. What users you want to install cygwin for. Select "All Users" if you are an Admin of your computer or selct "Just for me" if you don't want anyone else to be able to use it.
c. Default text type. Just keep it at Unix/binary.:wink:
When you've made your choice on those 3 things press Next.
5. Next you'll be asked where you want to download the packages to. I'd suggest browsing to "My Documents" but you can save it anywhere you want. Press Next when done.
6. Just press Direct Connection and move on.
7. It will now download a list of mirrors that you can get your packages from. Select any of the ones available to you and press next.
8. Now it will download a package list for you. There will be a big list of packages to choose from but these are the ones you need:
Devel: Scroll down to D in the list and you will see Devel. Beside it you will see the word "Default" Click on Default and in about 1-2 seconds it will say Install. Keep it that way.
Editors: Scroll down to E and you will see Editors. Beside it you will see the word "Default" Click on Default and in about 1-2 seconds it will say Install. Same as you did for Devel.
Web: Now it's different. Scroll down to W and you will see Web. Click on the + icon next to it and a big list should open up. Scroll down till you get to wget and be sure that it has the latest version number which can be found under the "Current" heading under the "New" heading.
Press Next and you are ready to continue.
9. It will now start to download and install all the packages that you chose. This will take a long time depending on how fast your internet connection is.
Option B Instructions
1. All you have to do is skip the steps 3-4. The only difference is that it doesnt install the files as well as downloading them.
Option C Instructions
1. Follow all the steps as usual except instead of a screen asking you where you want the installation files downloaded to, it will ask you where the files you already downloaded are.
Once it is done, you have succesfully installed cygwin on your system and can move onto installing the PSP toolchain.
Step 2: "Installing the PSP Toolchain"
1. Download this file View attachment 3825 and extract it. Place the .bashrc file into X:/cygwin/home/username/
2. We just need to get two more libraries needed to install the toolchain, GMP and MPFR. To do this just open up Cygwin.bat and copy and paste this block of code into it:
3. Now type the following and press enter.
What this does is download the latest toolchain to install.
4. Go into the psptoolchain directory you just downloaded by typing
and pressing enter.
5. Next type
to execute the file toolchain.sh. This installs the toolchain. It can take a few hours to install so go do something else or leave it running overnight. Be sure to be connected to the internet throughout the installation as it downloads files as it needs them.
If you don't want the trouble of installing the toolchain just download this precompiled one that I made. Thanks to XTM for uploading to the server. TOOLCHAIN(VERY OLD NOW, NOT RECOMMENDED) Just put it at "X:/cygwin/usr/local/pspdev". It also has many libraries included.
When it's finished you are ready to start compiling code for the PSP. Documentation of the functions in the PSP SDK is available HERE. I will explain in the next tutorial how to create and compile a basic program.
If anyone has any questions or suggestions just post below. Also, if anyone wants screenshots included, just say the word. The only reason I didn't include them now is because of my dial-up.
Step 1: "The Option Screen"
1.Firstly download this file HERE. This is the file that will download all the files needed to run cygwin.
2. Run it and you should get a screen with some info on cygwin on it. Press next and there will be a screen with 3 options. Depending on your situation you can choose any of them:
Option A: Install from Internet: Use this if you are on the computer you want to install cygwin on.
Option B: Download without Installing: Use this if you are on a different computer to the computer you want to install cygwin. It will download what you want to a folder and you can put it on a removable storage device and install it later.
Option C: Install from Local Directory: Use this option if you have the files from using Option B.
3. I will guide you through "Option A" now and make the adjustments necessary for the other two options below.
4. Select Install from Internet and you will be presented with a screen asking you three things:
a. The Root Directory. This is where you want to install cygwin to. The default is "X:/cygwin" but you can change it to wherever you want as long as the path doesnt have any spaces in it.
b. What users you want to install cygwin for. Select "All Users" if you are an Admin of your computer or selct "Just for me" if you don't want anyone else to be able to use it.
c. Default text type. Just keep it at Unix/binary.:wink:
When you've made your choice on those 3 things press Next.
5. Next you'll be asked where you want to download the packages to. I'd suggest browsing to "My Documents" but you can save it anywhere you want. Press Next when done.
6. Just press Direct Connection and move on.
7. It will now download a list of mirrors that you can get your packages from. Select any of the ones available to you and press next.
8. Now it will download a package list for you. There will be a big list of packages to choose from but these are the ones you need:
Devel: Scroll down to D in the list and you will see Devel. Beside it you will see the word "Default" Click on Default and in about 1-2 seconds it will say Install. Keep it that way.
Editors: Scroll down to E and you will see Editors. Beside it you will see the word "Default" Click on Default and in about 1-2 seconds it will say Install. Same as you did for Devel.
Web: Now it's different. Scroll down to W and you will see Web. Click on the + icon next to it and a big list should open up. Scroll down till you get to wget and be sure that it has the latest version number which can be found under the "Current" heading under the "New" heading.
Press Next and you are ready to continue.
9. It will now start to download and install all the packages that you chose. This will take a long time depending on how fast your internet connection is.
Option B Instructions
1. All you have to do is skip the steps 3-4. The only difference is that it doesnt install the files as well as downloading them.
Option C Instructions
1. Follow all the steps as usual except instead of a screen asking you where you want the installation files downloaded to, it will ask you where the files you already downloaded are.
Once it is done, you have succesfully installed cygwin on your system and can move onto installing the PSP toolchain.
Step 2: "Installing the PSP Toolchain"
1. Download this file View attachment 3825 and extract it. Place the .bashrc file into X:/cygwin/home/username/
2. We just need to get two more libraries needed to install the toolchain, GMP and MPFR. To do this just open up Cygwin.bat and copy and paste this block of code into it:
Code:
wget ftp://ftp.gmplib.org/pub/gmp-4.2.4.tar.gz
tar xzvf gmp-4.2.4.tar.gz
cd gmp-4.2.4
./configure
make
make check
make install
cp /usr/local/include/gmp.h /usr/include/
cd ..
wget http://www.mpfr.org/mpfr-current/mpfr-2.4.1.tar.gz
tar xzvf mpfr-2.4.1.tar.gz
cd mpfr-2.4.1
./configure
make
make check
make install
cp /usr/local/include/mpfr.h /usr/include/
cd ..
3. Now type the following and press enter.
Code:
svn checkout svn://svn.ps2dev.org/psp/trunk/psptoolchain
4. Go into the psptoolchain directory you just downloaded by typing
Code:
cd psptoolchain
5. Next type
Code:
./toolchain.sh
If you don't want the trouble of installing the toolchain just download this precompiled one that I made. Thanks to XTM for uploading to the server. TOOLCHAIN(VERY OLD NOW, NOT RECOMMENDED) Just put it at "X:/cygwin/usr/local/pspdev". It also has many libraries included.
When it's finished you are ready to start compiling code for the PSP. Documentation of the functions in the PSP SDK is available HERE. I will explain in the next tutorial how to create and compile a basic program.
If anyone has any questions or suggestions just post below. Also, if anyone wants screenshots included, just say the word. The only reason I didn't include them now is because of my dial-up.