forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems getting started (ps2link)

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
Kugeln



Joined: 20 Jun 2004
Posts: 2

PostPosted: Sun Jun 20, 2004 8:30 am    Post subject: Problems getting started (ps2link) Reply with quote

So I decided I'm going to try to get back into programming after quite a while --and what better to start with cross-comiling for the PS2.

I started by building and installing ooPo's beta toolchain on cygwin, then got the ps2sdk downloaded, built and installed from cvs, got the environment set up as best as I can figure it should be.

My problems started when I began trying to build the latest CVS of ps2link.

Code:
Kugeln@neuro /usr/local/ps2dev/src/ps2link
$ make
make -C ee
make[1]: Entering directory `/usr/local/ps2dev/src/ps2link/ee'
ee-gcc -D_EE -O2 -G0 -Wall  -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/p
s2dev/ps2sdk/common/include -I. -I../include -I/usr/local/ps2dev/src/sbv-1.0-lit
e/include -c ps2link.c -o ps2link.o
ee-gcc -D_EE -O2 -G0 -Wall  -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/p
s2dev/ps2sdk/common/include -I. -I../include -I/usr/local/ps2dev/src/sbv-1.0-lit
e/include -c cmdHandler.c -o cmdHandler.o
/cygdrive/c/DOCUME~1/Kugeln/LOCALS~1/Temp/ccUo30aF.s: Assembler messages:
/cygdrive/c/DOCUME~1/Kugeln/LOCALS~1/Temp/ccUo30aF.s:2641: Warning: Macro used $
at after ".set noat"
/cygdrive/c/DOCUME~1/Kugeln/LOCALS~1/Temp/ccUo30aF.s:1961: Warning: Loop length
is too short for r5900.
/cygdrive/c/DOCUME~1/Kugeln/LOCALS~1/Temp/ccUo30aF.s:1961: Warning: Loop length
is too short for r5900.
ee-gcc -D_EE -O2 -G0 -Wall  -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/p
s2dev/ps2sdk/common/include -I. -I../include -I/usr/local/ps2dev/src/sbv-1.0-lit
e/include -c excepHandler.c -o excepHandler.o
excepHandler.c: In function `pkoDebug':
excepHandler.c:78: warning: assignment from incompatible pointer type
ee-gcc -D_EE -O2 -G0 -Wall  -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/p
s2dev/ps2sdk/common/include -I. -I../include -I/usr/local/ps2dev/src/sbv-1.0-lit
e/include -c exceptions.S -o exceptions.o
ee-gcc -D_EE -O2 -G0 -Wall  -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/p
s2dev/ps2sdk/common/include -I. -I../include -I/usr/local/ps2dev/src/sbv-1.0-lit
e/include -c cd.c -o cd.o
ee-gcc -nostartfiles -T/usr/local/ps2dev/ps2sdk/ee/startup/linkfile -L/usr/local
/ps2dev/ps2sdk/ee/lib -L/usr/local/ps2dev/src/sbv-1.0-lite/lib -Wl,-Ttext -Wl,0x
c0000 -Wl,--defsym -Wl,_stack_size=0x8000 -Wl,--defsym -Wl,_stack=0x100000 -s \
        -o ps2link.elf /usr/local/ps2dev/ps2sdk/ee/startup/crt0.o ps2link.o cmdH
andler.o excepHandler.o exceptions.o cd.o -lsbv_patches -ldebug -lkernel -lsysca
ll -lc
/usr/local/ps2dev/ps2sdk/ee/lib/libc.a(sbrk.o)(.text+0x78): In function `ps2_sbr
k':
src/sbrk.c: undefined reference to `EndOfHeap'
collect2: ld returned 1 exit status
make[1]: *** [ps2link.elf] Error 1
make[1]: Leaving directory `/usr/local/ps2dev/src/ps2link/ee'
make: *** [all] Error 2


Any ideas what's causing the undefined ref above? (or the actual problem, if that isn't it).

For reference:

Code:
#!/usr/bin/bash
###################################
### Environment Vars for PS2DEV ###
###################################

PS2DEV=/usr/local/ps2dev
PS2SDK=$PS2DEV/ps2sdk
PS2SDKSRC=$PS2DEV/src/ps2sdk
PS2LIB=$PS2SDK
PS2DRV=$PS2SDK
LIBHDD=$PS2SDK
PS2IP=$PS2SDK
PS2HID=$PS2SDK
SBVLITE=$PS2DEV/src/sbv-1.0-lite
PS2ETH=$PS2DEV/src/ps2eth
PS2LINK=$PS2DEV/src/ps2link
LWIP=$PS2DEV/src/lwip
EE=$PS2DEV/ee
IOP=$PS2DEV/iop
DVP=$PS2DEV/dvp

PATH=$PATH:$PS2DEV/bin:$EE/bin:$IOP/bin:$DVP/bin:$PS2SDK/bin:$PS2SDK/dvp/bin:$PS2SDK/iop/bin:$PS2SDK/ee/bin


export PS2DEV PS2SDK PS2SDKSRC PS2LIB PS2DRV LIBHDD PS2IP SBVLITE PS2ETH PS2LINK LWIP EE IOP DVP PATH
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sun Jun 20, 2004 8:54 am    Post subject: Reply with quote

Someone broke the link order and libraries in ps2sdk. Add another -lc before -lkernel in the Makefile.
Back to top
View user's profile Send private message
Kugeln



Joined: 20 Jun 2004
Posts: 2

PostPosted: Sun Jun 20, 2004 10:20 am    Post subject: Reply with quote

That was it. Thank you.

I ended up changing the ee/Rules.make file for PS2Link from this
Code:
EE_LIBS += -lkernel -lsyscall -lc

to this
Code:
EE_LIBS += -lc -lkernel -lsyscall -lc


Now to figure out how to build some of these demos...


-Kugeln
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group