Windows GCC Help Needed
Windows GCC Help Needed
Hi! New to the PS2 dev scene and need some help...
Ideally would like to be able to get the Windows PS2 Development Environment up and running properly. I already tried the whole cygwin/binutils/patches/gcc-ee/gcc-iop thing, but got lost amongst all the makes/configs/patches etc. and didn't come close to building a working compiler; I then did a bit of assembly coding using a (homemade) R5900 assembler, but ran into a dead end beyond simple 2d bitmaps. So that brings me back to gcc.
I downloaded said 'Windows PS2 Development Environment' (you know- the one with everything all pre-compiled and ready to go? Just what I was looking for!), got at installed, etc. great. Having trouble though getting anything to compile (even 'void main(void) {}'). I copied over crt0.s and crt0.o and not get errors reading...
crt0.o: In function '_start':
crt0.s:48: Undefined reference to '_stack'
crt0.s:48: Undefined reference to '_stack'
crt0.s:49: Undefined reference to '_stack_size'
crt0.s:49: Undefined reference to '_stack_size'
crt0.s:60: Undefined reference to '_heap_size'
crt0.s:60: Undefined reference to '_heap_size'
collect2: ld returned 1 exit status
This is when I use 'ee-gcc main.c' on my 'int main(void) {}' program. Anyone got any idea on what I'm doing wrong? Really keen to get into this- been trying for weeks and it's really driving me crazy!!!!
Thanks guys any help would be GREATLY appreciated!!!!
Ideally would like to be able to get the Windows PS2 Development Environment up and running properly. I already tried the whole cygwin/binutils/patches/gcc-ee/gcc-iop thing, but got lost amongst all the makes/configs/patches etc. and didn't come close to building a working compiler; I then did a bit of assembly coding using a (homemade) R5900 assembler, but ran into a dead end beyond simple 2d bitmaps. So that brings me back to gcc.
I downloaded said 'Windows PS2 Development Environment' (you know- the one with everything all pre-compiled and ready to go? Just what I was looking for!), got at installed, etc. great. Having trouble though getting anything to compile (even 'void main(void) {}'). I copied over crt0.s and crt0.o and not get errors reading...
crt0.o: In function '_start':
crt0.s:48: Undefined reference to '_stack'
crt0.s:48: Undefined reference to '_stack'
crt0.s:49: Undefined reference to '_stack_size'
crt0.s:49: Undefined reference to '_stack_size'
crt0.s:60: Undefined reference to '_heap_size'
crt0.s:60: Undefined reference to '_heap_size'
collect2: ld returned 1 exit status
This is when I use 'ee-gcc main.c' on my 'int main(void) {}' program. Anyone got any idea on what I'm doing wrong? Really keen to get into this- been trying for weeks and it's really driving me crazy!!!!
Thanks guys any help would be GREATLY appreciated!!!!
Thank you!!!
Oopo, you are a freaking genius!!!! That seemed to have done the trick (with a minor adjustment). I am forever in your debt! Can't wait to get into some real coding action- just have to brush up on my C skills now (obviously it's been a while :) )
Thanks again for the quick rely!
Thanks again for the quick rely!
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
Canadian Genius
Allen, John F.: Physicist. co-discoverer of superfluidity
Altman, Sidney: 1989 Nobel Prize winner in chemistry.
Banting, Frederick: 1923 Nobel Prize winner in medicine. co-discoverer of insulin
Brockhouse, Bertram: 1994 Nobel Prize winner in physics.
Best, Charles: co-discoverer of insulin with Banting
Giauque, William Francis: 1949 Nobel Prize Winner in Chemistry
Gosling, James: Programmer. inventor of Java
Herzberg, Gerhard: 1971 Nobel Prize winner in chemistry
Hubel, David: 1981 Nobel Prize winner in medicine
Marcus, Rudolph: 1992 Nobel Prize winner in Chemisty
Osler, Sir William: Physician. "most influential physician in history"
Penfield, Wilder: Neurosurgeon. discovered electrical stimulation of the brain
Polanyi, John: 1986 Nobel Prize winner in chemistry
Schawlow, Arthur: 1981 Nobel Prize winner in physics (for lasers)
Scholes, Myron: 1997 Nobel Prize winner in Economics
Smith, Michael: 1993 Nobel Prize winner in chemistry
Taube, Henry: 1983 Nobel Prize winner in chemistry
Taylor, Richard: 1990 Nobel Prize winner in physics
Vickrey, William: 1996 Nobel Prize winner in economics
Wilson, Tuzo: Geophysicist. plate tectonics
And now....
Oopo: PS2 Dev master. Winner of Ibanez's "Best guy ever"
Altman, Sidney: 1989 Nobel Prize winner in chemistry.
Banting, Frederick: 1923 Nobel Prize winner in medicine. co-discoverer of insulin
Brockhouse, Bertram: 1994 Nobel Prize winner in physics.
Best, Charles: co-discoverer of insulin with Banting
Giauque, William Francis: 1949 Nobel Prize Winner in Chemistry
Gosling, James: Programmer. inventor of Java
Herzberg, Gerhard: 1971 Nobel Prize winner in chemistry
Hubel, David: 1981 Nobel Prize winner in medicine
Marcus, Rudolph: 1992 Nobel Prize winner in Chemisty
Osler, Sir William: Physician. "most influential physician in history"
Penfield, Wilder: Neurosurgeon. discovered electrical stimulation of the brain
Polanyi, John: 1986 Nobel Prize winner in chemistry
Schawlow, Arthur: 1981 Nobel Prize winner in physics (for lasers)
Scholes, Myron: 1997 Nobel Prize winner in Economics
Smith, Michael: 1993 Nobel Prize winner in chemistry
Taube, Henry: 1983 Nobel Prize winner in chemistry
Taylor, Richard: 1990 Nobel Prize winner in physics
Vickrey, William: 1996 Nobel Prize winner in economics
Wilson, Tuzo: Geophysicist. plate tectonics
And now....
Oopo: PS2 Dev master. Winner of Ibanez's "Best guy ever"
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
Yeah, got a good list of the opcodes and was pretty simple (compared to making a CISC assembler anyway!)- used Delphi to start to make an IDE with it, but gave it up. Hope to get into the demo scene once I get going; been coding demos since the old C64/Amiga days and done some DirectX games, so plenty of C/assembly experience, but definitely not a *nix guru, so am *not* liking GCC and the whole toolchain rubbish! (am looking at the gcc.gnu.org page now to learn how to use it).
blackdroid: Can I cash in my bmx ninja points for dumb questions?
blackdroid: Can I cash in my bmx ninja points for dumb questions?
Stuck again
Ok blackdroid, lets see if there are any Swedish geniuses... I got the 'hello world' sample program working with ps2lib (I didn't know you could just type 'make' doh!). But having trouble with the 'starsim' demo (the real simple one by Sjeep- hey a fellow kiwi!)- cant seem to be able to call the functions in hw.s. Even adding a DmaReset() line in the hello world program says
Undefined reference to 'DmaReset'
(I do have "#include "hw.h" in my source). I am completely baffled, no doubt it is something trivial, but I am stumped- very frustrating because the code part is easy- just compiling is the hard part!!!
Ok so 100 bmz ninja points to anyone who can help out a fellow code monkey here :)
Undefined reference to 'DmaReset'
(I do have "#include "hw.h" in my source). I am completely baffled, no doubt it is something trivial, but I am stumped- very frustrating because the code part is easy- just compiling is the hard part!!!
Ok so 100 bmz ninja points to anyone who can help out a fellow code monkey here :)
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
Yeah got that much figured out, just trying to work out how to feed gcc the hw.s file with my hello.c- I tried using the 'as' command, but the register values aren't defined, I guess I could put those definitions in, but surely there must be an easier way (there should be a gcc switch or a line in my makefile perhaps?)
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
Well, well, looks like the first Swedish genius has been spotted, disregarding a few insignificants (Nobel, Swedenborg, et. al).
With a bit of tinkering got it working...
ee-gcc -c hw.s
once I removed crt0.o from the directory (don't know why, but google told me and it worked..)
Nothing can stop me now!!!!!!! (hmmm we'll see!)
With a bit of tinkering got it working...
ee-gcc -c hw.s
once I removed crt0.o from the directory (don't know why, but google told me and it worked..)
Nothing can stop me now!!!!!!! (hmmm we'll see!)
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
Haha- have a little faith blackdroid! :) Make good progress on my own graphics library already, popping polygons all over the place now, will do some 3d maths functions today (can almost do this blindfolded now- been doing this since the early 80s!). The only problem is that the PS2 ethenet cables are not out in New Zealand yet (expected in March), so I have to do my testing on an emulator, which running on a 500Mhz P3 is sloooooow :P
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact: