[En-Nut-Discussion] usps_f405g application build fails

bon at elektron.ikp.physik.tu-darmstadt.de bon at elektron.ikp.physik.tu-darmstadt.de
Tue Sep 17 11:34:29 CEST 2013


>>>>> "Harald" == Harald Kipp <harald.kipp at egnite.de> writes:

    Harald> Hi, On 12.09.2013 18:30, Michael Fischer wrote:
    >> Yes I personal would like to recommend the launchpad version
    >> too. YAGARTO was a one mean show where I every time try to get it
    >> compiled under windows. And in the past it was getting harder to
    >> do. Therefore I decide to stop my work here. The alternative I think
    >> is the launchpad version, where Linux, Windows and Mac versions
    >> exist.

    Harald> Unfortunately, when using this toolchain, linking applications
    Harald> for the Elektor Internet Radio fails with

    Harald> arm-none-eabi-gcc httpd_simple.o urom.o -mcpu=arm7tdmi
    Harald> -nostartfiles -L../../nut/arch/arm/ldscripts
    Harald> -Tat91sam7se512_xram.ld
    Harald> -Wl,-Map=httpd_simple.map,--cref,--no-warn-mismatch
    Harald> -L../../nutbld-eir10c/lib -Wl,--start-group
    Harald> ../../nutbld-eir10c/lib/nutinit.o -lnutpro -lnutnet -lnutgorp
    Harald> -lnutfs -lnutcrt -lnutos -lnutdev -lnutarch -Wl,--end-group -o
    Harald> httpd_simple.elf

    Harald> c:/program files (x86)/gnu tools arm embedded/4.7
    Harald> 2013q2/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld.exe:
    Harald> section .data.__ctype_ptr__ loaded at [200101ac,200101af]
    Harald> overlaps section .init loaded at [200101ac,200101ef]
    Harald> collect2.exe: error: ld returned 1 exit status make: ***
    Harald> [httpd_simple.elf] Error 1

    Harald> When switching back to Yagarto, it links and the executable is
    Harald> running without problems.

I think our linker magic lost it magic power! Any linker script wizard
available?

While playing with crt/putf.c and 64-bit variables, some similar
message popped up for me. It pointed to the exidx section. I fixed by
looking at Building Bare Metal ARM Systems with GNU with:

--- a/nut/arch/cm3/ldscripts/stm32f10x_flash.ld
+++ b/nut/arch/cm3/ldscripts/stm32f10x_flash.ld
@@ -23,9 +23,16 @@ SECTIONS
         *(.glue_7)
        *(.gcc_except_table)
            . = ALIGN(4);
-        _etext = .;
     } > FLASH0
 
+    /* .ARM.exidx is sorted, so has to go in its own output section. */
+    .exidx : {
+        __exidx_start = .;
+        *(..exidx* .gnu.linkonce.armexidx.*)
+        __exidx_end = .;
+    } > FLASH0
+    _etext = .;
+
     .vtable (NOLOAD):
     {
        . = ALIGN(4);

I can confirm your error with eir10c.conf with changing the linker script to
LDSCRIPT = "at91sam7se512_xram"

Harald, can you describe your problem at
https://answers.launchpad.net/gcc-arm-embedded?

Bye

-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------


More information about the En-Nut-Discussion mailing list