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

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

RE: [avr-gcc-list] Strange delay behavior


From: Eric Weddington
Subject: RE: [avr-gcc-list] Strange delay behavior
Date: Fri, 06 Jul 2007 17:43:27 -0600


> -----Original Message-----
> From: Per-Tore Aasestrand [mailto:address@hidden
> Sent: Friday, July 06, 2007 5:40 PM
> To: Eric Weddington; address@hidden
> Subject: RE: [avr-gcc-list] Strange delay behavior
>
> Hello,
>
> At 23:20 06.07.2007, Eric Weddington wrote:
>
>
>
>
>       > -----Original Message-----
>       > From:
>       > address@hidden
>       > [
> mailto:address@hidden
> <mailto:address@hidden> .
>       > org] On Behalf Of Per-Tore Aasestrand
>       > Sent: Saturday, June 09, 2007 12:06 PM
>       > To: address@hidden
>       > Subject: [avr-gcc-list] Strange delay behavior
>       >
>       > Hello list,
>       >
>       > I've suddenly run into something odd. I am using AVR Studio
>       > Version 4.12 Service Pack 4 with WinAVR 20060421. Have been
>       > using this setup for a while without any problems.
>       >
>       > Now, running the following test program on a ATmega128 @ 8
>       > MHz, produces pulses on PC3. However, with 'off' period of
>       > 1,45 ms and 'on' period of 2,45 ms and. I had of course
>       > expected 1ms and 2 ms, respectively.
>       >
>       > I ran the same program using CodeVision, and then the
> periods were OK.
>       >
>       > Guess I've overlooked something.
>       > Any idea, someone?
>
>       What's your optimization setting (-O) ?
>
>
> Yes, it was -O!! ;-)
>
> Are there some guidelines for proper use of optimization settings?
>
> This message was sent to the list about one month ago. I was
> quickly tipped off to check the optimization setting. For
> some odd reason, it popped up again today. Wonder what happened.

I don't know. I just figured out that I was replying to old messages. Silly
me.

Anyway, use some form of optimization (such as -O1, -O2, -O3, -Os). :-)

Eric






reply via email to

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