Skip to content

Latest commit

 

History

History
164 lines (133 loc) · 11.2 KB

introduction.md

File metadata and controls

164 lines (133 loc) · 11.2 KB

Introduction {#mainpage}

The CMSIS (Common Microcontroller Software Interface Standard) is a set of APIs, software components, tools, and workflows that help to simplify software re-use, reduce the learning curve for microcontroller developers, speed-up project build and debug, and thus reduce the time to market for new applications.

CMSIS started as a vendor-independent hardware abstraction layer Arm® Cortex®-M based processors and was later extended to support entry-level Arm Cortex-A based processors. To simplify access, CMSIS defines generic tool interfaces and enables consistent device support by providing simple software interfaces to the processor and the peripherals.

CMSIS has been created to help the industry in standardization. It enables consistent software layers and device support across a wide range of development tools and microcontrollers. CMSIS is not a huge software layer that introduces overhead and does not define standard peripherals. The silicon industry can therefore support the wide variations of Arm Cortex processor-based devices with this common standard.

CMSIS Components {#cmsis_components}

CMSIS Structure

CMSIS Base Software Components

- Provide software abstractions for basic level functionalities of a device. - Maintained in the same GitHub repository and delivered as a bundle in \ref cmsis_pack.
CMSIS-Core (M)Standardized API for Cortex-M processor coresGuide | GitHub
CMSIS-Core (A)Standardized API for Cortex-A5/A7/A9 coresGuide | GitHub
CMSIS-DriverGeneric peripheral driver interfaces for middlewareGuide | GitHub
CMSIS-RTOS2Common API for real-time operating systemsGuide | GitHub

CMSIS Extended Software Components

- Implement specific functionalities optimized for execution on Arm processors. - Maintained in separate GitHub repositories and delivered in standalone CMSIS-Packs.
CMSIS-DSPCollection of optimized compute library for embedded systemsGuide | GitHub
CMSIS-NNCollection of efficient and optimized neural network kernelsGuide | GitHub
CMSIS-ViewEvent Recorder and Component Viewer technologyGuide | GitHub
CMSIS-CompilerRetarget I/O functions of the standard C run-time libraryGuide | GitHub

CMSIS Tools

- Provide useful utilities for software development workflows with CMSIS-based components. - Maintained in separate GitHub repositories.
CMSIS-ToolboxA set of command-line tools to work with software packsGuide | GitHub
CMSIS-StreamPeripheral description of a device for debug viewGuide | GitHub
CMSIS-DAPFirmware for debug units interfacing to CoreSight Debug Access PortGuide | GitHub
CMSIS-ZoneDefines methods to describe system resources and to partition themGuide | GitHub

CMSIS Specifications

- Define methodologies and workflows for embedded software development.
CMSIS-PackDelivery mechanism for software components and device/board supportGuide | GitHub
CMSIS-SVDPeripheral description of a device for debug viewGuide | GitHub

Benefits {#benefits}

The benefits of the CMSIS are:

  • CMSIS reduces the learning curve, development costs, and time-to-market. Developers can write software quicker through a variety of easy-to-use, standardized software interfaces.
  • Consistent software interfaces improve the software portability and re-usability. Generic software libraries and interfaces provide consistent software framework.
  • It provides interfaces for debug connectivity, debug peripheral views, software delivery, and device support to reduce time-to-market for new microcontroller deployment.
  • It allows to use the compiler of your choice, as it is compiler independent and thus supported by mainstream compilers.
  • It enhances program debugging with peripheral information for debuggers and ITM channels for printf-style output.
  • CMSIS is delivered in CMSIS-Pack format which enables fast software delivery, simplifies updates, and enables consistent integration into development tools.
  • CMSIS-Zone will simplify system resource and partitioning as it manages the configuration of multiple processors, memory areas, and peripherals.
  • Continuous integration is common practice for most software developers nowadays. CMSIS-Build supports these workflows and makes continuous testing and validation easier.

Development {#development}

CMSIS is defined in close cooperation with various silicon and software vendors and provides a common approach to interface to peripherals, real-time operating systems, and middleware components. It is intended to enable the combination of software components from multiple vendors.

CMSIS is open-source and collaboratively developed. The repository for the base components is github.com/Arm-software/CMSIS_6.

CodingRules {#coding_rules}

The CMSIS uses the following essential coding rules and conventions:

  • Compliant with ANSI C (C99) and C++ (C++03).
  • Uses ANSI C standard data types defined in \b <stdint.h>.
  • Variables and parameters have a complete data type.
  • Expressions for \c #define constants are enclosed in parenthesis.
  • Conforms to MISRA 2012 (but does not claim MISRA compliance). MISRA rule violations are documented.

In addition, the CMSIS recommends the following conventions for identifiers:

  • CAPITAL names to identify Core Registers, Peripheral Registers, and CPU Instructions.
  • CamelCase names to identify function names and interrupt functions.
  • Namespace_ prefixes avoid clashes with user identifiers and provide functional groups (i.e. for peripherals, RTOS, or DSP Library).

The CMSIS is documented within the source files with: \li Comments that use the C or C++ style. \li Doxygen compliant function comments that provide: - brief function overview. - detailed description of the function. - detailed parameter explanation. - detailed information about return values.

Doxygen comment example:

/**
 * @brief  Enable Interrupt in NVIC Interrupt Controller
 * @param  IRQn  interrupt number that specifies the interrupt
 * @return none.
 * Enable the specified interrupt in the NVIC Interrupt Controller.
 * Other settings of the interrupt such as priority are not affected.
 */

Validation {#validation}

The various components of CMSIS are validated using mainstream compilers. To get a diverse coverage,
Arm Compiler v6 (based on LLVM front-end) and GCC are used in the various tests. For each component, the section Validation describes the scope of the various verification steps.

CMSIS components are compatible with a range of C and C++ language standards. The CMSIS components comply with the Application Binary Interface (ABI) for the Arm Architecture. This ensures C API interfaces that support inter-operation between various toolchains.

As CMSIS defines API interfaces and functions that scale to a wide range of processors and devices, the scope of the run-time test coverage is limited. However, several components are validated using dedicated test suites (CMSIS-Driver, and CMSIS-RTOS v2).

The CMSIS source code is checked for MISRA C:2012 conformance. MISRA deviations are documented with reasonable effort, however Arm does not claim MISRA compliance as there is today for example no guideline enforcement plan. The CMSIS source code is not checked for MISRA C++:2008 conformance as there is a risk that it is incompatible with C language standards, specifically warnings that may be generated by the various C compilers.

License {#License}

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