EmbDev.net

Forum: ARM programming with GCC/GNU tools Eclipse .elf files


von Juan P. (Company: none) (jakinto)


Rate this post
useful
not useful
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.

von Turbo J (Guest)


Rate this post
useful
not useful
You mistyped the command for gcc:
> make all
> arm-eabi-gcc -mlong-calls [...]

It must be "arm-none-eabi-gcc" in your case.

von Juan P. (Company: none) (jakinto)


Rate this post
useful
not useful
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?

von Sean Zhang (Guest)


Rate this post
useful
not useful
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!

von Oliver (Guest)


Rate this post
useful
not useful
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

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.