Bug 38057 - [AVR] ATMega2561 wrong addressing (probably eicall).
Summary: [AVR] ATMega2561 wrong addressing (probably eicall).
Status: RESOLVED DUPLICATE of bug 38549
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2008-11-07 23:04 UTC by Murat Kayabas
Modified: 2009-03-23 16:42 UTC (History)
4 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Murat Kayabas 2008-11-07 23:04:45 UTC
I wrote a code for atmega2561. The code's memory usage in prog memory is almost 153000 bytes.

The problem is, code doesn't work properly. the mcu getting reset or something like this... I think compiled

code calls wrong addresses in somewhere of the memory. When I comment some of part of text messages in the memory, the total memory usage become 126000 bytes and the code works good....

I had also had a problem with eicall in winavr. I had fixed it like this:

EIND = 1;
asm("ldi r30,0x00");
asm("ldi r31,0xf0");

I guess avr-gcc doesn't set "EIND = 1;" for atmega2561 while compiling.

So i cannot using the other part of mega2561 (nearly 128K) because of this

Please somebody fix it, it is very urgent...

Comment 1 Eric Weddington 2008-11-13 21:36:00 UTC
Lowering severity. This is a target bug.
See WinAVR bug #2229892 on SourceForge:
Which is probably the same poster.
Comment 2 Eric Weddington 2009-03-23 16:42:52 UTC

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