avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Strange issues with 16-bit values


From: Josef Eisl
Subject: Re: [avr-gcc-list] Strange issues with 16-bit values
Date: Fri, 07 Nov 2008 08:37:25 +0100
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Hello,

Brian Neltner wrote:
> Very oddly, the code runs when I compile it with -O3, but not with any
> other optimization level.
>> This works:
>>
>> int main(void) {
>>      uint8_t i;
>>      for(i=1;i<0xFF;i++) asm volatile("nop/n/t");
>>      PORTA=0x01;
>>      while(1);
>> }

You are using /n  and /t instead of \n \t (backslash-slash). Anyway I
don't think this is the problem in your case. Could you please give us
the avr-gcc command with all parameters and compiler flags you use to
compile the code.

Which target device are you using? Have you already took a look into the
dissembled code (using avr-objdump)? May that will give you some hints.

BR,
Josef





reply via email to

[Prev in Thread] Current Thread [Next in Thread]