This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: ARM SDT2.51 vs arm-elf-gcc
- From: "David Airlie" <David dot Airlie at parthus dot com>
- To: "dnt ly" <lydnt at hotmail dot com>
- Cc: David dot Airlie at parthus dot com, ecos-discuss at sources dot redhat dot com
- Date: 15 Apr 2002 11:29:22 +0100
- Subject: Re: [ECOS] ARM SDT2.51 vs arm-elf-gcc
Oh yeah I forgot to give the rest of the information..
you need to extract some function from ADS's ARM library and you also need
to implement the __rt_raise() function yourself .. this is sort of
documented in the ARM manuals...
I needed to extract rt_memcpy.o, rt_udiv.o rt_div0.o rt_memcpy_w.o using
them armar -x command, and I took them from the c_a__un.b library, the arm
documents what libs are what also ... different ones for big/little
endian, interworking, floating point, arm/thumb...
Dave.
On Sat, 13 Apr 2002, dnt ly wrote:
>
> >>
> >>I've attached the script perhaps other might find it useful,
> >thanks!
> >>I've also put the build down on my development board and it didn't
> >>work,
> >>it boots, the idle thread seems to be running but not of my user
> >>threads
> >>seem to get started, might get some time to hack on it over the
> >>next while
> >>..
> >I have done it with a test code(compile with ADS), and finsh linking
> >it,
> >but the test code which call malloc and free can't link correctly
> >address
> >which in eCos libarary. have you had problem in it?
> here is my code and assember
>
> compile 'getsystemlanuage' in ADSv1.1 and link with arm-elf-ld(2.95.3).
> any one can help me?
>
>
> char *getsystemlanuage(int id)
> {
> char *p;
> ...
> p = (char*)malloc( 32 );
> ...
> }
>
>
> 0c1205a8 <getsystemlanuage>:
> c1205a8: e92d4038 stmdb sp!, {r3, r4, r5, lr}
> c1205ac: e1a05000 mov r5, r0
> c1205b0: e3a04000 mov r4, #0 ; 0x0
> c1205b4: e3a00064 mov r0, #100 ; 0x64
> c1205b8: eb0058fc bl c1369b0 <free+0x18>
> ^^^^^^^^^^^^^^^^^
> c1205bc: e1a01000 mov r1, r0
> c1205c0: e5c15000 strb r5, [r1]
> c1205c4: e1a00001 mov r0, r1
> ...
>
> 0c136998 <free>:
> c136998: e1a0c00d mov r12, sp
> c13699c: e92dd800 stmdb sp!, {r11, r12, lr, pc}
> c1369a0: e24cb004 sub r11, r12, #4 ; 0x4
> c1369a4: e24dd004 sub sp, sp, #4 ; 0x4
> c1369a8: e50b0010 str r0, [r11, -#16]
> c1369ac: e51b0010 ldr r0, [r11, -#16]
> c1369b0: ebffff8c bl c1367e8
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> c1369b4: e91ba800 ldmdb r11, {r11, sp, pc}
>
> vvvvvvvvvvvvvvvvvvv
> 0c1369b8 <malloc>:
> c1369b8: e1a0c00d mov r12, sp
> c1369bc: e92dd800 stmdb sp!, {r11, r12, lr, pc}
> c1369c0: e24cb004 sub r11, r12, #4 ; 0x4
> c1369c4: e24dd004 sub sp, sp, #4 ; 0x4
> c1369c8: e50b0010 str r0, [r11, -#16]
> c1369cc: e59f3018 ldr r3, [pc, #18] ; c1369ec <malloc+0x34>
> ...
>
>
> _________________________________________________________________
> ¦b http://explorer.msn.com.hk/intl.asp §K¶O¤U¸ü MSN Explorer
>
--
David Airlie, Software Engineer, Parthus Technologies plc.,
Mary Rosse Centre, National Tech Park, Limerick, Ireland.
t: +353-61-508116 / f: +353-61-508101 / David.Airlie@parthus.com
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss