Eclipse and NewSoftSerial tunedDelay


hi,

i've been using arduino while now, have hit complete developement wall using eclipse , newsoftserial.

there seems have been talk on subject while ago (madworm's posts, here: [edit - links in next post, forum wont let me post links in first post!] ) fix described there not work me :/

to elaborate, problem asm register constraints in following function (part of nss).

code: [select]
inline void newsoftserial::tuneddelay(uint16_t delay) {
 uint8_t tmp=0;

 asm volatile("sbiw    %0, 0x01 \n\t"
   "ldi %1, 0xff \n\t"
   "cpi %a0, 0xff \n\t"
   "cpc %b0, %1 \n\t"
   "brne .-10 \n\t"
   : "+w" (delay), "+a" (tmp)
   : "0" (delay)
   );
}


i've tried several combinations of constraints described here: [edit: link included in next post, see previous reason why] no avail, have passing familiarity avr asm anyway, i'm in dark here.

it works fine in arduino ide, once included in eclipse (source in 'arduino' project, linked main project, such becomes part of library) "inconsistent operand constraints in 'asm'      newsoftserial.cpp      /diecimilacore/newsoftserial      line 184      c/c++ problem"

my platform ubuntu linux 9.10, eclipse 3.5.2, avr-gcc 4.3.3.

any @ stage useful! :)

thanks in advance!

links

post referred to: http://www.arduino.cc/cgi-bin/yabb2/yabb.pl?num=1233298805/75
avr reference referred to: http://www.nongnu.org/avr-libc/user-manual/inline_asm.html#io_ops


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Eclipse and NewSoftSerial tunedDelay


arduino

Comments