Page 1 of 1

Development Environment

Posted: Thu Dec 02, 2004 1:52 pm
by spaaarky21
I am really interested in developing software for PS2 but the dev tools are giving me trouble. I've been programming in C/C++ for over seven years but have always used IDE's (Metrowerks CodeWarrior mostly) and have little direct experience with command line compilers like GCC. I am developing on a Windows system and installed the "PS2Dev Environment for Win32" from ps2dev.org but haven't had any luck using it. The version of Cygwin that comes with it seems a little too incomplete and the included version of GCC gives me an error that a command (I can't remember which one) cannot be found when I try to specify a file. So, what I am wondering is whether anyone has had any luck using a graphic front end with the dev kit - either on Windows or Linux. If so, is there anywhere to download a complete package with the tools and front end? I think an easy to use, all-inclusive development kit with a decent front end would be an unbelievably huge asset to the PS2 development community. Even an online compiler (upload source code and it spits out a binary) like the one at http://www.comeaucomputing.com/tryitout/ would be great.

Also, while I am writing. Is there anywhere on the internet that has a collection of compiled PS2 binaries? I am interested in trying ps2ftp or ps2ftpd but obviously can't compile the code since I can't get the tools setup right. Is there any chance anyone would be willing to compile the ELF for me? :-))

-Brandon

Posted: Thu Dec 02, 2004 5:35 pm
by Guest
Fantastic idea you have there about an IDE, but as far as I know, none exist. In theory, any existing IDE that supports a GNU toolchain could take the cross-compilers, maybe someone else who has done/seen this can speak up.

Undoubtedly IDEs exist in commercial PS2 development packages, but those would not be under consideration here.

Honestly, you may be better off just getting help on properly installing your toolchain, than trying to track down an IDE, unless someone else can point out a free GNU-toolchain-based IDE. And learn how to dev from command line. Some of us wouldn't use an IDE even if a gun was pointed to our heads. :)

Posted: Thu Dec 02, 2004 6:17 pm
by Saotome
i also think it would be better to get the commandline toolchain running. i was also just using ide's before, and had no real problems installing the toolchain. once its done all you have to do is type 'make' and then run your elf-file ;)
ok, actually i had enough time (about 1 month) to find out how to install and use the toolchain (you can find all necessary info in this forum) until i finaly got my network adaptor.

Posted: Thu Dec 02, 2004 8:19 pm
by evilo
There IS people using an IDE with the cross-compiler, I've downloaded one myself, but still not using it because I'm too lazy to setup the whole thing !!

More seriously, you can for example use dev-c++ (free one):
http://www.bloodshed.net/dev/devcpp.html

and use the same method that the one described here to add support for the ps2 cross compiler:
http://www.bloodshed.net/dev/SetDevCPPArm.pdf

I know that shazz has successfully installed/configured it...

personnaly, I'm still using cygwin & ultraEdit (note that last versoin rocks!!!)

Posted: Fri Dec 03, 2004 12:38 am
by mharris
I was able to successfully get Eclipse to use the Cygwin-based EE and IOP cross-compilers on Win32. You'll need to get the CDT (C/C++ Dev Tools) as well, but you install them within the Eclipse IDE. Eclipse is pretty memory-hungry, so I wouldn't recommend using it on a PC with less than 256Mb RAM.

It was really more of a "proof of concept" than anything else... I did use it for a while, and was able to generate valid ELF and IRX files. But some things were a little painful (IMHO), so decided I was happier using Linux and Emacs. YMMV.

I've never been too fond of IDEs (and GUIs in general) for programming anyhow... I guess I'm just a fossil, and old habits die hard.

IDE

Posted: Fri Dec 03, 2004 4:23 am
by xtreme3d
Finally!
Now I can make more stuff because it's easier to compile.
(No more manual compiling!!)

=-)

Posted: Fri Dec 03, 2004 4:57 am
by spaaarky21
I always wonder what on earth could be going through someone's head when they say that they prefer command line compilers to IDE's. :-) I would love to give it a try but can't get it setup right. Perhaps someone could help me out a bit. When I install the ps2dev.org kit, it has a partial version of Cygwin included. The only problem is that it is missing some very basic commands like 'ls' and another one that GCC relies on. I also get an error about having no /temp directory when I first open bash. I tried installing the latest version Cygwin from the Cygwin web site but then I get errors about having conflicting DLL's. Could someone please tell me whether or not to install Cygwin, where I need to install the ps2dev.org kit so I can actually get to it in Cygwin, and how (using GCC) to build an ELF.

It sounds to me like it might be easier to just do my compiling on my Linux machine. To do that, I would have to build the PS2 toolchain. But, if I do that, will it create conflicts with the existing version of GCC? Or will it just add mips support to it? Do the project makefiles tell the compiler which platform to generate code for? I suppose if I used Linux I might even be able to use KDevelop with a little coersion. :-)

-Brandon

Posted: Fri Dec 03, 2004 5:41 am
by MrHTFord
You wont get conflicts when using linux (or cygwin) because the ps2 compilers use prefixes (ee-gcc, iop-gcc) to avoid this.

Regarding your Cygwin problems, just just go to www.cygwin.com and download a later version if you want to persist with the Win32 method.

Oopo's got a toolchain script that you can use:-

http://www.oopo.net/consoledev/files/toolchain.sh

It will download unmodifed gcc sources, the ps2 patches, apply the patches and build the targets for you. It should work under both Cygwin and Linux, provided you've got lots of harddisk space for it to play with.

I prefer command lines to IDEs because I often find IDEs to be fiddly (where is that option to do blah/blah), inflexible (not being able to specify the full range of commands to the command line programs the IDE invariably calls), memory hogging bloatware. YMMV.

Welcome and good luck!

Posted: Sat Dec 04, 2004 7:04 am
by spaaarky21
MrHTFord wrote:Oopo's got a toolchain script that you can use:-

http://www.oopo.net/consoledev/files/toolchain.sh
I must say that script is pretty awesome. I ran it on my Linux machine last night. I tried it once without using "su" first and it got an error (permissions for writing a file I would assume) but I tried again as root and the build appears to have succeeded.

BUT, now I can't seem to get them to run. I tried "make" from the shell while in a project's directory but got an error that the command ee-gcc could not be found. I did a search and found it (usr/local/ps2dev/ee/bin/ee-gcc) but apparently make cannot find it. How would I go about fixing this?

Posted: Sat Dec 04, 2004 8:21 am
by apache37
You can change the EE-GCC variable in your makefile or better yet make a symlink from /usr/bin:

ln -s /usr/local/ps2dev/ee/bin/ee-gcc /usr/bin/ee-gcc

Posted: Sat Dec 04, 2004 9:37 am
by ooPo
Or you could read the top part of the toolchain.sh script for the environment variables to use...

Posted: Sat Dec 04, 2004 6:24 pm
by spaaarky21
ooPo wrote:Or you could read the top part of the toolchain.sh script for the environment variables to use...
Sorry to be such a newbie but could you explain that a little? Should I edit toolchain.sh and run it again to install ee-gcc and the rest to the necessary directory? Or should I edit the build files for the project I am trying to compile? Or is it neither of the two?

Posted: Sat Dec 04, 2004 11:39 pm
by blackdroid
you should as ooPo said, read the top of toolchain.sh ( READ, not EDIT ).
there you have something called PS2DEV SETTINGS, which is a bunch of environment variables that you need to set in order for your shell you find the compiler, and in order for projects to find PS2SDK which might be needed, all of these environment variables should be placed in a startup script for your shell ( if bash then .bash_profile ) so you dont have to
export them each time.

The toolchain.sh

Posted: Sun Dec 05, 2004 6:14 am
by AngelSephiroth
Hey guys, I finally got around with the toolchain.sh, thanks to all of you and especially oopo, just one question after the toolchain.sh finishes downloading everything do i have to set the paths for it? like the gcc path and the ps2lib path, or does it do that for you? also after it finishes do you have to re-boot your computer?.... sorry if these questions are lame but i'm kinda slow these days, trying and pushing my brain to overload to learn alot about ps2 dev.

- AngelSephiroth

Posted: Sun Dec 05, 2004 2:28 pm
by ooPo
Open toolchain.sh with a text editor. Read the instructions at the top of the script. It lists the paths you must add as well as other interesting information.

Posted: Mon Dec 06, 2004 7:18 am
by AngelSephiroth
hmm, well after i ran the toolcahin.sh when it was all done( or i guess it was finishing doing everything) i saw that before cygwin-dos box went to a new line it said ERROR FOR PS2SDK, not sure what error it just said error for ps2sdk, is this a problem for the compiler? also i set the variables, i had to change them a little cause it full didnt match to what mine was (c:\cygwin/usr/local/ps2dev - thats where the ps2dev folder was produced), also when i go to compile a source i type make but it said command not found.... i dont know exactly how it was easy for you guys to set-up the ps2 enviorment but i'm having alot of trouble :(......

- AngelSephiroth