Bug 35506 - [avr] 4.3.0 buid error: illegal opcode movw for mcu avr3
Summary: [avr] 4.3.0 buid error: illegal opcode movw for mcu avr3
Status: RESOLVED DUPLICATE of bug 35073
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-08 08:54 UTC by Dmitry K.
Modified: 2008-03-09 05:43 UTC (History)
6 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry K. 2008-03-08 08:54:21 UTC
The building for AVR target is aborted at compilation libgcc stage with
error: Illegal opcode movw for mcu avr3.  The lastest official release
of binutils is used: 2.18.  The reason of error is an attempt to assemble
MOVW command for avr3 architecture which permits only classic instruction
set historically.

The workaround is to add '-mall-opcodes' avr-as option for this case.
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=%*}"

After this edition the build and installation are fine.
Comment 1 brian 2008-03-08 14:27:46 UTC
Subject:   New: [avr] 4.3.0 buid error: illegal opcode movw for 
 mcu avr3


> The building for AVR target is aborted at compilation libgcc stage with
> error: Illegal opcode movw for mcu avr3.  The lastest official release

You just need a more recent version of binutils.  See
<http://gcc.gnu.org/ml/gcc-help/2008-03/msg00064.html> for details.
Comment 2 Eric Weddington 2008-03-09 05:43:26 UTC

*** This bug has been marked as a duplicate of 35073 ***