About semihosting and top of memory

Semihosting is typically used when debugging an application that is using the C library and running without an operating system. This enables functions in the C library, such as printf() and scanf(), to use the screen and keyboard on the host workstation instead of having a screen and keyboard on the target system.

Semihosting uses stack base and heap base addresses to determine the location and size of the stack and heap.

The stack base, also known as the top of memory, is an address that is by default 64K from the end of the heap base.

The heap base is by default contiguous to the application code.

The following figure shows a typical layout for an ARM® target.

Figure 39. Typical layout between top of memory, stack, and heap

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0446K
Non-ConfidentialID071912