In my Atmel ASF project, I am trying to build following inline asm code. However I am getting impossible constraint while compilation.
Compiler points to this line __asm__ __volatile__
,
am I missing anything?
#define OUTPORT PORTD
#define OUTBIT 3 // PD.3
uint8_t rport ,rbits;
uint8_t *buf = message;
asm volatile( "in __tmp_reg__, __SREG__ \n\t" // 1 Save SREG for later
"cli \n\t" // 1 Clear interrupts
"in %[rport], %[port] \n\t" // 1 Move PORTB adress to rport
: //Outputs
[rport] "=&r" (rport)
: //Inputs
[port] "I" (_SFR_IO_ADDR(OUTPORT)) // Adress to port register, 6-bit positive constant
: //Clobber list (compiler must restore)
"r0" // This is __tmp_reg__
);
- What is destroying this build?
- I wonder if asm syntax is incorrect? I have been following this manual