3.4.2. Using the ARM libraries in a non-semihosted environment

If you do not want to use any semihosting functionality, you must ensure that either no calls are made to any function that uses semihosting or that such functions are replaced by your own non-semihosted functions.

To build an application that does not use semihosting functionality:

  1. Create the source files to implement the target-dependent features.

  2. Use #pragma import(__use_no_semihosting_swi) to guard the source.

  3. Link the new objects with your application.

  4. Use the new configuration when creating the target-dependent application.

You must re-implement functions that the C library uses to insulate itself from target dependencies. For example, if you use printf() you must re-implement fputc(). If you do not use the higher level input/output functions like printf(), you do not have to re-implement the lower level functions like fputc().

If you are building an application for a different execution environment, you can re-implement the target-dependent functions (functions that use the semihosting SWI or that depend on the target memory map). There are no target-dependent functions in the C++ library. See the chapter on libraries in the ADS Compilers and Libraries Guide for more information.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0064D
Non-Confidential