[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Illegal opcode errors building gcc-4.2.3
From: |
Dmitry K. |
Subject: |
Re: [avr-gcc-list] Illegal opcode errors building gcc-4.2.3 |
Date: |
Mon, 21 Apr 2008 08:29:08 +1100 |
User-agent: |
KMail/1.5 |
On Sunday 20 April 2008 01:28, Wouter van Gulik wrote:
[...]
> > ../../gcc/config/avr/libgcc.S:280: Error: illegal opcode movw for mcu
> > avr3
[...]
> This is because binutils 2.18 does not support avr architecture 35.
> Use binutils 2.18.5 or more recent.
More exactly: this is because binutils 2.18 does not support
the MOVW instruction with architecture 3.
The simplest workaround (if you are not happy to install new
binutils) is to add '-mall-opcodes':
Replace into 'config/avr/avr.h' the string:
#define ASM_SPEC "%{mmcu=avr25:-mmcu=avr2;
mmcu=avr35:-mmcu=avr3;
mmcu=avr31:-mmcu=avr3;mmcu=avr51:-mmcu=avr5;mmcu=*:-mmcu=%*}"
to:
#define ASM_SPEC "%{mmcu=avr25:-mmcu=avr2;
mmcu=avr35:-mmcu=avr3 -mall-opcodes;
mmcu=avr31:-mmcu=avr3;mmcu=avr51:-mmcu=avr5;mmcu=*:-mmcu=%*}"
Regards,
Dmitry.