Eclipse .elf files

OP (Company: none) #2700397
Hi,

I am totally new on this. I set up eclipse and Yagarto 
(arm-none-eabi-gcc-4.6.2) but when I build my programs I don't get a 
.elf file generated.

I also get the below error:

**** Build of configuration Default for project asasa ****

make all
arm-eabi-gcc -mlong-calls -ffunction-sections -Wall -fshort-enums -g 
-I../at91lib/include -I. -I./ -Dat91sam7s256 -c -o obj/main.o main.c
process_begin: CreateProcess(NULL, arm-eabi-gcc -mlong-calls 
-ffunction-sections -Wall -fshort-enums -g -I../at91lib/include -I. -I./ 
-Dat91sam7s256 -c -o obj/main.o main.c, ...) failed.
make (e=2): The system cannot find the file specified.

make: *** [obj/main.o] Error 2

Could it be a mistake in the Make file?

By the way my target is a AT91SAM7S256.

Thanks in advance for your help.
Guest #2700493
You mistyped the command for gcc:
> make all
> arm-eabi-gcc -mlong-calls [...]

It must be "arm-none-eabi-gcc" in your case.
OP (Company: none) #2700786
Hi Turbo J,

Thanks for your answer.

I fixed it.

But now I am getting a second error:


make all
arm-none-eabi-gcc -mlong-calls -ffunction-sections -Wall -fshort-enums 
-g  -I../at91lib/include -I. -I./ -Dat91sam7s256 -c -o obj/main.o main.c
main.c: In function 'main':
main.c:34:2: warning: implicit declaration of function 'printf' 
[-Wimplicit-function-declaration]
main.c:34:2: warning: incompatible implicit declaration of built-in 
function 'printf' [enabled by default]
arm-none-eabi-gcc -g  -nostartfiles -Wl,--gc-sections -L../at91lib/lib 
-T"../at91lib/lib/sram.lds" ../at91lib/lib/crt0.o -lmachdep -o 
bin/sram.elf obj/*.o -lboardlib -lbasicIO
c:/embedded_software/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../.. 
/../arm-none-eabi/bin/ld.exe:  error: Source object 
../at91lib/lib\libboardlib.a(Button-lib.o) has EABI version 0, but 
target bin/sram.elf has EABI version 5
c:/embedded_software/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../.. 
/../arm-none-eabi/bin/ld.exe:  failed to merge target specific data of 
file ../at91lib/lib\libboardlib.a(Button-lib.o)
c:/embedded_software/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../.. 
/../arm-none-eabi/bin/ld.exe:  error: Source object 
../at91lib/lib\libboardlib.a(OLED-lib.o) has EABI version 0, but target 
bin/sram.elf has EABI version 5
c:/embedded_software/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../.. 
/../arm-none-eabi/bin/ld.exe:  failed to merge target specific data of 
file ../at91lib/lib\libboardlib.a(OLED-lib.o)
c:/embedded_software/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../.. 
/../arm-none-eabi/bin/ld.exe:  error: Source object 
../at91lib/lib\libboardlib.a(SPI-lib.o) has EABI version 0, but target 
bin/sram.elf has EABI version 5
c:/embedded_software/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../.. 
/../arm-none-eabi/bin/ld.exe:  failed to merge target specific data of 
file ../at91lib/lib\libboardlib.a(SPI-lib.o)
c:/embedded_software/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../.. 
/../arm-none-eabi/bin/ld.exe:  error: Source object 
../at91lib/lib\libboardlib.a(stdio.o) has EABI version 0, but target 
bin/sram.elf has EABI version 5
c:/embedded_software/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../.. 
/../arm-none-eabi/bin/ld.exe:  failed to merge target specific data of 
file ../at91lib/lib\libboardlib.a(stdio.o)
collect2: ld returned 1 exit status
make: *** [sram] Error 1


Any clues what it could be?
Guest #2753567
Hi, Juan

I met some similar errors as your second one when I try to generate my 
elf file.

Have you solved the problem?

Thanks!
Guest #2753728
You are using the wrong libraries. The libs the linker is complainig 
about are compiled with an eabi-Version of the Compiler, your are using 
a none-eabi version. This does not go togehter. Try to find the 
none-eabi versions of the libs, or re-compile them with your compiler.

Oliver

Reply

A question of your own? This thread is over 14 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.