Re: avr-g++: __gcc_isr not supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Klaus Doldinger schrieb:
Hi all,

my arch linux box just did an upgrade to avr-g++ 8.1.0. Compiling the
source of some avr-projects now suddenly gives the avr-as error:

tmp/cc44ccNW.s: Assembler messages:
/tmp/cc44ccNW.s:848: Error: pseudo instruction `__gcc_isr' not supported

avr-as is version 2.30

Any hints?

Hi, most likely you are using a custom specs file intended for an
older version of the compiler.

avr-gxx v8+ emits pseudo-instruction __gcc_isr for optimized ISR
prologue/epilogue generation, and this instruction is resolved
by avr-as -- but only if called with -mgcc-isr, otherwise the
assembler will complain about an unknown instruction.

http://gcc.gnu.org/gcc-8/changes.html#avr
https://gcc.gnu.org/PR20296
https://sourceware.org/PR21683

The compiler adds -mgcc-isr to gas's options only if not
used with -mno-gas-isr-prologues (which should be the case)
and if the specs file contains addition of -mgcc_isr like so:

*asm_gccisr:
        %{!mno-gas-isr-prologues: -mgcc-isr}

Such an enhanced specs file should also work with older versions
of the compiler as *asm_gccisr is not part of its default specs.

You can also set that option by hand, e.g. in your Makefile by
adding -Wa,-mgcc-isr to gcc's options, but then older versions
of gas (2.28 and below) will complain about an unknown option...

When using a custom specs file, use one as a starting point
that's shipped with the same compiler version and belongs to
the same multilib set, i.e. use the same settings of:
-mmcu=* -msp8 -mshort-calls.  The top of the specs file
spells out the multilib set, e.g. for ATtiny814:

# Auto-generated specs for AVR device attiny814 (core avrxmega3, 16-bit SP, short-calls)

If you don't use a custom specs file, then your problem is
somewhere else and we need more info.

Johann




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux