[uClinux-dev] gcc for arm7 with -mthumb and flat support

Thomas Eschenbacher Thomas.Eschenbacher at gmx.de
Tue Feb 4 01:31:31 EST 2003


David McCullough wrote:
> Jivin Thomas Eschenbacher lays it down ...
> 
>>Hi,
>>
>>for our application we want to generate code with the thumb instruction
>>set. But for uClinux the application binary format needs to be flat.
>>
>>When I try to use -mthumb with gcc-2.95.3 it says "invalid options". So
>>gcc-2.95.3 produces flat output but no thumb.
> 
> I think (probably wrong) that 2.95.3 can generate thumb code, checkout the
> man page for details,

Sorry, but I cannot find anything about thumb in the man page.

$ arm-elf-gcc -v
Reading specs from /usr/local/lib/gcc-lib/arm-elf/2.95.3/specs
gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from 
http://fiddes.net/coldfire/)(-msep-data patches)

$ arm-elf-gcc -mcpu=arm7tdmi -march=armv4t -mthumb -mthumb-interwork -o 
hello.o -c hello.c
cc1: Invalid option `thumb'

$ arm-elf-gcc -mthumb -o hello.o -c hello.c
cc1: Invalid option `thumb'

I tried with tools-2002-04-10 from uclinux.org and set the target from
arm-elf to thumb-elf. Binutils compile fine, but gcc does not support
this target at configure time:
"Configuration thumb-unknown-elf not supported"

And in the documentation I only see hints that the target "tumb-elf" is
no longer supported, arm-elf and passing -mthumb should do the job from
now on. But it doesn't :-(
This -mthumb option works only with gcc-3.3.
gcc-2.95.3 supports only -mthumb-interwork, and the assembler
understands thumb assembler, but that's not what I want. I want gcc to
generate thumb output, like gcc-3.3 does.

Further on, gcc seems to be able to configure for "thumb-coff", I tried
that, but with this I cannot compile most of the uclinux code as it
relies on some elf specific features - I think coff anyway is no good
choice for us.

bye,
   Thomas
-- 
________________________________________________________________________
Thomas Eschenbacher                           Thomas.Eschenbacher at gmx.de




More information about the uClinux-dev mailing list