8.3 Call Stack

For 16- and 32-bit devices, a software Call Stack window is available to view CALLs and GOTOs in executing C code. This window is not applicable for assembly code (it is recommended that code optimization be turned off when using the call stack).

The Call Stack window displays functions and their arguments listed in the order in which they were called in the executing program.

To view the call stack:

  1. Debug and then Pause your program.
  2. Select Window > Debugging > Call Stack. A 14.5 Call Stack Window will open.

Call Stack Limitations

The MPLAB X IDE call stack function is capable of unwinding calls to functions on the stack for bare metal C programs. Once the execution context switches to control of a RTOS, other tools are required to view the state of all tasks and control objects. MPLAB X IDE does not have RTOS-specific integrated support for presenting call-stack state of tasks controlled by the RTOS.

Call Stack Video

For more on the call stack, see the NetBeans video.