--- 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...
--
martin at kfib
--- Comment #4 from hutchinsonandy at aim dot com 2008-06-11 22:05 ---
I'm sure Eric will weight in again to verify code posted executes correctly (it
looks correct to me).
I suspect you have some config or memory issue.
For example, unoptimized, the string is stored at location 0x100
--- 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'm a major clutz)
--- Comment #2 from eric dot weddington at atmel dot com 2008-06-11 05:50
---
Compiling code with -O0 (so it doesn't optimize the program away) and running
it through the debugger in AVR Studio still shows that main returns a 3, which
indicates that both conditions (testing a[0] and b[0
--- Comment #1 from hutchinsonandy at gcc dot gnu dot org 2008-06-11 02:35
---
Please post command line used to compile and assembler produced.
I cannot reproduce this on 4.4 or 4.2.2.
At high optimisation (-Os) it compiles to load PORTC with 3 directly.
(as one would expect):
13
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
Severity|major |normal
Component|c |target
GCC ta