| |||
| Home > Controlling runtime messages > 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 default stack base, also known as the top of memory, is 0x80000.
A full, descending stack is the default, so this means that the
highest addressed word available for use by the stack is 0x7FFFC.
The heap base is an offset address with a default value of 0x0.
This places the heap contiguous to the application code.
The following figure shows a typical layout for an ARM® target.
DS-5 Debugger Command Reference: