For example, when you start work on software for an embedded application, you might not
know the details of target peripheral devices, the memory map, or even the processor
To enable you to proceed with software development before
such details are known, the compilation tools have a default behavior
that enables you to start building and debugging application code
immediately. It is useful to be aware of this default behavior,
so that you appreciate the steps necessary to move from a default
build to a full standalone application.
In the ARM C library, support for some ISO C functionality,
for example program I/O, is provided by the host debugging environment.
The mechanism that provides this functionality is known as semihosting.
When semihosting is executed, the debug agent suspends program execution.
The debug agent then uses the debug capabilities of the host (for
example printf output to debugger console) to service the semihosting
operation before code execution is resumed on the target. The task
performed by the host is transparent to the program running on the