Page 1 of 1

iop compile

Posted: Thu Jan 29, 2004 7:00 pm
by superufo
Hi,
I find problem to compile the IOP module, whatever try to compile the sample \ps2lib-2.1\iop\sample\hello\hello.c. the iop-cc keep on running and seems hang up my PC!!! Somebody help please!!!

Posted: Thu Jan 29, 2004 9:11 pm
by blackdroid
probably a case of badly compiled iop-gcc, first of all if you are using an iop-gcc with version 3.2.2 you wont succeed in making any irx's at all.
the latest iop-gcc version (atm gcc-2.8.1) can be found on ps2dev.sf.net and you will have to compile it.

Posted: Thu Jan 29, 2004 10:41 pm
by ooPo
superufo:

1) What version of iop-gcc are you using?

2) Are you using cygwin, linux, or something else? What version?

3) How do you obtain your toolchain? Did you build it yourself?

Give us some info, man! :)

Posted: Fri Jan 30, 2004 3:16 am
by superufo
Hi ooPo and blackdroid,
I am using Windows stuff. I try ps2-ee-dvp-iop-tools-win32.exe(http://ps2dev.sourceforge.net/), and ps2DevEnvironment.exe(http://ps2dev.org/) all give me the same result :( However, is there anyway to get a workable bin???

Posted: Fri Jan 30, 2004 4:16 am
by blackdroid
Those should work.. what does
iop-gcc --version give ?

Posted: Fri Jan 30, 2004 9:13 am
by superufo
Hi,
How can I know what version it is. However, I just download them from there web site and seems it should be the lastest version. Thanks!

Posted: Fri Jan 30, 2004 5:35 pm
by blackdroid
I already said iop-gcc --version

Posted: Fri Jan 30, 2004 5:47 pm
by Guest
oh! thanks, the iop-gcc --version is 2.8.2-ps2dev.

Posted: Thu Feb 05, 2004 11:00 am
by boman666
The iop-compiler in both those precompiled packages is broken. If you invoke the iop-gcc with the -v option, you'll see that it in turn is invoking components of the native compiler instead of the iop components.

I managed to get a working iop-compiler by following the instructions in the iop-tutorial on ps2dev.org. Unfortunately, if you follow the instructions, the compiler won't be able to create binaries in the .irx-format. The binutils-2.9.1 must be built with the --target=mipsel-scei-irx to be able to create binaries in the .irx-format. Then you'll have the prb that gcc-2.8.1 must be built with --target=mipsel-scei-elfl. I fixed that by modifying configure.tgt in binutils-2.9.1/ld, like this:

find the line:

mips*el-*-elf*) targ_emul=elf32elmip ;;

change it to:

mips*el-*-elf*) targ_emul=mipsirx
targ_extra_emuls=elf32elmip
;;

now you can build the binutils-2.9.1 with --target=mipsel-scei-elfl and it'll be able to create .irx-binaries. Invoke iop-ld with the -V option to verify that it's able to build mipsirx.

There is probably a niftier solution but I've spent way to much time on getting the compilers/environment up already.

Posted: Thu Feb 05, 2004 1:27 pm
by superufo
Hi Boman666,
Thankyou very mauch for you useful info, I will test it as your suggestion. :wink:

Posted: Thu Feb 05, 2004 10:46 pm
by ooPo
Why not just use --target=iop for both?

Posted: Fri Feb 06, 2004 5:37 am
by boman666
That's probably one of the niftier solutions I was looking for. Why don't you ppl with this knowledge correct all the errors in the tutorials. For someone new to this environment, it's a real pain to figure out why things don't work.

Posted: Fri Feb 06, 2004 6:01 am
by pixel
Because it requires time :-)

Posted: Fri Feb 06, 2004 6:03 am
by ooPo
Welcome to ps2dev. :)

I try to keep a fairly up-to-date tutorial and patches on my site ( http://www.oopo.net/consoledev ) since other tutorials tend to get lost in the sands of time...