URL:
<http://savannah.nongnu.org/bugs/?38618>
Summary: Improper use of _delay_ms in example/atmel_key
Project: Simulavr: an AVR simulator
Submitted by: skappel
Submitted on: Thu 28 Mar 2013 06:04:40 PM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Email: [email protected]
Open/Closed: Open
Discussion Lock: Any
Component Version: simulavr
_______________________________________________________
Details:
GCC 4.7.2 and avr-libc 1.8.0 on OS X.
avr-gcc -mmcu=atmega128 -I. -DF_CPU=4000000UL -Os -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -c
-o StdDefs.o ../../../simulavr-1.0.0/examples/atmel_key/StdDefs.c
In file included from
../../../simulavr-1.0.0/examples/atmel_key/StdDefs.c:8:0:
/scratch/builds/ada/avrcross-run/lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h:
In function 'msleep':
/scratch/builds/ada/avrcross-run/lib/gcc/avr/4.7.2/../../../../avr/include/util/delay.h:164:28:
error: __builtin_avr_delay_cycles expects a compile time integer constant
make[2]: *** [StdDefs.o] Error 1
According to posts elsewhere, _delay_ms argument must be a constant.
See attached patch which eliminates function msleep and directly uses
_delay_ms in main.c
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 28 Mar 2013 06:04:40 PM GMT Name: delay_ms.patch Size: 1kB By:
skappel
<http://savannah.nongnu.org/bugs/download.php?file_id=27705>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?38618>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
_______________________________________________
Simulavr-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/simulavr-devel