Create Scalable Software

Virtual Workshop
Arm MCU Tools Team11 June 2024
© 2024 Arm

AgendaWhat is scalable, reusable software?
• CMSIS Software Components and usage by MDK-Middleware• Reference Applications that help to kick-start user application• Hands-on Demo• Overview of Software Packs that are maintained and can be re-used

CMSIS-Tool Overview
Pack Structure for re-usable software• Overview, API interfaces, and Taxonomy for software components• How to Register your Taxonomy• CMSIS-Pack Developer Resources (Hands-on material, Tools)

Benefits of the Pack System – Software Vendor View
Summary and Guidelines2© 2024 Arm

What is scalable,
reusable software?
Reinhard Keil

© 2024 Arm

Version 6
Consistent software framework for billions of devices
Application codegithub.com/ARM-software/CMSIS_6
Debugger

CMSIS-Toolbox
Command-line
project build

CMSIS-Driver
Middleware I/F

CMSIS-RTOS2

Real-time execution

CMSIS-DSP

Compute library

CMSIS-NN

Machine learning

CMSIS-Compiler
I/O Retargeting

CMSIS-SVD

Peripheral description

CMSIS-Stream
CMSIS-CoreCMSIS-View

Processor core and peripheral access

Event recorder

CMSIS-DAP
Debug access

System partitioning

Arm Cortex processor and peripherals

On-chip
memoryCoreSight
debug logic

MPU, SAUCMSIS-Zone

Optimized
data streamingfor ML and DSPCMSIS-Pack

Software packaging
and delivery

System-on-chip
Software components for the Arm Cortex processor target4© 2024 Arm

Tools for optimizing software development flows

Specifications

How to utilize CMSIS Components
Exemplified on github.com/arm-software/MDK-Middleware
CMSIS components are thesoftware foundation formany applications
Work with all Cortex-M andall main-stream compilers
Integrate (third-party)
software components

To make the system work
standardized APIs are
required5© 2024 ArmReference Applications• show usage of middleware - kick-start application development• use defined APIs - run on different eval boards• use software layers to target hardware – target custom HW easier

github.com/ARM-software/MDK-Middleware/tree/main/Examples
6© 2024 ArmReference Applications + Combinations with Boards
github.com/arm-software/MDK-Middleware

github.com/open-cmsis-pack/Sensor-SDK-Example

Other potential examples (uncommitted)
MDK Middleware with:- WiFi- SDS Framework connected to sensors

USB Device / Host
Network (optional with mbedTLS)
File System

AWS Cloud connectivity with:- device security via PSA- firmware update service
CANopen examples (potential partner EmSA)

Showing 2 different sensors:- without RTOS
- with FreeRTOS (native)- with CMSIS-RTOS2

Graphic display examples (potential partner Crank)

Compatible Board Layers

MPS3 withFPGA image

7© 2024 Arm

STM32 Boards

NXP Board

Arm Virtual Hardware

Start Projects
IDE Workflow – Step 1 of 2: Select Reference Application
User selects• Target Board• Reference Application

IDE• Installs DFP + BSP• Copies reference application tosolution directory• Inserts board to csolution.yml file• Calls cbuild setup to check for layers

Templates, Reference Applications, and Examples

Drop-down toolchain selection

8© 2024 Arm

Only for Reference Application
IDE Workflow – Step 2 of 2: Add Software Layer
User selects• Selects potential layer options• Confirms with “Create”

IDE• Copies layers to application• Inserts layer names to csolution.yml filehttps://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/main/docs/YMLCBuild-Format.md#configurations
9© 2024 Arm

Hands-On

Create Scalable Software
github.com/Open-CMSIS-Pack/Create-Scalable-SW
Robert Rostohar© 2024 Arm

Available Software Packs
CMSIS Components•

CMSIS v6: Base pack with Core, RTOS2 API, Driver API•

CMSIS-Compiler: Retarget I/O functions of C run-time library•

CMSIS-DSP: Optimized compute functions•

CMSIS-NN: Efficient and performant neural network kernels.

•

CMSIS-View: Event Recorder and Component Viewer technology

Maintained by Arm- Sematic versioning is implemented- APIs are stable and consistent across supported targets- Designed to work across many different tools and IDEs

Real-Time Operating Systems•

CMSIS-FreeRTOS: FreeRTOS native + CMSIS-RTOS2 adaptation•

CMSIS-RTX: Keil RTX5 real-time operating system.

•

LwIP: FreeRTOS Middleware and Cloud Service Interfaces•

CMSIS-RTOS2 Validation: for CMSIS-RTOS2 implementations•

TensorFlow: FreeRTOS Middleware and Cloud Service Interfaces

Middleware

Community maintained•

Arm ML embedded evaluation kit: collection of ML models•

MDK-Middleware: File system, network, USB Device, USB Host.

•

Unity: Unit test framework built for C with a focus on embedded•

CMSIS-mbedTLS: Mbed TLS framed in a CMSIS-Pack.

•

CMSIS-Driver_STM32: CMSIS-Driver interface to STM32 HAL•

SDS-Framework: Synchronous data streaming.

Other Software Components

11•

Cortex_DFP: Generic Arm Cortex-M device family pack.

•

CMSIS-Driver: MCU peripheral driver implementations.

•

CMSIS-Driver Validation: for CMSIS-Driver implementations.

•Arm-2D: 2.5D graphic image processing on Cortex-M© 2024 Arm

Many other packs are provided by the ecosystem
FreeRTOS Components by AWS•

github.com/FreeRTOS/CMSIS-Packs: FreeRTOS Middleware and Cloud Service Interfaces

CMSIS Tool Overview

Christopher Seidl© 2024 Arm

CMSIS-Toolbox: Basis for next generation software tooling
Command line workflow
csolution project

Visual Studio Code IDE

Software Packs*.csolution.yml
Target and Build
Parameters

Device/Board
Generic Software*.cproject.yml
source files andSW components*.clayer.yml

Preconfigured parts(i.e. Board abstraction)

CMSIS-Toolbox

cbuild: Build Invocation

All mainstream compilers are supported (Arm, Clang, GCC, IAR)
github.com/Open-CMSIS-Pack/csolution-examples
13© 2024 Arm

CMSIS-Toolbox: Eco-system integration
Public CMSIS Packs

Eclipse IDE

www.keil.arm.com/packs/

cmsis-pack-eclipse

CI Reproducible Builds

IAR EW-ARM
Keil µVision
STM32CubeMX
MCUXpresso Config Tools
CMSIS-Toolbox
Generator Integration14© 2024 Arm

github.com/Arm-Examples/AVH_CI_Template

CMSISToolbox

MLOps Integration
github.com/Arm-Examples/AVH_CI_Template

TDK Qeexo AutoML
qeexo.tdk.com

Edge Impulse
docs.edgeimpulse.com/docs/runinference/arm-keil-cmsis

Tools Roadmap
Visual Studio
Code - CMSISMDKMiddleware

CMSIS
ToolboxVisual Studio
Code - Debug

MDK v6AC6.22 support• Keil Studio Desktop• AVH-FVP 11.24•

FuSa RTS 1.2.0
RTOS and base libraries
Process Isolation• Integrates with STLFree for Arm targets
For: AC6, GCC, IAR, LLVM
• Sensor SDK Example
•

•

•

•

CMSIS-Toolbox 2.4.0
Improved Cmake Backend
Pre/Post build• Reference Application
Support•CMSIS-Toolbox 2.5.0••

Toolchain selection
Feature complete

Arm Debugger 6.1.1
Core register view
Memory inspector• Run on remote AVH• Debug connection config•

Off-chip memory support
via scripting• Strategy for Cortex-A/M
debug configuration

2024-CQ2
Done

Committed

Pack Datasheet fordiscovery of SW packs•

Cortex-A/M Support

Middleware 8.1.0

Support for STM32
Reference applications for
Ethos-U55 / Cortex-M55••

Maintenance
Reference applicationsfor SDS and Cloud Service

CMSIS-Toolbox 2.6.0•

Feature enhancement••

Middleware 8

Middleware 8 - Beta•

2024-CQ1© 2024 Arm

Enhance Component
selection• local pack support• layer management
•

•

•

15

Reference Applications
with Layer discovery• Keil Studio Cloud basedon VS Code•MDK v6.x

Improve Web UX

Improve Pack System

Maintenance

Cortex-M
RTOS aware processes andthreads stack view
• UX improvements• GDB Server architecture•2024-CQ3
Tentative

Cortex-A/M

Arm Debugger 6.x
Enhanced disassemblyview• Define future tracearchitecture•2024-CQ4
Requested

Initial multicore support
Component viewer• Event recorder
•

Trace
•

Trace visualisation•

2025-CQ1

FutureExtend your tools with Arm VS Code extensions and APIs

Integrate Arm’s extensions into yourtool products and workflows, creating
the best overall experience for yourdevelopers
Use the VS Code dependency systemor access the extension API directly16© 2024 Arm

Access device information andsoftware examples from the OpenCMSIS Pack ecosystem through APIs toenhance your websites or tools
products
Contact Arm about API accessArm Keil Studio Pack – Essential VS Code Extensions
Project & Build

Description

Used Services

Arm CMSIS Solution (*)

Create and Manage CMSIS based projects

CMSIS-Toolbox (CMake, Ninja), Compiler (AC6, GCC, LLVM)
Arm License Manager – for activation of Arm Compiler

Arm Environment
Manager

Arm Tools installation and activation

MSFT vcpkg
Arm License Manager – for activation of Arm Compiler

clangd (LLVM)

Intellisense

YAML (RedHat)

YAML Language Support

Debug

Description

Used Services

Arm Debugger

Debug for Cortex-M/A processors

Arm CLI Debugger, MSDAP

Arm Device Manager

Manages device connections andconfiguration for Arm Cortex-M

ULINK series, CMSIS-DAP, ST-Link, Arm Fixed Virtual Platforms

Eclipse CDT Cloud
Memory Inspector
Peripheral Inspector
Web Socket
17© 2024 Arm

Memory Window
SVD supported access to peripherals

MSDAP

Automated delivery of Arm tools
Tool deployment to MDK (VS Code), CI SaaS, and MLOps
Git
RepositoryMDK(VS Code)

MLOps System(i.e. Qeexo)

SaaS CI System(i.e. GitHub)

vcpkg
configurationvcpkg enabled

Direct access/vcpkg enabled

Direct accessTools installedon demandUser Code

ML Modelartifacts.tools.arm.com provides access to
all tools for installation in different
environments.
Microsoft vcpkg simplifies the tool
installation across various host systems.
• The vcpkg_configuration.json file specifies therequired tools.
• Adding vcpkg_configuration.json to the project
ensures consistent setup.

MLOps and CI systems may access tools
directly.
tools
artifactory18© 2024 Arm

Consistent, project-specific tools setup

Example for Docker setup:
github.com/ARM-software/AVH-MLOps

Arm Virtual Hardware – Fixed Virtual Platforms (AVH-FVP)
Test Infrastructure for CI Automation
Software Development Tools

AVH-FVP for unit or integration
tests offer significant benefits:

Arm C/C++ Compiler
CMSIS-Toolbox, CMake, Python

Speed: no flash download
overhead.
§ Scale: run many tests in parallel.
§ Reliable: no failure in case of
misuse§ Flexible: execute on local
computer or cloud server

AVH FVP
Simulation Model

Local softwaredevelopment
and debugging

Project Workspace

CI / MLOps§

Test Platform

Time *

Hardware Board

488s

AVH-FVP (single system)

259s

AVH-FVP (two parallel)

160s* Execution time measured with 124 test cases
19

Flexible usage during Development Process

REGRESSION TESTING© 2024 Arm

IDE

Trigger CI testingon Git commits.

Resources
CMSIS Software Packs
RTOS, IoT connectors, …
GitHub repositories
application code, test cases

Integrate in
MLOps systems
Used for Validation of CMSIS Components
Example: CMSIS/CoreValidation
Get Started: github.com/Arm-Examples/AVH_CI_TemplateArm Virtual Hardware: Virtual Test Interfaces
User Application Code (Example)
CMSIS-RTOS2
FreeRTOS, RTX, …
Event Recorder

Application that connects to Internet via BSD-Socket
Demo or test
Interfacei.e. Voice
Recognition

TCP/IP
Network Stack

VirtualTargetVirtualInterfaces

Ethernet

Event Recorder
Capturing

Maps also to agraphical user panel20© 2024 Arm

This is a complex user
application that requires
internet connectivity

CMSIS-VIO
for Switches/LEDs

Audio Driver
VSI

Ethernet Driver

Demo I/O Interface(VIO)

Virtual Streaming
Interface (VSI)

Virtual Socket
Interface (VSocket)

Events on changesof LEDs

Python Interface:- Script for Audio
Input/Output

Connection to theInternet via Socket

The interface layer
can be re-targeted tophysical hardware

VSI is under user control
and can service also
Video or Sensor data

Up to 8 VSI instances aresupportedMoving Software– from Virtual to Physical Hardware
Validation on Arm Virtual Hardware (AVH) in CI systems; Deployment to physical devices

Unit & Integration Testing on AVH or Physical Hardware Boards© 2024 Arm

User Application
Code

IoT/ML Software
Platform

IoT/ML Software
PlatformMore Software

Virtual Drivers

HW Drivers

HW Drivers

More Drivers

Device SDK withconfiguration
Real I/O via test
equipment

TargetLayer

IoT/ML Software
Platform

Simulated I/O via
Python scripts
and stimuli files

21

User Application
Code

Board
Layer

VirtualLayer

User Application
Code

Deployment and System Testing on Production Hardware

Device SDK with configuration
Real I/O via
user peripherals

Pack Structure
for Reusable Software
Reinhard Keil

© 2024 Arm

CMSIS-Pack: What is a software component?
XML framed information used by project management utilities from various tools
API Interface

Software
Component #1
Version &LicenseInformation

API headersDocumentation

Source code/
libraries

Configuration
files

References to other software components

23

API headers

API headers

API headers

Source code/
libraries

Source code/
libraries

Source code/
libraries

SW Component #2

SW Component #3

SW Component #4© 2024 Arm

Software components should have:
Version and history information
License information
API interface definition
Documentation
Source files
Configuration files (optional)
Requirements to other components(optional)
Read the blog

Relationships of packs and software components• Packs can require other packs to be available:
Pack A
Version n

Pack B
Version m• Components can have dependencies on other components; either from the same orfrom other packs:
Pack A, Version n

Component A

24© 2024 Arm

Pack B, Version m

Component B

Component C

Component A

Component B

Component C

CMSIS-Pack: Central API Interface definition - IMPORTANT!
Ensuring consistent interfaces across standard components
Interfaces

Softwarecomponent

API headers
Source code/
libraries

Central
API definition25

API headers(Definition)

Documentationof API

Source code/
libraries

Source code/
libraries

Source code/
libraries

Implementation #1

Implementation #2

Implementation #3© 2024 Arm

A common problem: API headers evolve
over time.
A central API definition shares header fileand documentation of an API interface
across multiple other software components
to ensure consistency.
The API interface is distributed separate oras part of the software component thatdefines this interface. The API header file istherefore consistent.
An example is the CMSIS-Driver pack that
contains various Flash, Ethernet and WiFi
drivers – all compatible with the CMSISDriver APIs that are published in the CMSISPack.

API Example: CMSIS-Driver
Middleware interface
CMSIS-Driver describes peripheral driver interfaces for middleware components anduser applications
It offers a simple interface to middleware and central configuration
Ready-to use CMSIS-Driver interfaces are available for many microcontroller families

User Application

Application
Middleware

26

Generic USB Device

USB Host

Networking

File System Graphics

CAN

Control Structs

GPIO0

USBD0

USBH0

ETH_PHY0

ETH_MAC0

MCI0

SPI0

CAN0

CMSIS-Driver

GPIO

USB Device

USB Host

Eth. PHY

Eth. MAC

MCI

SPI

CAN

DevicePeripheral

GPIO

USBD

USBH

Ethernet

Ethernet

SDIO

SPI

CAN

Device
Pins

GPIO

USBD0

USBH0

Ethernet

SDIO0

SPI0

RX/TX

© 2024 Arm

PHY

MAC

PDSC File Structure with APIs: connecting components- pack: ARM::CMSIS defines API and makes the API
header file accessible to all parts of the application.
<apis><api Cclass="CMSIS Driver" Cgroup="Ethernet MAC" Capiversion="2.2.0“
exclusive="0">- pack: Keil::MDK-Middleware uses an CMSIS-Driverthat is implemented for a specific hardware or evenremote interfaces<requirements><packages><files><file category="header" name="…/Driver_ETH_MAC.h" /><package vendor="ARM"

name="CMSIS"

version="5.9.0-0"/></files><conditions>- pack: ARM::CMSIS-Driver_STM32 or DFP/BSP
implements the driver interface to hardware<condition id="Driver ETH"><require Cclass="CMSIS Driver" Cgroup="Ethernet" Capiversion="2.2.0"/><requirements><components><packages><package vendor="ARM"

name="CMSIS"

version="5.9.0-0"/><files><components><component Cclass="CMSIS Driver" Cgroup="Ethernet MAC"
Capiversion="2.2.0“>27<file category="header"name="Drivers/ETH_MAC_STM32.h"/><file category="source"

name="Drivers/ETH_MAC_STM32.c"/>© 2024 Arm<file name=“…/Config/Net_Config_ETH.h" attr="config" version="7.5.0"/><file category="source" name=“…/Network/Source/net_eth.c"/></files><files></files><component Cgroup="Interface" Csub="ETH" condition="Driver ETH"
maxInstances="2">Demo© 2024 Arm

Register Cclass:Cgroup Taxonomy
Software components connect via Cclass:Cgroup:Csub – this needs therefore some level of control• github.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Taxonomy is current solution to control taxonomy• We know: this needs further work (we investigate a web service)• Mode: Board, Device are uncritical as there is a dependency to a specific board or device• Mode: Bundle is somewhat uncritical as a complete SW stack is replaced• Mode: Controlled is own by a vendor (typically the name indicates already the vendor)• Mode: Open needs clear structure as components can be added by different vendors• Mode: API describes API Interfaces and should be agreed by the Open-CMSIS-Pack working group

29

Cclass:CGroup

Mode: APICMSIS-Compiler

Retargeting for File I/O and Character I/O

CMSIS

RTOS-specific interfaces adopted by several different Kernels

CMSIS-DriverComponents implementing unified device drivers compliant to CMSIS-Driver (e.g. UART, SPI, USB, etc.)

IOT Utility:Socket

Unified BSD Socket API (simple version) – discussed in Open-CMSIS-Pack CDI working group (extended version also available)

PSA

Platform Security Architecture (currently Crypto API is exposed – supported by mbedTLS)

Security:PKCS11

PKCS #11 Cryptographic Token Interface (currently used by AWS, provided by mbedTLS)© 2024 Arm

CMSIS-Pack Developer Resources
github.com/Open-CMSIS-Pack – organizes the CMSIS-Pack Resources
Tutorial: Create Scalable Software - Hands-On Example + Video
Tutorial: Create a Software Pack - Hands-On Example + Video
Tutorial: Create a Device Family Pack - Hands-On Example + Video
Tutorial: Create a Board Support Pack - Hands-On Example + Video
Tools: gen-pack Library – template script and helper functions for creating packs
Tools: cmsis-actions – GitHub actions to setup a CMSIS-aware CI system
Tools: AVH_CI_Template – Template repository to setup a GitHub-based CI system30© 2024 Arm

Benefits of the
Pack System
Viewpoint of the software vendor
Christopher Seidl© 2024 Arm

Making your software easier to use
Increase your business while reducing efforts
Extend reach to more devices – grow potential accessible market• Reuse existing drivers and example infrastructure (board layers)• Deliver an evaluation version with limited functionality (i.e. library build)• Full version behind firewall that is a drop-in replacement

Reduce support load

• Examples are easier to use• Documentation is easier to access• Debug features of µVision help to guide customers towards integration issues

Packs are easier to upgrade• Making it easier to sell software upgrades32© 2024 Arm

Making your software easier to discoverUsers explore software examples on web pages and CMSIS-Pack enabled IDEs
Add visibility on the market – grow potential accessible market• Web services showing available software and examples• No maintenance burden – data is extracted from CMSIS-Packs automatically• Well discoverable by search engines

Easy to get started for new potential customers• Your software is exposed to thousands of developers that use already the CMSIS system• Ready-to-run examples on Keil Studio Cloud or Keil Studio Desktop• Reference Applications are templates for starting user projects

33© 2024 Arm

Pack Datasheet
Overview Text (Readme)34© 2024 Arm

List of all components

Other packs required

CMSIS ecosystem database

Available
Data

Query

Available via GraphQL
Publicly accessible via API
Database is source for keil.arm.com
Lists CMSIS ‘entities’ such as:• Boards• Devices• Packs• Example projects• Vendors

Maps the relationships• show boards by vendor• find boards by device or device by board

35© 2024 Arm

ResultSummary and Guidelines© 2024 Arm

Summary and Guidelines
Developing Software Packs is supported by a variety of tools and services
Keep your pack (including conditions) simple, work on the overall structure first
Consider to use existing API interfaces as these simplify scaling
Consider to offer a pack for evaluation and a commercial packContact us for questions that you may have. Do not work around issues.

37© 2024 ArmWe are committed to CMSIS and requirements for ML …
… and we will make it work for you – but we need your help
Discover technical information on github.com/Open-CMSIS-Pack

Open-CMSIS Technical Meeting every Tuesday, 15:00 GMT

To raise questions
or get an invite toOpen-CMSISTechnical Meetings
send email to:

Feedback via github issues on the various projects• github.com/Open-CMSIS-Pack/cmsis-toolbox/issues – for tools• github.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/issues – PDSC
• github.com/Arm-software/CMSIS_6 – project overview• github.com/Arm-software/CMSIS_6/issues – for CMSIS core components

38© 2024 Arm

cmsis@arm.com

Thank You
DankeGraciasGrazie谢谢
ありがとう
AsanteMerci감사합니다ध"यवाद
Kiitos‫ﺷﻛًرا‬ধন#বাদ
‫תודה‬© 2024 Armధన#$ాదమ(ల*The Arm trademarks featured in this presentation are registeredtrademarks or trademarks of Arm Limited (or its subsidiaries) in
the US and/or elsewhere. All rights reserved. All other marks
featured may be trademarks of their respective owners.
www.arm.com/company/policies/trademarks© 2024 Arm