[avr-gcc-list] Using current avr-gcc for target ATmega2561
From:
Martijn van Balen
Subject:
[avr-gcc-list] Using current avr-gcc for target ATmega2561
Date:
Mon, 3 Oct 2005 17:26:10 +0200
Hi,
I'm developing a new board and would
like to mount the ATmega2561.
I already need the RAM size (8Kbyte),
the flash size is just a nice to have for now.
The wiki page (http://www.kieltech.de/uweswiki/ATmega2560_5fsupport)
suggests
two pitfalls:
"What needs to be done (tasks)
(1) Align functions (and
labels?) to 4-byte boundaries so that gcc can continue to use 16-bit values
to represent function pointers.
(2) Take into account,
that these devices store three bytes on the stack for each function call"
I can easily avoid (1) by using <128Kbyte
flash from C. But I cannot figure out what problem is solved by (2).
Indirect jumps can be done by IJMP/ICALL,
no need to push addresses yourself. Before diving into avr.md
and other files, could anybody point
my in the right direction ?