EmbDev.net

Forum: ARM programming with GCC/GNU tools Yagarto: interwork library doesn't support interworking?


Author: Dan Miller (gorlash)
Posted on:

Rate this post
0 useful
not useful
I'm using Yagarto....20080408 package.  I'm compiling with:

"c:/yagarto/bin/arm-elf-gcc"  -gdwarf-2 -MD -Wall -O -mapcs-frame
-I./Source/ -I../library/inc/ -I../library/src/ -I../ethernet_lib/
-I../uip/  -mthumb-interwork -c ../library/src/usb_int.c -o usb_int.o
"
and linking with:
"c:/yagarto/bin/arm-elf-ld" -T./settings/head_yagarto.ld
-T./settings/Flash.ld  -T./settings/input_make.ld
-T./settings/sections_make.ld  --cref -static -L
c:/yagarto/lib/gcc/arm-elf/4.2.2/interwork -lc -lgcc -Map=Demo.map
-start-group  -o Demo.elf

Where head_yagarto.ld contains:
SEARCH_DIR("c:/yagarto/lib/gcc/arm-elf/4.2.2/thumb/interwork");

but, link fails with:
c:\yagarto\bin\arm-elf-ld.exe: Warning:
c:\yagarto\bin\../arm-elf/lib\libc.a(lib_a-memset.o) does not support
interworking, whereas Demo.elf does.

So, why do the Yagarto interwork libraries not support interworking???

Author: Simon Ellwood (fordp)
Posted on:

Rate this post
0 useful
not useful
Do not use arm-elf-ld to link with.

Use arm-elf-gcc to link and then it will pic the correct libraries.

I have had this problem myself.

Some of the older makefiles call arm-elf-ld.

Get back to us if this helps or you need more help!

Author: Dan Miller (gorlash)
Posted on:

Rate this post
0 useful
not useful
Simon Ellwood wrote:
> Do not use arm-elf-ld to link with.
>
> Use arm-elf-gcc to link and then it will pic the correct libraries.
>
> I have had this problem myself.
>
> Some of the older makefiles call arm-elf-ld.
>
> Get back to us if this helps or you need more help!

Well, I've read this comment in other places, but since the only STR9
project that I've been able to make build/link successfully, is the
Hitex comStick demo project - and they call ld directly, I was trying to
using their make/ld files to build my project as well.

Accepting that you'd prefer that I not call ld directly, could you at
least explain to me why the interwork library doesn't support
interworking?

Author: Dan Miller (gorlash)
Posted on:

Rate this post
0 useful
not useful
Well, nevermind all this... I started over again, regenerating my ld
file and the call to "gcc -Wl", and everything compiles just fine.
What's more, when I load the resulting .elf file into insight, it starts
at address 0, which it never did before!!  So I think everything is
fine, and I'm ready to start playing around with OpenOCD and insight.

Author: Simon Ellwood (fordp)
Posted on:

Rate this post
0 useful
not useful
To answer your question. If you call ld directly then you will have to
tell the linker where the libraries are.

If you link with gcc then the compiler will automatically find the right
libraries.

So if if the information I have is correct then the reason your
libraries you are linking too do not support inter-working is that they
are NOT the inter-working libraries.

This is just information I have got from this very forum. I did have a
big problem with linking when calling ld and switching to gcc did fix
it.

I am glad you have made some progress!

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.