iop compile

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
superufo
Posts: 9
Joined: Wed Jan 21, 2004 3:15 am
Location: Canada

iop compile

Post 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!!!
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post 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.
Kung VU
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post 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! :)
superufo
Posts: 9
Joined: Wed Jan 21, 2004 3:15 am
Location: Canada

Post 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???
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

Those should work.. what does
iop-gcc --version give ?
Kung VU
superufo
Posts: 9
Joined: Wed Jan 21, 2004 3:15 am
Location: Canada

Post 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!
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

I already said iop-gcc --version
Kung VU
Guest

Post by Guest »

oh! thanks, the iop-gcc --version is 2.8.2-ps2dev.
boman666
Posts: 33
Joined: Fri Jan 30, 2004 10:25 am
Location: Hell

Post 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.
superufo
Posts: 9
Joined: Wed Jan 21, 2004 3:15 am
Location: Canada

Post by superufo »

Hi Boman666,
Thankyou very mauch for you useful info, I will test it as your suggestion. :wink:
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Why not just use --target=iop for both?
boman666
Posts: 33
Joined: Fri Jan 30, 2004 10:25 am
Location: Hell

Post 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.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Because it requires time :-)
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post 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...
Post Reply