CMSIS-RTOS Tutorial
Introduction
This tutorial is an excerpt from “The Designers Guide to the Cortex-M Processor
Family” by Trevor Martin and is reproduced with permission of Elsevier. For
more details please see the Further Reading section at the end of this tutorial.
In this tutorial we are going to look at using a small footprint RTOS running on a
Cortex-M based microcontroller. Specifically we are going to use an RTOS that
meets the ‘Cortex Microcontroller Interface Standard’ (CMSIS) RTOS
Specification. This specification defines a standard RTOS API for use with
Cortex-M based microcontrollers. The CMSIS-RTOS API provides us with all
the features we will need to develop with an RTOS, we only need to learn it once
and then can use it across a very wide range of devices. CMSIS-RTOS also
provides a standard interface for more complex frameworks (Java Virtual
Machine, UML). It is also a standard interface for anyone wanting to develop
reusable software components. If you are new to using an RTOS it takes a bit of
practice to get used to working with an RTOS but once you have made the leap
the advantages are such that you will not want to return to writing bare metal
code.
Getting Started- Installing the tools
To run the examples in this tutorial, it is first necessary to install the MDK-ARM
toolchain. First download the MDK-Core Version 5 using the embedded URL
below and run the installation file.
http://www.keil.com/mdk5/install
This installs the core toolchain which includes the IDE, compiler/linker and the
basic debugger. It does not include support for specific Cortex-M based
microcontrollers. To support a given microcontroller family we need to install a
‘Device Family Pack’. This is a collection of support files such as startup code,
flash programming algorithms and debugger support that allow you to develop
with a specific microcontroller family.
The MDK-ARM toolchain
consists of a Core Installation
(IDE, Compiler and Debugger)
plus additional software packs
added through a pack installer