I am not able to compile the following code in CCS
static inline void *OsReadMainStackPtr(void)
{
void *result = NULL;
asm volatile( "MRS R1, CPSR\n\t"
"CPS #0x13\n\t"
"MOV %0, SP\n\t"
"MSR CPSR_c, R1\n\t" : "=r" (result));
return result;
}
It throws error
error #18: expected a ")"
at "MSR CPSR_c, R1\n\t" : "=r" (result));
The above code compiles properly in IAR.