[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Simulavr-devel] __builtin_avr_delay_cycles and avr-gcc 4.5.3 issue
From: |
Michael Hennebry |
Subject: |
Re: [Simulavr-devel] __builtin_avr_delay_cycles and avr-gcc 4.5.3 issue |
Date: |
Mon, 19 Mar 2012 12:50:26 -0500 |
Neither the original nor the proposed code works as advertised.
ms is supposed to be tenths of milliseconds, so I renamed it.
// Delay in 1/10's of a millisecond
// won't work with -O0, use -O1 for debugging
void msleep(INT16U ms10) { for( ; ms10; --ms10) _delay_ms(0.1); } }
-O0 really is pretty awful for debugging.
There is so much object code that it's hard to wade through.
In one example, "fred+=greg;" made four copies of fred's address.