Lucian is my name, not an english native speaker so excuse my mistakes.
I have a small problem when using my Olimex ARM-USB-OCD debugger with my CS-9302 Olimex board. It seems that whenever I run the command “ldr r1,[lr, #-4]” from the SWI interrupt handler the value read intro r1 is 0xdeeedeee instead of 0xef000000 as it should be.
If I run “ldr r1,[lr, #-8]” I get in r1 the right value from the memory.
If I run “ldr r1,[lr]” I get in r1 the right value once again. It seems that it happens only when reading using the #-4. It’s really odd and I don’t understand why this is actually happening.
.
And now the funny part, if I get to the instruction “ldr r1,[lr, #-4]” and don’t press from eclipse the F5(step) and I go and use telnet and tell it to do one step everything works fine.
However if I run the same operation from a function called from main the everything is fine like in this other picture.
Any ideas or suggestions? At the moment I can’t figure out what goes wrong here.