--- Comment #5 from martin at kfib dot org 2008-06-12 09:13 ---
Never mind, I will do it. I'm a total klutz and I apologize. This is very, very
embarrassing.
If someone ever have a similar problem, make sure they're not running
avr-objcopy with the flag -j .text...
--
--- Comment #3 from martin at kfib dot org 2008-06-11 21:13 ---
Exact line for compiling is:
avr-gcc -mmcu=atmega48 -Walltest.c -o test
And now I'm very confused. I KNOW I've tried with and without optimization
before and that it made no difference (or possibly I'
if (a[0] == 0x3a) result |= 1;
if (b[0] == 0x3a) result |= 2;
(*(volatile uint8_t *)((0x07) + 0x20)) = 0x0f;
(*(volatile uint8_t *)((0x08) + 0x20)) = result;
return 0;
}
I'll of course try to answer any questions as prompt and detailed as possible.
Regards
/Martin
--
Summary: Char arrays gets corrupted in avr programs.
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martin at kfib dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36494