[En-Nut-Discussion] config flashspace usage on SAM7X256

Bernd Walter enut at cicely.de
Mon Jun 22 18:31:37 CEST 2009


On Mon, Jun 22, 2009 at 09:30:49AM -0500, Timothy M. De Baillie wrote:
> Bernd,
> 
> I attempted to change the CRT to -mthumb. This is the error I received:
> 
> collect2: ld terminated with signal 11 [Segmentation fault]

Bad thing - ld shouldn't segfault, but anyway - this is just a ugly
symptom of another problem.

> arm-elf/bin/ld: 
> /usr/local/gnuarm/lib/gcc/arm-elf/4.2.3/libgcc.a(_udivsi3.o)(__udivsi3): 
> warning: interworking not enabled.
> first occurrence: nutos/hubblt/libnutcrt.a(fread.o): thumb call to arm
> arm-elf/bin/ld: BFD (GNU Binutils) 2.18 assertion fail elf32-arm.c:6532
> nutos/hubblt/libnutcrt.a(fread.o): In function `fread':
> fread.c:(.text+0x54): dangerous relocation: make: *** [hub.elf] Error 1
> 
> 
> Do I have to install a thumb cross compiler or something? If so, where 
> do I find such a beast.

You also need to enable thumb interwork support, because not everything
can be thumb.
I have:
[1597]devel> grep interwork contrib/ethernut-4.8.2/Makedefs
# Generating code that works with mixed arm and thumb mode (interwork).
CPFLAGS = $(MCFLAGS) -Os -mthumb-interwork -fomit-frame-pointer -Wall -Werror -Wstrict-prototypes -Wa,-ahlms=$(@:.o=.lst) $(DEFS) $(UCPFLAGS) 

Not sure if I added it myself or was default.
-mthumb-interwork is the importent point.
newlib needs this support as well, but usually the linker automatically
selects the right one if you add the parametrs to the linker process
as well.
But the error message clearly says that libnutcrt was missing interwork
support.

-- 
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



More information about the En-Nut-Discussion mailing list