Home

Awesome

License Build and Execution Test

AVH-Hello

This repository contains a CI project with a test matrix that uses GitHub Actions on a GitHub-hosted runner with an Ubuntu Linux system. The application module hello.c prints "Hello World" with count value to the UART output. It is configured for Arm Virtual Hardware - Fixed Virtual Platforms (AVH FVP), but it is easy to re-target it to hardware that provides a CMSIS Driver:USART.

The test matrix validates the application with GCC and Arm Compiler using a Debug and Release build. It builds and runs the application across the different Arm Cortex-M processors and various Arm Corstone sub-systems. It total it validates that 56 different variants execute correct on AVH FVP simulation models that represent a typical implementation of an Arm processor.

Prerequisites

Project Structure

The project is defined as CMSIS Solution Project that describes the build process for the CMSIS-Toolbox.

Files and directoriesContent
.github/workflows/GitHub Action file hello-ci.yml defines a test matrix (with compiler, target, build types) that is iterated to build and run different variants of the application.
Board_IO/I/O re-targeting to a CMSIS-Driver UART interface.
FVP/Configuration files for the AVH FVP simulation models.
RTE/Device/Includes for each device (target-type) the RTE_Device.h file with CMSIS-Driver configuration.
RTE/CMSIS/RTOS configuration file RTX_Config.h used for all devices (targets).
Hello.csolution.ymlLists the required packs and defines the hardware target and build-types.
Hello.cproject.ymlDefines the source files and the software components.
cdefault.ymlContains the setup for different compilers (AC6, GCC, IAR, and CLANG).
vcpkg-configuration.jsonSpecifies the required tools for vcpkg; it is configured to install the latest tool versions.
main.c / main.hApplication startup with CMSIS-RTOS
hello.cTest application that prints "Hello World <count>".

Note:

The privileged mode in RTX_Config.h is enabled, to allow the USART initialization.

The workflow allows to build and test the application on different host systems, for example local development computers that are Windows based and CI systems that run Linux.

Build on Local Development Computer

To generate the application for a specific target-type, build-type, and compiler execute the following command line:

> cbuild Hello.csolution.yml --packs --context Hello.Debug+CS300 --toolchain AC6 --rebuild
Parameters\FlagsDescription
--toolchainSpecifies which compiler (GCC or AC6) is used to build the executable.
--rebuildForces a clean rebuild.
--packsForces the download of required packs.
--update-rteUpdates the Run-Time Environment (RTE directory).
DebugSelects build-type (Debug or Release).
CS300Selects target-type (CM0 is Cortex-M0, CS300 is Corstone-300).

Execute on Local Development Computer

To execute the application on an AVH FVP simulation model use the following command line:

> FVP_Corstone_SSE-300 -a ./out/Hello/CS300/Debug/AC6/Hello.axf -f ./FVP/FVP_Corstone_SSE-300/fvp_config.txt --simlimit 60
Parameters\FlagsDescription
-aDefines the path to the generated executable.
-fSpecifies the configuration file needed for the Arm Virtual Hardware model.
--simlimitSet the maximum time in seconds for the simulation.

Notes:

Automated Build and Execute

The GitHub Action file hello-ci.yml uses the same commands for build and execute, except that the tools use parameters from the text matrix.

For the execution on the AVH FVP models, the UART ouput is redirected to a log file using the parameter -C. This output is checked for correctness.

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_CI_TemplateCI Template for unit test automation that uses GitHub Actions.
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.
MDK MiddlewareBuild test of MDK-Middleware library and device agonistic Reference Applications using Arm Compiler or GCC.
TFL Micro SpeechThis example project shows the Virtual Streaming Interface with Audio input and uses software layers for retargeting.

Other Developer Resources

ResourceDescription
AVH FVP DocumentationIs a comprehensive documentation about Arm Virtual Hardware.
AVH FVP 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.

Related Webinar Recordings