|
From: | Dmitry K. |
Subject: | Re: [avr-libc-dev] [bug #22878] eeprom_*_word/dword/block cause hang in ATmega256x |
Date: | Wed, 9 Apr 2008 17:23:51 +1100 |
User-agent: | KMail/1.5 |
Hm... Is avr-gcc for avr6 ready to use? I have try avr-gcc 4.4-20080404 (4.3.0 does not support avr6) with binutils 2.18. In result the small program without any EEPROM usage and without any inline functions gives incorrect code: /* avr-gcc 4.4-20080404 + binutils 2.18 produce incorrect code: the foo4() function stores 0 value to 'vp' variable. Options: -W -Wall -Os -mmcu=atmega2560 */ #define BIGCODE() asm volatile (".rept 30000\n\tnop\n\t.endr") void (* volatile vp) (void); __attribute__((noinline)) void foo1 (void) { BIGCODE(); vp = foo1; } __attribute__((noinline)) void foo2 (void) { BIGCODE(); vp = foo2; } __attribute__((noinline)) void foo3 (void) { BIGCODE(); vp = foo3; } __attribute__((noinline)) void foo4 (void) { BIGCODE(); vp = foo4; } int main () { foo1 (); foo2 (); foo3 (); foo4 (); return 0; } I will see the bug report later. Dmitry.
[Prev in Thread] | Current Thread | [Next in Thread] |