avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] New avr-libc


From: Erik Christiansen
Subject: Re: [avr-chat] New avr-libc
Date: Tue, 1 Aug 2017 19:40:31 +1000
User-agent: Mutt/1.8.0 (2017-02-23)

On 26.07.17 15:26, Bob von Knobloch wrote:
> avr-gcc -g -Wall -Wno-main -Os -fno-inline -mmcu=atmega1284p
> -DF_CPU=20000000 -DC_YEAR=2017 -fshort-enums -Wno-unused-function   -c -o
> main.o main.c
> avr-gcc -g -Wall -Wno-main -Os -fno-inline -mmcu=atmega1284p
> -DF_CPU=20000000 -DC_YEAR=2017 -fshort-enums -Wno-unused-function
> -Wl,-Map,main.map -o main.elf main.o
> /opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/bin/ld:
> cannot find crtatmega1284p.o: No such file or directory
> /opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/bin/ld:
> cannot find -latmega1284p
> collect2: error: ld returned 1 exit status

Hi Bob,

Have you tried without the "-c", i.e. a single-step compile? If that
works, then avr-gcc is handing over some needed parameter to avr-ld.

But for diagnosis, what is listed after the linker script when you:

$ avr-gcc -mmcu=atmega1284p -Wl,--verbose | more

I have (rather dated now):

attempt to open
/usr/lib/gcc/avr/4.7.2/../../../avr/lib/avr51/crtm1284p.o succeeded
/usr/lib/gcc/avr/4.7.2/../../../avr/lib/avr51/crtm1284p.o
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libgcc.so failed
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libgcc.a succeeded
(/usr/lib/gcc/avr/4.7.2/avr51/libgcc.a)_exit.o
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libc.so failed
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libc.a failed
attempt to open /usr/lib/gcc/avr/4.7.2/../../../avr/lib/avr51/libc.so failed
attempt to open /usr/lib/gcc/avr/4.7.2/../../../avr/lib/avr51/libc.a succeeded
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libgcc.so failed
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libgcc.a succeeded

If it's not looking where yours are, then I'd first ask whether binutils
was built before gcc, to make them available.

> Makefile:44: recipe for target 'main.elf' failed
> make: *** [main.elf] Error 1
> 
> I notice that, under '/opt/avr-libc2.0.0-binutils2.9/avr/lib/avr51/
> the 'crt' files appear to have different names (when compared to my existing
> tool chain):
> Old = crtatmega1284p.o
> New = crtm1284p.o
> 
> Have I missed some parameter that the compilation of the linker needed to be
> able find these files? Why are they renamed?

Dunno. You're not by any chance invoking the old avr-gcc (with old names
and library paths)? It is not at all difficult to have the old executable
not only still lying about, but first in $PATH, if the new is not
installed over it.

Erik




reply via email to

[Prev in Thread] Current Thread [Next in Thread]