I've had to upgrade to the latest versions of avr-libc, avr-binutils and avr-gcc because older versions don't properly support the AT90USB162. However the latest versions don't properly support it either. I am using: avr-gcc 4.3.2 avr-binutils 2.19 avr-libc 1.6.2 The error is: $ avr-gcc -Os -Wall -mmcu=at90usb162 -o test.o test.c /usr/libexec/gcc/avr/ld: avr:4 architecture of input file `/usr/lib/gcc/avr/4.3.2/../../../../avr/lib/avr35/crtusb162.o' is incompatible with avr:3 output /usr/libexec/gcc/avr/ld: avr:4 architecture of input file `/tmp/cc4DQkkx.o' is incompatible with avr:3 output Now, the thing is, AT90USB162 is avr3.5 architecture, which is inbetween 3 and 4. It seems to me somebody has hacked avr3.5 architecture in by pretending it's avr3 in one place and avr4 in another place and so the whole thing falls apart. Reproducible: Always Steps to Reproduce: 1. Install latest versions of avr-gcc, avr-binutils and avr-libc 2. echo 'int main(void) { return 0; }' > test.c 3. avr-gcc -Os -Wall -mmcu=at90usb162 -o test.o test.c Actual Results: Error pasted above. Expected Results: Should compile and link properly. I am happy to use an older version of these tools if someone can point me to a set which will produce working output to load onto an at90usb162 chip. Earlier versions fail in different ways.
if the main versions dont support the processor, then there's nothing we can do about it. we arent AVR developers. you'll have to consult the AVR forums (wherever those may be) to find out more information.
Created attachment 172624 [details, diff] Patch to fix this bug in binutils-2.19 I brought this up on the avr-gcc mailing list and I was given this patch. It fixes the problem. The author says he has submitted it to binutils but since they haven't released a new version in over six months, we are stuck with the buggy version being the latest release. If you could add this to the set of Gentoo patches that could be really handy. Thanks, Nicholas