This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: arm-thumb advice needed
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: Cristian VLASIN <cris at Iv dot ro>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 04 Apr 2002 04:37:12 +0100
- Subject: Re: [ECOS] arm-thumb advice needed
- References: <200203221609.g2MG9M928275@mx1.redhat.com>
Cristian VLASIN wrote:
>
> Hi all,
>
> I'm trying to compile my eCos with thumb and I think something is wrong
> because my binary gets bigger than the non-thumb one.
> Here is what I have done:
> -built the binutils as described for thumb on eCos webpage
> http://sources.redhat.com/ecos/tools/linux-thumb-elf.html (it seems to me
> that the page is similar with the simple arm one - should it be so?)
> -built gcc (3.0.3) also as described there
> -copied an example of redboot (which I have previously compiled for my
> EB40 card)
> -adjusted compiler flags with "-mthumb-interworking" and activated
> thumb+interworking in HAL (it doesn't compile with simple "-mthumb")
> -compiled and obtained a binary which is larger than the first one
>
> Can anyone tell me if I'm right or give me some advice to make it right?
No, -mthumb is what you need, and explains why you're seeing larger
binaries - they are still ARM mode executables, but with extra bits in to
allow it to link with thumb code.
At a guess it doesn't compile because you haven't built your GCC with a
thumb multilib, resulting in errors when linking with libgcc. If so you
need to edit gcc/config/arm/t-arm-elf and rebuild gcc.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss