Hello everybody,

When I tried to compile my tinyos code where there is some machine code. I have 
the following error :
BintM.nc:394: error: can't find a register in class 'BASE_POINTER_REGS' while 
reloading 'asm'

Where the problem come from the fact there is some asm volatile
asm volatile (
            "       push r2         \n"
            "       push r3         \n"
            "       push r26        \n"
            "       push r27        \n"
            "       push r30        \n"
            "       push r31        \n"
            "1:                     \n"
            "       ld r2, Z+       \n"
            "       ld r3, X        \n"
            "       lsr %0          \n"
            "       sbc r3, r2      \n"
            "       rol %0          \n"
            "       st X+, r3       \n"
            "       dec %1          \n"
            "       brne 1b         \n"
            "       pop r31         \n"
            "       pop r30         \n"
            "       pop r27         \n"
            "       pop r26         \n"
            "       pop r3          \n"
            "       pop r2          \n"
            :"+r"(borrow), "+r"(nwords)
            :"z"(a), "x"(b)
            :"r2", "r3"
        );


I search the web for the bug and I found it
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31786

This bug has been solve since the version 4.4 of avr-gcc

The problem is I have the version 4.1.2
/usr/lib/gcc/avr/4.1.2

And I am using ubuntu and I install the debian package for tinyos.




How can I update the gcc avr to the version 4.4 ?


Thanks a lot :)

Best

Loic
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to