CMSIS-Compiler Support  
Standard C Library File, I/O and OS Retargeting
No Matches

CMSIS-Compiler provides software components that simplify retargeting of standard C run-time library functions.

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 in 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
  • STDIN interface that enables standard input stream redirection
  • STDOUT interface that enables standard output stream redirection
  • STDERR interface that enables standard error stream redirection
  • 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.

Using CMSIS-Compiler developers can retarget standard I/O streams and file operations to specific platform and enable thread safe operations using RTOS interface.


  • CMSIS-Compiler replaces and extends retargeting functionality previously provided as part of Keil::ARM_Compiler pack.
  • See Migrating projects from CMSIS v5 to CMSIS v6 for a guidance on updating existing projects to CMSIS-Compiler.

Supported Toolchains

The CMSIS-Compiler component is available for the following toolchains:

Support for IAR Compiler support will be added in a future revision of the CMSIS-Compiler.

Access to CMSIS-Compiler

CMSIS-View is actively maintained in CMSIS-Compiler GitHub repository and is released as a standalone CMSIS-Compiler pack in the CMSIS-Pack format.

The table below explains the content of ARM::CMSIS-Compiler pack.

Directory Description
📂 documentation Folder with this CMSIS-Compiler documenation
📂 example I/O Retarget example project
📂 include Header files with Retargeting functions
📂 source Compiler-specific implementations of regargeting functions
📂 template User Template files
📄 ARM.CMSIS-Compiler.pdsc CMSIS-Pack description file
📄 LICENSE License Agreement (Apache 2.0)

See CMSIS Documentation for an overview of CMSIS software components, tools and specifications.

Documentation Structure

This documentation contains the following sections:

  • Revision History : lists CMSIS-Compiler releases.
  • Low-Level I/O Retarget : explains low-level I/O retargeting, list available components and describes available user code templates.
  • Multithreading Support Retarget : explains multithreading support retargeting, list available components and describes available user code templates.
  • The I/O Retarget example project shows how to retarget the output to a UART on an Arm Virtual Hardware model.
  • Templates : contains the user code template files for the different use cases.
  • API Reference describes the API and the functions of the CMSIS-Compiler components in details.


CMSIS-Compiler is provided free of charge by Arm under the Apache 2.0 License