simulavr-devel
[Top][All Lists]
Advanced

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

[Simulavr-devel] [bug #34270] current master does no build


From: Yann Dirson
Subject: [Simulavr-devel] [bug #34270] current master does no build
Date: Mon, 12 Sep 2011 21:26:06 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110816 Iceweasel/3.6.20 (like Firefox/3.6.20)

Follow-up Comment #4, bug #34270 (project simulavr):

Great, I can confirm this patch allows the simulator to build with g++-4.4 and
4.5 (and runs, to the minimal extent I have tested), thanks Marek!

Some examples, however, will require some patching as well for use with
avr-gcc 4.5, but it's less of an immediate problem for me:

avr-gcc -mmcu=atmega128 -I. -DF_CPU=4000000UL -Os -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes  -c
-o StdDefs.o StdDefs.c
In file included from kb.c:14:0:
scancodes.h:19:1: warning: missing braces around initializer
scancodes.h:19:1: warning: (near initialization for ‘unshifted[0]’)
scancodes.h:91:1: warning: missing braces around initializer
scancodes.h:91:1: warning: (near initialization for ‘shifted[0]’)
StdDefs.c: In function ‘putstr’:
StdDefs.c:120:4: warning: pointer targets in passing argument 1 of
‘strlen’ differ in signedness
/usr/lib/gcc/avr/4.5.3/../../../avr/include/string.h:133:15: note: expected
‘const char *’ but argument is of type ‘CHARU *’
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:28: error:
__builtin_avr_delay_cycles expects an integer constant.
make[2]: *** [StdDefs.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/work/yann/elec/avr/simulavr/examples/atmel_key'

That problem is strange, preprocessed code looks fine, not sure what bad
interaction we see here (_delay_ms does work, as everybody knows :)

 uint32_t __ticks_dc;
 extern void __builtin_avr_delay_cycles(unsigned long);
 __tmp = ((4000000UL) / 1e3) * __ms;
# 150 "/usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h" 3
  __ticks_dc = (uint32_t)(ceil(fabs(__tmp)));


For g++-4.6, an issue was raised in
http://lists.gnu.org/archive/html/simulavr-devel/2011-05/msg00007.html, and
CXXFLAGS=-fpermissive does allow to work around the problem.


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?34270>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/




reply via email to

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