Newlib compilation broken for ARMv6-M
Dirk Behme
dirk.behme@googlemail.com
Wed Jul 2 18:39:00 GMT 2008
I try to build newlib 1.16 with arm-none-eabi-gcc 4.2.3 (Sourcery G++
Lite 2008q1-126). This is able to compile code for ARMv6-M. Newlib
configuration with this results in
MULTIDIRS = thumb thumb2 armv6-m
With this, I get the following errors:
While compiling with -mthumb -march=armv7:
newlib-1.16.0/newlib/libc/machine/arm/setjmp.S:123: Error: SP not
allowed in register list -- `stmea a1!,{v1-v7,fp,ip,sp,lr}'
newlib-1.16.0/newlib/libc/machine/arm/setjmp.S:145: Error: SP not
allowed in register list -- `ldmfd a1!,{v1-v7,fp,ip,sp,lr}'
While compiling with -mthumb -march=armv6-m:
newlib-1.16.0/newlib/libc/sys/arm/trap.S:88: Error: lo register
required -- `sub ip,sp,ip'
newlib-1.16.0/newlib/libc/sys/arm/crt0.S:30: Error: selected processor
does not support ARM opcodes
newlib-1.16.0/newlib/libc/sys/arm/crt0.S:57: Error: attempt to use an
ARM instruction on a Thumb-only processor -- `mov r0,#0x16'
newlib-1.16.0/newlib/libc/sys/arm/crt0.S:58: Error: attempt to use an
ARM instruction on a Thumb-only processor -- `adr r1,.LC0'
...
newlib-1.16.0/newlib/libc/machine/arm/setjmp.S:123: Error: attempt to
use an ARM instruction on a Thumb-only processor -- `stmea
a1!,{v1-v7,fp,ip,lr}'
newlib-1.16.0/newlib/libc/machine/arm/setjmp.S:132: Error: attempt to
use an ARM instruction on a Thumb-only processor -- `mov a1,#0'
...
and some more similiar errors.
Note that I don't need ARMv6-M newlib, therefore I just disabled the
broken parts. I just want to compile newlib with this compiler for
ARM9 processor. To get this working, I used hack in attachment. It's
mainly wrong, but I want to get things compiling. Maybe it helps for
proper fixing.
Dirk
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: newlib_1_16_0_armv6m_hack.txt
URL: <http://sourceware.org/pipermail/newlib/attachments/20080702/55a50ab6/attachment.txt>
More information about the Newlib
mailing list