Tool/software: Code Composer Studio
Hello
Since I use compiler the following code with CCS in LTS , I got error message "expect an }".
void CPUIntrEnable(uint32_t status)
{
status = status & INTC_ARM_IRQ_FIQ_MASK;
asm volatile (" mrs r0, CPSR\n\t"
" bic r0, r0, %[result]" : [result] "=r" (status));
asm volatile (" msr CPSR, r0");
}
uint32_t CPUIntrDisable(void)
{
volatile uint32_t status;
/* Read the IRQ and FIQ status from CPSR */
asm volatile (" mrs r0, CPSR\n\t"
" mov r1, r0\n\t"
" and %[result], r0, #0xC0" :
[result] "=r" (status));
asm volatile (" orr r1, #0xC0\n\t"
" msr CPSR, r1");
status = (~status) & INTC_ARM_IRQ_FIQ_MASK;
return status;
}
So I decide to write the function CPUIntrEnable and CPUIntrDisable wiht assembler in an .s document,
but I do not know how to write, can you give an example, I need help.
Best Regards
Jack
