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 

4.0 Toolchain compiling?

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



Joined: 31 May 2005
Posts: 62

PostPosted: Mon Jun 06, 2005 6:24 pm    Post subject: 4.0 Toolchain compiling? Reply with quote

Hi,

Okay, I got the 4.0 toolchain running but it has no ee-gcc. Whne I compile my stuff with (I figured) psp-gcc it chokes on the asm files, like 'illegal operands la $v0,_gp'

I know a few peeps use this toolchain, could one of them tell me what I am doing wrong?

Thx,
0xdf
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Mon Jun 06, 2005 6:33 pm    Post subject: Reply with quote

ee-as has code which provides symbolic names for MIPS registers. psp-as doesn't have this code. When accessing registers, you will have to use the register number, so instead of $v0 you'll need to use $2.

If you search for a regdef.h header file (newlib has one) and include it, you can get the symbolic names through the C preprocessor.
Back to top
View user's profile Send private message
0xdeadface



Joined: 31 May 2005
Posts: 62

PostPosted: Mon Jun 06, 2005 6:44 pm    Post subject: Reply with quote

Thank you very much!

0xdf
Back to top
View user's profile Send private message
f_bohmann



Joined: 02 May 2005
Posts: 16
Location: hamburg, germany

PostPosted: Wed Jun 08, 2005 9:27 am    Post subject: Reply with quote

mh. i am trying to compile nem's helloworld with the psp-toolchain, and i get the same error. compiling the c files with psp-gcc works fine, but when i get to the startup.s, i get the errors.

following your post i am under the impression that

.include "/usr/local/pspdev/psp/psp/include/machine/regdef.h"

in startup.s should do the trick, but i still can not get "psp-as startup.s" or "psp-gcc -c -xassembler startup.s" to compile the file.

i am new to gcc and friends, so i am a bit lost here.
Back to top
View user's profile Send private message
weak



Joined: 13 Jan 2005
Posts: 114
Location: Vienna, Austria

PostPosted: Wed Jun 08, 2005 9:45 am    Post subject: Reply with quote

i think the name should be startup.S, with capitalized S to invoke the preprocessor.
Back to top
View user's profile Send private message
alonetrio



Joined: 15 May 2005
Posts: 34

PostPosted: Wed Jun 08, 2005 12:40 pm    Post subject: Reply with quote

hi, i am new too with gcc and alike,

i am trying to use the round() funtion

so here is my link directive (using gcc to compil):

psp-gcc startup.o mandelbrot.o -nostartfiles -o out -Wl,-Ttext -Wl,8900000 -lm -lc -lgcc

but i get error :

mandelbrot.o: In function `xmain':
mandelbrot.c:(.text+0x1f00): undefined reference to `__extendsfdf2'
/usr/local/pspdev/psp/lib/gcc/psp/4.0.0/../../../../psp/lib/libm.a(s_round.o): In function `round':
../../../../../newlib/libm/common/s_round.c:58: undefined reference to `__adddf3'
/usr/local/pspdev/psp/lib/gcc/psp/4.0.0/libgcc.a(_fixunsdfsi.o): In function `__fixunsdfsi':
../../gcc/libgcc2.c:1492: undefined reference to `__gedf2'
../../gcc/libgcc2.c:1493: undefined reference to `__subdf3'
../../gcc/libgcc2.c:1493: undefined reference to `__fixdfsi'
../../gcc/libgcc2.c:1494: undefined reference to `__fixdfsi'
collect2: ld returned 1 exit status

any idea ?

AloneTrio
Back to top
View user's profile Send private message Visit poster's website
cin



Joined: 19 Aug 2005
Posts: 7

PostPosted: Wed Sep 14, 2005 11:55 am    Post subject: Have you solve this problem? Reply with quote

I also meet problem like yours.

Have you solve this problem?
and how?



alonetrio wrote:
hi, i am new too with gcc and alike,

i am trying to use the round() funtion

so here is my link directive (using gcc to compil):

psp-gcc startup.o mandelbrot.o -nostartfiles -o out -Wl,-Ttext -Wl,8900000 -lm -lc -lgcc

but i get error :

mandelbrot.o: In function `xmain':
mandelbrot.c:(.text+0x1f00): undefined reference to `__extendsfdf2'
/usr/local/pspdev/psp/lib/gcc/psp/4.0.0/../../../../psp/lib/libm.a(s_round.o): In function `round':
../../../../../newlib/libm/common/s_round.c:58: undefined reference to `__adddf3'
/usr/local/pspdev/psp/lib/gcc/psp/4.0.0/libgcc.a(_fixunsdfsi.o): In function `__fixunsdfsi':
../../gcc/libgcc2.c:1492: undefined reference to `__gedf2'
../../gcc/libgcc2.c:1493: undefined reference to `__subdf3'
../../gcc/libgcc2.c:1493: undefined reference to `__fixdfsi'
../../gcc/libgcc2.c:1494: undefined reference to `__fixdfsi'
collect2: ld returned 1 exit status

any idea ?

AloneTrio
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 -> PSP 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