2019-10-06 11:54 PM
I am trying to understand the exception entry behaviour of cortex M3. It is given that stack frame contains PC info at address SP+0x18.
If I see the PC value after entry of SysTick_Handler(), it remains 0x0000 0000. Please refer screenshots to get idea on what I am trying to do.
I'm using ST's latest eclipse IDE.
Controller used is STM32F103C8.
ST-Link V2 debugger
Solved! Go to Solution.
2019-10-07 12:30 AM
> It is given that stack frame contains PC info at address SP+0x18
Only if the handler itself did not put anything else on the stack. Observe the disasm of the handler.
JW
2019-10-07 12:30 AM
> It is given that stack frame contains PC info at address SP+0x18
Only if the handler itself did not put anything else on the stack. Observe the disasm of the handler.
JW
2019-10-07 02:16 AM
2019-10-07 03:52 AM
As you've now stopped before the push, offset 0x18 indeed contains the return value for PC, i.e. 0x08000642 (for some reason your debugger shows words MSB first - I don't use Eclipse).
JW
2019-10-07 09:49 AM
Thank you. Memory view problem got solved after I changed Rendering option from hex to HexInteger in eclipse. Not sure why eclipse has not given option to change endianness in Hex view. Overall my issue got solved.