Home

Awesome

AVH CI Template

This repository contains a CI Template for unit test automation that uses GitHub Actions on a GitHub-hosted runner with an Ubuntu Linux system. A report is optionally generated using the Unity test framework.

The tests run on Arm Virtual Hardware - Fixed Virtual Platforms (AVH-FVP) which are simulation models that implement a Cortex-M, Corstone, or Cortex-M/Ethos-U device sub-systems. These models are designed for software verification and testing. It allows simulation-based test automation of various software workloads, including unit tests, integration tests, and fault injection.

The tools used in this CI Template are part of Keil MDK Version 6. For evaluation purposes the MDK - Community Edition can be used, but commericial usage requires a license of the MDK - Professional Edition. The tool installation is managed with vcpkg using a configuration file that ensures consistent setup on Desktop computers and the CI system.

Create, debug, and test

Usage

This is a template repository that can be used as starting point for validation projects. Click Use this template - Create a new repository to start your own CI test project.

Login with your GitHub account to enable the button Use this template - Create a new repository.

The Project tests a single function (my_sum) using the Unity test framework that is available as CMSIS software pack. The initial configuration contains a "test case error" that exemplifies the Unity test reporting.

This video contains a demo: Using CMSIS-Toolbox and Keil MDK v6 in CI/CD Workflows

Repository Structure

DirectoryContent
.github/workflowsWorkflow YML files that gets you started with GitHub Actions for CMSIS projects.
ProjectA simple unit test application in csolution project format.

GitHub

With GitHub Actions two workflows are available:

Use in the GitHub web interface the Actions view to execute the CI test run and get Test results.

Desktop

Prerequisite:

Build:

In VS Code use:

Note:

When you open the project for the first time, the Arm Tools Environment managed with vcpkg gets installed which may take some minutes.

Run:

In VS Code open the CMSIS Activity Bar and Run the application.

Debug:

In VS Code open the CMSIS Activity Bar and Debug the application.

More CI Examples

Arm is using CI validation tests for many projects. The list below are only a few examples that may be used to derive own CI test projects.

ResourceDescription
AVH-HelloBuild and execution test for "Hello World" example using a GitHub Action matrix to target all Cortex-M processors, Arm Compiler or GCC, and AVH simulation.
CMSIS Version 6Runs a CMSIS-Core validation test across the supported processors using multiple compilers.
RTOS2 ValidationRuns the CMSIS-RTOS2 validation across Keil RTX using source and library variants.
STM32H743I-EVAL_BSPBuild test of a Board Support Pack (BSP) with MDK-Middleware Reference Applications using Arm Compiler or GCC. The artifacts store the various example projects for testing on the hardware board.
TFL Micro SpeechThis example project shows the Virtual Streaming Interface with Audio input and uses software layers for retargeting.

Other Developer Resources

ResourceDescription
DocumentationIs a comprehensive documentation about Arm Virtual Hardware.
Support ForumArm Virtual Hardware is supported via a forum. Your feedback will influence future roadmap.
AVH-MLOpsShows the setup of a Docker container with foundation tools for CI and MLOps systems.
Marketing OverviewGives you a top-level marketing message.

Related Webinar Recordings