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

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

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


From: Clemens Buchacher
Subject: Re: [avr-gcc-list] inline asm problem
Date: Fri, 13 Feb 2004 01:59:50 +0100
User-agent: Mutt/1.5.5.1+cvs20040105i

On Thu, Feb 12, 2004 at 09:18:37AM +0800, whiteman wrote:
[...]
>        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));

The sbi instruction uses I/O register addresses, so you will have to use
_SFR_IO_ADDR(PORTC) if PORTC is in this address range (see
<avr/sfr_defs.h> for details). If it is not, you cannot use the sbi
instruction at all.

hth,
Clemens


reply via email to

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