2015/09/02

ARM Compiler 5.06 Cannot Handle __irq

Below code for Cortex-R5 CPU,

__irq void Foo( void )

With ARM 5.05, it compiles OK as

PUSH     {r0-r12,lr}
...
POP      {r0-r12,lr}
SUBS     pc,lr,#4

With ARM 5.06, it compiles  NOT OK as

PUSH     {r4-r12,lr}
...
POP      {r4-r12,pc}

Hey!!  When IRQ handler ends, the PC return address should be "lr -4 not the "lr"!

ARM, please fix this problem!

Post Code on Blogger

Simplest way to post code to blogger for me: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black;overflow-x:...