The source of this problem is a deeply buried internal issue of the RTL
handling within the compiler.
Description of the internal problem:
The expand pass generates strange RTL sequences refering to hard registers for
the div and mod operations and uses specific insn RTL for calling the
IIUC, you would need run-time code for stack unwinding for exceptions and if I
have strong doubts that these are available. Also you probably will need the
exception tables to be placed into your RAM and I suppose that your AVR will
not have enough of it in order to get a working system.
My
Just one question: Did you extract the line
RCALL PC-0x0009
From disassembling the completeley linked executable or from disassembly of
the object file?
Possibly the linker might have replaced (PC-0x0009) by the true distance
between the PC position of the PC at the RCALL.?