Device: AT91SAM7X256
Compiler: IAR EWARM v 5.20
Code snippet:
1) void function_1 (void)
2) {
3) char irq_status;
4) asm ("MRS %0, CPSR" : "=r" (irq_status) : );
5) }
Error given by compiler:
AT line 4, expected ")" after the first :
Is there a different format to be followed for IAR?
Vinit Bidkar wrote: > Device: AT91SAM7X256 > Compiler: IAR EWARM v 5.20 > > Code snippet: > > 1) void function_1 (void) > 2) { > 3) char irq_status; > 4) asm ("MRS %0, CPSR" : "=r" (irq_status) : ); > 5) } > > Error given by compiler: > AT line 4, expected ")" after the first : > > Is there a different format to be followed for IAR? That syntax for inline assembler is a GCC-specific extension. IAR should have something similar. regards, Giovanni --- ChibiOS/RT http://chibios.sourceforge.net
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.