AnsweredAssumed Answered

Stack frames MC9S12XD

Question asked by Jay Moskowitz on May 30, 2016
Latest reply on May 31, 2016 by Jay Moskowitz

Where can I find information regarding the format of stack frames generated by Code Warrior for a S12XD processor? I have an application in the field that runs into an issue occasionally and need to determine where a particular function is being called from. I would like to be able to write some software that can provide a callback trace and provide the return addresses of the call sequence on the stack. I need to be able to locate the return address in each frame as it executes Function A() --> Function B() --> Function C(). While inside Function C() I wish to call "callbackTrace()" which would provide the address where callbackTrace() was called, the address in Function B() that called C() and the address in Function A() that called B().