UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 24291

10.1 EDK - How do I access the stack and heap pointers in EDK debugger?

Description

How can I access the current value of the stack pointer and heap pointer when the EDK SW debugger hits a breakpoint?

Solution

For MicroBlaze:

The stack pointer for the MicroBlaze is contained in R1. The heap pointer is a software pointer. There is no dedicated register (like the stack). It is purely a C/software construct. No special handling is done when handling interrupts, etc. A heap is defined by the C programming language standard, and hence not documented. A stack pointer is saved (on the stack itself) on multiple occasions (including interrupts). Again, this is a default behavior for all stack-based processor architectures and hence no special documentation is present.

For PowerPC:

The PowerPC stack and heap information is available on the IBM Web site at

http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF77852569970071B0D6/$file/eabi_app.pdf

AR# 24291
Date Created 09/04/2007
Last Updated 12/15/2012
Status Active
Type General Article