We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
The problem is that your code does not match the way to inline assembler supported by your compiler.
You have read the compiler manual?
By the way - have you considered to use a separate assembler file?