Develop faster with software components
Author: Johannes Bauer, Arm Germany
Contribution – Embedded Software Engineering Congress 2015
Modern microcontrollers based on Arm Cortex-M are suitable for an ever-increasing range of applications due to their high computing power, versatile peripheral functions, and low power consumption. These complex applications require advanced software development methods to ensure high-quality products and short development times. Arm's approach to modular development utilizes standardized software components in the CMSIS pack format.
If there's one trend in embedded systems that everyone can agree on, it's the trend toward greater functionality. While in the past many products made do with the simplest 4- or 8-bit microcontrollers, today's development is increasingly moving toward 32-bit architectures, as evidenced by the growing number of manufacturers adopting Arm Cortex-M processors. These microcontrollers offer high clock speeds of up to several hundred MHz, versatile peripheral functions, and consistently low power consumption. These characteristics make the systems attractive for a significantly wider range of applications.
One example is the much-discussed Internet of Things (IoT) applications, which will bring a large number of systems that are constantly connected to the internet. Specifically for use in typical consumer devices, Arm has announced mbed OS, a complete, non-real-time operating system that covers functionality such as encryption, device security, communication protocols, and over-the-air updates, and also provides a command-line-oriented development environment. However, not all requirements for embedded systems can be met with it, so a wide variety of real-time operating systems, middleware components, and development tools are still to be expected.
With the increasing complexity of embedded applications, it is necessary to rethink development methodologies. Where it was previously common practice for entire systems to be developed entirely by individuals, this is often no longer feasible given the ever-expanding functional requirements. Pre-built software components are therefore becoming increasingly important, ranging from operating systems and interface libraries to communication protocols. However, to work effectively with these components, standardization is essential to ensure compatibility between software components, as well as with different microcontroller platforms and development tools.
For precisely this purpose, Arm developed the CMSIS-Pack format [1] as part of the comprehensive Cortex Microcontroller Software Interface Standard (CMSIS) [2]. CMSIS-Pack defines both a package format and a distribution mechanism for software components, emphasizing the ease with which existing software can be offered as a so-called "software pack." This is achieved using an XML-based description file, which provides, among other things, the following information in a machine-readable format:
- Microcontroller parameters such as processor core, memory areas, and debug interfaces
- Included code, as source code or library
- Compatibility with processor cores and compiler toolchains
- Dependencies on other software components
- Documentation and license information
This "Pack Description" file with the extension .pdsc is packed together with the other files of the software component into a zip archive, which then receives the extension .pack.
The specific functionality will be explained using two examples. First, CMSIS-Pack will be used to create a so-called "Device Family Pack," which contains all the information required for a development environment to support a specific microcontroller. In the Arm Cortex-M world, this includes startup and header files, the System View Description for register descriptions in the debugger, the flash algorithm for writing to the on-chip memory, and several other specifications, all of which are described in the CMSIS standard. This information is provided by virtually all Cortex-M microcontroller vendors. It simply needs to be described in a .pdsc file so that the development environment recognizes the microcontroller's name, type, and configuration and can display them to the developer. Files that are toolchain-specific, such as the startup routines usually written in assembly language, can be marked accordingly. This allows a single Device Family Pack to cover all desired development environments.
A second example is a software component such as an HTTP server. The existing code can be adopted without modification. The software pack's .pdsc file then specifies the manufacturer, name, and type, as well as information on which files need to be modified by the developer and therefore copied into the project, and which files, such as pre-compiled libraries, only need to be referenced. Different variants can also be defined, for example, for different Cortex-M cores, which are then automatically selected by the development tool.
In addition to describing the software components, CMSIS-Pack also defines a simple mechanism for distributing the packages. A URL can be specified in the .pdsc file, which serves as the source for updates. For the provider of a pack, this results in several stages for publication:
- Exclusively private, offline available packs
- Private packs available on intranet servers for easy updates
- Semi-public packs available on web servers, which are distributed to selected customers.
- Public packs that are available to everyone.
Arm maintains an index [3] of all currently publicly available packs.
The open definition of CMSIS-Pack allows for flexible use of the software packs for many applications. Currently, packs are used for the described Device Family Packs, for distributing the CMSIS package, for middleware and libraries, for board support packs, and for sharing custom software components within a company. The CMSIS Pack standard has already been adopted by many semiconductor manufacturers, including Atmel, Texas Instruments, and Infineon. Many others are planning to implement it or are about to. Software vendors such as Micrium and Yogitech have also released their own packages.
Currently, development tools include the reference implementation of Arm in the Keil Microcontroller Development Kit (MDK) and Atmel Studio 7, which uses Device Family Packs for both Atmel's Arm and AVR-based microcontrollers. Arm has also released an open-source implementation of CMSIS pack support for Eclipse environments [4], which should accelerate support for the format in Eclipse-based development environments.
This creates favorable conditions for the further adoption of the CMSIS Pack format. Arm is open to contributing to the further development of the standard and invites all interested parties, whether semiconductor manufacturers, software providers, or developers, to participate.
Sources
[1] https://www.keil.com/pack/doc/CMSIS/Pack/html/index.html
[2] https://www.keil.com/pack/doc/CMSIS/General/html/index.html
[3] https://www.keil.com/dd2/Pack/
[4] https://github.com/ARM-software/cmsis-pack-eclipse-prebuilt
Implementation – our training & coaching
Do you want to bring yourself up to date with the latest technology?
Then find out more here MircoConsult offers training courses/seminars/workshops and individual coaching on the topic of implementation/embedded and real-time software development.
Training & coaching on the other topics in our portfolio can be found here. here.
Implementation – Expertise
Valuable expertise in the field of implementation/embedded and real-time software development is available. here Available for you to download free of charge.
You can find expertise on other topics in our portfolio here. here.
