Using Arm Virtual Hardware with Jenkins

Arm Virtual Hardware (AVH) provides simulation models, software tooling, and infrastructure that can be integrated into CI/CD and MLOps development flows. It supports the software development cycle of embedded, IoT, and ML applications and provides essential components for effective test and validation environments. Users benefit from testing without hardware and the ability to verify the correctness of their algorithms. They can also easily evaluate performance on different cores and can apply continuous integration workflows.

Continuous testing

Applying continuous integration workflows for embedded applications offers long-term benefits to the software developer. Arm Virtual Hardware simplifies the setup and use of CI workflows in embedded projects.

For unit and integration tests, AVH offers additional advantages over real hardware, including:

  • Speed - no overhead for flashing the application on physical hardware. This saves time on small and fast unit tests.
  • Scale - virtual platforms can scale to run many tests in parallel. This makes virtual platforms more cost-effective than a farm of physical hardware.
  • Maintenance – unlike physical hardware, virtual platforms do not overheat, wear out from overuse, break from misuse, or use physical space and resources.
  • Upgrades – virtual platforms can be adapted and re-configured to match corresponding changes to the underlying hardware platform that is under development. These types of changes can be costly or impossible with physical hardware.

Use of Arm Virtual Hardware (AVH) AMI can be integrated into Jenkins pipelines for automating software builds and tests. Two approaches can be followed to create and control instances of the AVH AMIs with Jenkins:

  1. Using AVH AMI as a Jenkins node: a classic approach with a Jenkins node created in AWS. This is a common way to implement Jenkins pipelines on AWS. A Jenkins Controller uses an Amazon EC2 plugin to create an EC2 instance as a Jenkins node from an AVH AMI. Then the Jenkins node gets connected by SSH to the Jenkins Controller and the Jenkins commands are executed directly on the EC2 instance.

  2. Using a Python module: a simplified way with Jenkins as a thin wrapper on top of a Python module. The Python module drives the communication with the AVH AMI. The Jenkins pipeline is just a light-weight front end that uses the Python module, and the actual work is done by an EC2 instance created and controlled with the commands from the Python module built on top of AWS SDK. This approach is simpler to implement but the capabilities are limited by the functionality of the Python module.

Get started!

We have created a template repository that you can start with: AVH-GetStarted. It contains Jenkins examples for both flows explained above and can be easily used to test drive Arm Virtual Hardware. The AVH documentation provides further information about the usage of Jenkins with AVH.

1 Like