The Common Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for microcontrollers based on Arm Cortex processors. It defines interfaces and design methods that provide a common software framework to all Cortex-M processor vendors.
CMSIS enables consistent and simple software interfaces to the processor and the peripherals, simplifying software reuse and reducing the learning curve for microcontroller developers. It speeds up the development process by providing a common software framework across multiple Cortex-M vendors.
History of CMSIS
CMSIS was originally developed by Arm in partnership with silicon and software vendors to meet the requirements of the Cortex-M processor series. It was first released in 2004 for Cortex-M3 processors.
Over the years, CMSIS has evolved to add support for newer Cortex-M processors and features. The adoption of CMSIS by microcontroller vendors has increased significantly. As of today, CMSIS has become a de-facto standard for Cortex-M software development.
Main Components of CMSIS
CMSIS defines interfaces for various software components that abstract microcontroller hardware:
This provides a common interface to the Cortex-M processor core, defining:
- Access to core registers like Control, Status, Interrupt Handling etc.
- Structures and functions for core initialization and configuration.
- Common definitions for interrupt handling and exceptions.
This defines interfaces for using real-time operating system (RTOS) with the Cortex-M processor, providing:
- Functions for thread management, synchronization, timers etc.
- Common kernel interface used by various RTOSes like FreeRTOS, RTX etc.
This provides a common library of DSP functions optimized for Cortex-M processors, including:
- Math functions like matrix operations, filtering, transforms etc.
- Complex math functions.
- Statistical functions.
- Fast math and trigonometric functions.
This provides generic peripheral driver interfaces for middleware stacks and user applications, with common APIs for:
- GPIO and Pin muxing.
- UART, I2C, SPI communication peripherals.
- ADCs and DACs.
This defines a common structure and tools for distributing software components and projects, providing:
- Standardized structure of software packages.
- Tools to manage and integrate software packages.
This provides standard XML schemas to describe microcontroller peripherals and memory mapped registers, enabling:
- Automated generation of peripheral initialization code.
- Device configuration tools.
Benefits of Using CMSIS
Adopting CMSIS in your microcontroller software development provides many benefits:
- Portability: CMSIS provides a hardware abstraction layer, so the same software can work across different Cortex-M vendors with minimal changes.
- Reusability: Software written using CMSIS is reusable across projects and microcontroller families.
- Faster Development: CMSIS reduces software development time by providing standard interfaces, software components and enable rapid prototyping.
- Quality: The CMSIS components are production-proven in thousands of applications and rigorously validated.
- Ecosystem: A vibrant ecosystem of software components like RTOSes, middleware, drivers etc. is enabled by CMSIS.
- Maintenance: CMSIS reduces software maintenance costs compared to vendor specific software stacks.
- Documentation: CMSIS is well documented with API references and programming guides.
By using CMSIS, developers can focus on their application instead of microcontroller specifics and benefit from software reuse across projects.
ARM maintains a CMSIS Conformance test suite to validate conformance of microcontroller software packs to the CMSIS specifications. Conforming software packs are certified through this process.
Silicon vendors need to obtain CMSIS certification for their software development kits (SDKs) to claim conformance. Certified SDKs are labelled with a CMSIS Conformant logo.
Conformance ensures a baseline quality standard and interoperability. End users of CMSIS components can thus easily integrate them into their application.
Using CMSIS in Software Projects
To use CMSIS effectively in your projects, the following workflow is recommended:
- Start with a certified CMSIS conformant software pack from your microcontroller vendor.
- Configure processor and peripherals using vendor provided CMSIS headers and startup code.
- Develop your application code on top of the hardware abstraction layer provided by CMSIS packs.
- Reuse proven CMSIS middleware components like RTOS, USB stack, TCP/IP stack etc.
- Take advantage of CMSIS-DSP for efficient DSP algorithms.
- Use CMSIS-Driver for Processor peripherals like GPIO, UART for hardware independence.
Many IDEs like Keil MDK, IAR EWARM, armGCC etc. provide out of the box support for CMSIS Software Packs. This enables rapid prototyping by configuring the target microcontroller and importing relevant software components.
CMSIS uses the following versioning scheme:
CMSIS-Core: Major.Minor (Eg: 5.6)
CMSIS-RTOS: Major.Minor (Eg: 2.1)
CMSIS-DSP: Major.Minor.Patch (Eg: 1.9.0)
CMSIS-Driver: Major.Minor (Eg: 2.3)
CMSIS-Pack: Major.Minor (Eg: 1.4)
CMSIS-SVD: Major.Minor (Eg: 1.1)
The version number is incremented when interfaces change or new features are added. Customers should use the latest version compatible with their hardware.
Latest Developments in CMSIS
Recent developments in CMSIS include:
- Support for latest Cortex-M processors like Cortex-M55.
- RTOS v2 API with improved thread safety.
- DSP optimizations for machine learning.
- Driver interfaces for new peripherals like WiFi, Bluetooth, Ethernet MAC.
- Updates to Pack format and tools.
CMSIS continues to evolve under stewardship of Arm and with contributions from silicon partners and software vendors. It has become an essential component in the embedded software development ecosystem for Cortex-M processors.
CMSIS has evolved over more than a decade to provide a stable, production-grade software abstraction layer for Cortex-M microcontrollers. Adopting CMSIS brings portability, reusability and quality to embedded software projects. Millions of new microcontroller designs can benefit from the CMSIS framework.