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.
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
Directory | Content |
---|---|
.github/workflows | Workflow YML files that gets you started with GitHub Actions for CMSIS projects. |
Project | A simple unit test application in csolution project format. |
GitHub
With GitHub Actions two workflows are available:
- basic.yml compiles and runs the application.
- basic_w_report.yml compiles and runs the application; then generates a test report using phoenix-actions/test-reporting.
Use in the GitHub web interface the Actions view to execute the CI test run and get Test results.
Desktop
Prerequisite:
- Install VS Code with Arm Keil Studio Pack extensions.
- Click Use this template - Create a new repository to create you own CI test flow in your GitHub account.
Build:
In VS Code use:
- Open Source Control Activity Bar and use Clone Repository to get the application on your local computer.
- Open CMSIS Activity Bar and Build the application.
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.
Resource | Description |
---|---|
AVH-Hello | Build 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 6 | Runs a CMSIS-Core validation test across the supported processors using multiple compilers. |
RTOS2 Validation | Runs the CMSIS-RTOS2 validation across Keil RTX using source and library variants. |
STM32H743I-EVAL_BSP | Build 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 Speech | This example project shows the Virtual Streaming Interface with Audio input and uses software layers for retargeting. |
Other Developer Resources
Resource | Description |
---|---|
Documentation | Is a comprehensive documentation about Arm Virtual Hardware. |
Support Forum | Arm Virtual Hardware is supported via a forum. Your feedback will influence future roadmap. |
AVH-MLOps | Shows the setup of a Docker container with foundation tools for CI and MLOps systems. |
Marketing Overview | Gives you a top-level marketing message. |