Standard C Library File, I/O and OS Retargeting
All Data Structures Functions Variables Typedefs Modules Pages
Overview

Application code frequently uses standard C library functions, such as fopen, fwrite, printf(), scanf() and others to perform input/output operations.

These functions may as well be used is a multithreaded environment.

The structure of these functions in the standard C run-time library together with the retarget interfaces is:

Software Structure Overview

Standard C library functions are platform independent and can be easily ported, while the low-level interfaces needs to be tailored to the chosen platform. Generally low-level I/O functions serve to interact with the file system and a serial interface, i.e. terminal. Multithreading support is available for applications that run on top of an RTOS kernel. CMSIS-Compiler enables platform specific retargeting by providing software components that break down into the following interfaces:

  • File interface that enables reading and writing files
  • I/O interface to enable standard I/O stream retargeting (stderr, stdin, stdout)
  • OS interface that enables multithread safety using an arbitrary RTOS

The pages Low-Level I/O Retarget and Multithreading Support Retarget explain the details about how retargeting is done using the provided components.