EmbDev.net

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


Author: Juan Peres (Company: none) (jakinto)
Posted on:

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

Author: Turbo J (Guest)
Posted on:

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

Author: Juan Peres (Company: none) (jakinto)
Posted on:

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

Author: Sean Zhang (Guest)
Posted on:

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

Author: Oliver (Guest)
Posted on:

Rate this post
0 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

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.