AVR, Max OS X: Compiling avr-libc fails ...

Hi all:

I tried to compile avr-libc on my Mac Intel with OS X 10.4.6 using the instructions as detailed in

formatting link

Unfortunately the compile fails:

avr-gcc -I../../../../common -I../../../../include -x assembler-with-cpp

-Wa,-gstabs -mmcu=at90s1200 -c ../../../../crt1/gcrt1.S /usr/libexec/gcc/darwin/i386/as: Flag option -m has already been seen! /usr/libexec/gcc/darwin/i386/as: Flag option -0 has already been seen! /usr/libexec/gcc/darwin/i386/as: Flag option -0 has already been seen! /usr/libexec/gcc/darwin/i386/as: Flag option -t has already been seen! ../../../../common/macros.inc:unknown:file contains unmatched .macro and .endmacro for: X_movwdstsrc make[5]: *** [gcrt1.o] Error 1 make[4]: *** [all-recursive] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2

...I am using the following versions:

$ avr-gcc --version avr-gcc (GCC) 4.1.0 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ avr-as --version GNU assembler 2.16.1 Copyright 2005 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. This assembler was configured for a target of `avr'.

$ avr-ld --version GNU ld version 2.16.1 Copyright 2005 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty.

I can't understand why avr-gcc seems to call the assembler in /usr/libexec/gcc/darwin/i386/as ...

Also the configure step says:

checking if avr-gcc has support for attiny13... no checking if avr-gcc has support for attiny2313... no checking if avr-gcc has support for attiny25... no checking if avr-gcc has support for attiny45... no checking if avr-gcc has support for attiny85... no checking if avr-gcc has support for attiny24... no checking if avr-gcc has support for attiny44... no checking if avr-gcc has support for attiny84... no checking if avr-gcc has support for attiny261... no checking if avr-gcc has support for attiny461... no checking if avr-gcc has support for attiny861... no checking if avr-gcc has support for atmega48... no checking if avr-gcc has support for atmega88... no checking if avr-gcc has support for at90pwm2... no checking if avr-gcc has support for at90pwm3... no checking if avr-gcc has support for atmega164p... no checking if avr-gcc has support for atmega165... no checking if avr-gcc has support for atmega168... no checking if avr-gcc has support for atmega324p... no checking if avr-gcc has support for atmega325... no checking if avr-gcc has support for atmega3250... no checking if avr-gcc has support for atmega329... no checking if avr-gcc has support for atmega3290... no checking if avr-gcc has support for atmega406... no checking if avr-gcc has support for atmega640... no checking if avr-gcc has support for atmega644... no checking if avr-gcc has support for atmega644p... no checking if avr-gcc has support for atmega645... no checking if avr-gcc has support for atmega6450... no checking if avr-gcc has support for atmega649... no checking if avr-gcc has support for atmega6490... no checking if avr-gcc has support for atmega1280... no checking if avr-gcc has support for atmega1281... no checking if avr-gcc has support for at90can32... no checking if avr-gcc has support for at90can64... no checking if avr-gcc has support for at90can128... no checking if avr-gcc has support for at90usb646... no checking if avr-gcc has support for at90usb647... no checking if avr-gcc has support for at90usb1286... no checking if avr-gcc has support for at90usb1287... no

So - does it support anything ? ;-) I need to program ATmega16 and ATmega128 AVRs...

Any hint really appreciated. Thanks!

Frank frgo @ mac dot com

Reply to
Frank Goenninger DG1SBG
Loading thread data ...

-Wa,-gstabs -mmcu=at90s1200 -c ../../../../crt1/gcrt1.S

This is, as close to certain as makes no difference, caused by an incorrect installation of your avr gcc and binutils.

Neither can anybody else.

To hopefully learn more about what's going wrong, add '-v' to that avr-gcc invocation above and inspect very closely what it prints. You'll have to find out where what it's "specs" file is, which 'as' it's actually trying to invoke, and which it ends up invoking.

[...]

That's completely to be expected. Your 'avr-gcc' doesn't work. That will make all attempts of configure to use it immediate failuares.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

I haven't read that page, and I haven't tried to build on an Intel Mac. However, on a PPC Mac (as well as under cygwin and in Linux), I use exactly this procedure:

get binutils-2.16, gcc-4.0.2, avr-libc-1.4.4

bunzip2 -c binutils-2.16.tar.bz2 | tar xvf - cd binutils-2.16 ./configure --target=avr --program-prefix="avr-" make ; make install cd .. bunzip2 -c gcc-4.0.2.tar.bz2 | tar xvf - mkdir gccbuild cd gccbuild ../gcc-4.0.2/configure --target=avr --program-prefix="avr-"

--enable-langages=c make ; make install cd .. bunzip2 -c avr-libc-1.4.4.tar.bz2 | tar xvf - cd avr-libc-1.4.4 ./configure --build=`./config.guess` --host=avr make ; make install

note, the ` character is the one under the tilde on a standard US keyboard, not the one to the right of ;

Reply to
larwe

Yep. Basically did exactly this, but with a --prefix to get this into a chosen place. My initial fault was to specify different prefixes... Now that I have recognized - thanks to hints from Joerg Wunsch - to give all tools the same --prefix statement I have managed to get a clean build for all tools. And programmed the AVR ATmega16 already successfully. Yippie!

Using a German language keyboard here. The ` character is just above the ´ character next to the sharp s (ß) ;-)

Frank

Reply to
Frank Goenninger DG1SBG

Why not use the fink unstable version ?

Get fink from

formatting link
then install fink commander (gui interface)

Install fink, configure to use unstable packages then install avr-gcc ,avr libc and avr bin utils.

Maybe you haven't installed all the needed packages for your current install.

Thats the beauty of fink, it uses the debian dpk and apt-get to sort out and download all the needed dependancies.

Alex

Reply to
Alex Gibson

Alex,

thanks for pointing out. I know fink and apt-get and stuff. Way too much footprint for me - It is nice but does lots of things in the hidden.

As I like to have full control and know beforehand what happens I have decided to not use fink anymore.

As my last post says I meanwhile managed to get a clean compile. ;-)

Thanks again.

Frank

Reply to
Frank Goenninger DG1SBG

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.