Disabling or enabling semihosting

Semihosting is a feature that allows you to write debug information to the console of the LPCXpresso debugger.
But you should note that this is only available when connected to the LPCXpresso debugger, whenever you try to write information to the debug console without an active debugger connection, your application will hang.

Semihosting is performed through the C-library.
To enable or disable semihosting, the correct C-library must be selected in the project properties:


In C/C++ Build → Settings, go to the MCU Linker → Target section and select the library with or without semihosting enabled.

Note that this setting is available for both the Debugging and Release configurations. It is perfectly possible to create Release configuration with semihosting enabled (although this may not be that useful).