avr-gcc-list
[Top][All Lists]
Advanced

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

Re[2]: [avr-gcc-list] inline asm problem


From: Ilhom Djalilov
Subject: Re[2]: [avr-gcc-list] inline asm problem
Date: Fri, 13 Feb 2004 13:35:35 +0500

Hello Artur,

Thursday, February 12, 2004, 12:24:49 PM, you wrote:

AL> whiteman wrote:

>> hi,all:
>>        I want to write a simple inline asm statement in "main" function.
>> but when compiling the source,
>> I always received a error message "pwm.c:27: error: impossible constraint in 
>> `asm'". what's
>> meaning? 
>> My inline asm is : 
>>                       asm volatile("sbi 0,1" : "=I"(PORTC) : "I"(6));

If you use a new version of the compiler, you should try this:

#define PORTC_ 0x15
asm volatile("sbi %0,%1" ::"I"(PORTC_),"I"(6));

Don't forget, that in newer versions of avr-gcc PORTC is SFR, not a
constant.


-- 
Best regards,
 Ilhom                            mailto:address@hidden




reply via email to

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