Hi all
I’m trying to manage ARM A9 processor exception in my FreeRTOS application with messages to the user. I can simulate and try some of typical error exceptions (data abort, prefetch abort) but I have a problem with the Undefined instruction exception.
I have checked the FreeRTOS source (prot_asm_vector.s file) and I see that the undefined exception branches to a for ever loop:
.align 4
FreeRTOS_Undefined: /* Undefined handler */
b .
Why this exception is not managed same as the other exceptions?
I think the Undefined exception should be corrected as follow:
.align 4
FreeRTOS_Undefined: /* Undefined handler /
#ifdef CONFIG_ARM_ERRATA_775420
dsb
#endif
stmdb sp!,{r0-r3,r12,lr} / state save from compiled code */
blx UndefinedInterrupt /*UndefinedInterrupt :call C function here /
ldmia sp!,{r0-r3,r12,lr} / state restore from compiled code */
movs pc, lr
Is this correct?