[Simulavr-devel] __builtin_avr_delay_cycles and avr-gcc 4.5.3 issue

2012-03-19 Thread foka
Hi, I found a message regarding this issue: In file included from StdDefs.c:8:0: /usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h: In function ‘msleep’: /usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h:153:43: error: __builtin_avr_delay_cycles expects an integer constant. make: *

Re: [Simulavr-devel] __builtin_avr_delay_cycles and avr-gcc 4.5.3 issue

2012-03-19 Thread Michael Hennebry
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 prett