This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Invalid identifier asm

I have a function for interrupt service routine

void vEthIntService(void)
{
   asm volatile(
      "SUB   lr,lr, #4            \n\t"
      "STMFD  sp!,{r0-r12,lr}         \n\t"
      "MRS    r1,spsr               \n\t"
      "STMFD  sp!,{r1}            \n\t"
      "BL       vEthIntHandler      \n\t"
      "LDMFD   sp!,{r1}            \n\t"
      "MSR     spsr_cxsf,r1         \n\t"
      "LDMFD   sp!,{r0-r12,pc}^      \n\t"
   );
}

While compiling this gives an error

..\New\uIP\ethernet_lpc23xx.c(1063): error:  #20: identifier "asm" is undefined
..\New\uIP\ethernet_lpc23xx.c(1063): error:  #65: expected a ";"

What will be the problem?

thank you

0