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???
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!
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?
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.
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!