AVR-GCC Not Compiling on Linux(Gentoo)

2 posts / 0 new
Last post
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, Im compiling AVR-GCC on my Gentoo box so I can start doing stuff with AVR's again, but its having compile errors. Actually, AVR-GCC went fine, its libc. Im using this guide/script: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=42631

Here are the errors im getting:

if /usr/local/avr/bin/avr-gcc -DHAVE_CONFIG_H -I. -I../../../../../source/avr-libc-1.6.2/avr/lib/avr35 -I../../..  -I../../../../../source/avr-libc-1.6.2/common -I../../../../../source/avr-libc-1.6.2/include  -g -Wall -W -Wstrict-prototypes -mmcu=avr35 -D__COMPILING_AVR_LIBC__ -mcall-prologues -Os  -MT bsearch.o -MD -MP -MF ".deps/bsearch.Tpo" -c -o bsearch.o ../../../../../source/avr-libc-1.6.2/libc/stdlib/bsearch.c; \
	then mv -f ".deps/bsearch.Tpo" ".deps/bsearch.Po"; else rm -f ".deps/bsearch.Tpo"; exit 1; fi
/tmp/ccq01Ro5.s: Assembler messages:
/tmp/ccq01Ro5.s:31: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:32: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:33: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:35: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:37: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:43: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:46: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:49: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:53: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:54: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:55: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:63: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:71: Error: illegal opcode movw for mcu avr3
/tmp/ccq01Ro5.s:89: Error: illegal opcode movw for mcu avr3
make[5]: *** [bsearch.o] Error 1
make[5]: Leaving directory `/usr/local/avr/build/avr-libc-1.6.2/avr/lib/avr35'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/usr/local/avr/build/avr-libc-1.6.2/avr/lib/avr35'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/avr/build/avr-libc-1.6.2/avr/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/avr/build/avr-libc-1.6.2/avr'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/avr/build/avr-libc-1.6.2'
make: *** [all] Error 2
(./buildavr-no-insight.sh) libc build failed
alex@Andromeda ~/Desktop/make-avr-gcc $ 

Any idea why this is happening and how I can fix it?

Thanks,

Alex

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Update your binutils setup to 2.18.50 or latter. The problem is that the assembler is out of step with gcc version. There were some architecture changes that regrouped devices.

I always use HEAD version of binutils.