EmbDev.net

Forum: ARM programming with GCC/GNU tools Problem with gnu ld and STM32


Author: Thomas H. (Guest)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Hello,
I'm trying to make anSTM32F103 work with the Code Sourcery tool chain. 
Using the attached ld command file, I get these errors:

Invoking: Cross GCC Linker
gcc -L"/home/Tommi/workspace/FWLib/Release" -Wl,-T ../SRC/STM32_Lnk.cmd 
-o "LED01"  ./SRC/core_cm3.o ./SRC/main.o ./SRC/startup_stm32f10x_hd.o 
./SRC/stm32f10x_it.o   -lFWLib
collect2: ld terminated with signal 11 [Segmentation fault]
/home/Tommi/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/. 
./lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueab 
i/bin/ld:  BFD (Sourcery CodeBench Lite 2011.09-70) 2.21.53.20110905 
assertion fail 
/scratch/jwlemke/2011.09-arm-linux-eabi-lite/obj/binutils-src-2011.09-70 
-arm-none-linux-gnueabi-i686-pc-linux-gnu/bfd/elf32-arm.c:7504
/home/Tommi/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/. 
./lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueab 
i/bin/ld:  BFD (Sourcery CodeBench Lite 2011.09-70) 2.21.53.20110905 
assertion fail 
/scratch/jwlemke/2011.09-arm-linux-eabi-lite/obj/binutils-src-2011.09-70 
-arm-none-linux-gnueabi-i686-pc-linux-gnu/bfd/elf32-arm.c:7504
/home/Tommi/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/. 
./lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueab 
i/bin/ld:  BFD (Sourcery CodeBench Lite 2011.09-70) 2.21.53.20110905 
assertion fail 
/scratch/jwlemke/2011.09-arm-linux-eabi-lite/obj/binutils-src-2011.09-70 
-arm-none-linux-gnueabi-i686-pc-linux-gnu/bfd/elf32-arm.c:7504
/home/Tommi/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/. 
./lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueab 
i/bin/ld:  BFD (Sourcery CodeBench Lite 2011.09-70) 2.21.53.20110905 
assertion fail 
/scratch/jwlemke/2011.09-arm-linux-eabi-lite/obj/binutils-src-2011.09-70 
-arm-none-linux-gnueabi-i686-pc-linux-gnu/bfd/elf32-arm.c:13826
make: *** [LED01] Fehler 1

**** Build Finished ****

What is wrong?

Thanks for your help,

Tommi

Author: Klaus Wachtler (mfgkw)
Posted on:

Rate this post
0 useful
not useful
Thomas H. wrote:
> Hello,
> I'm trying to make anSTM32F103 work with the Code Sourcery tool chain.
> Using the attached ld command file, I get these errors:
>
> Invoking: Cross GCC Linker
> gcc -L"/home/Tommi/workspace/FWLib/Release" -Wl,-T ../SRC/STM32_Lnk.cmd
> ...

Are you sure you want to invoke gcc?
This will probably be your local compiler/linker.


I don't know your toolchain, but I would assume the compiler/linker 
could look like arm-anything-gcc.

Author: Thomas H. (Guest)
Posted on:

Rate this post
0 useful
not useful
Ok, I forgot:

I'm working on Linux, first in my path is a local directory that 
contains symbolic links to the CodeSourcery tools. The message:

/home/Tommi/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/. 
./lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueab 
i/bin/ld:
BFD (Sourcery CodeBench Lite 2011.09-70) 2.21.53.20110905 assertion fail

tells me, that I actually invoke "arm-none-linux-gnueabi/bin/ld"

Right?

Author: Thomas H. (Guest)
Posted on:

Rate this post
0 useful
not useful
Ok, I found it:
I downloaded arm-none-linux-gnueabi because I am working on linux as 
development platform. Bad idea! This is for building application with a 
linux on the target.
I should have downloaded arm-none-eabi, which is the 'bare metal' tool 
chain for a 'naked' controller.
I'm starting over now, following the "getting-started" that was provided 
with the tool chain.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.