Hardware-in-the-Loop Testing

Using Zephyr RTOS

Developer Relations Engineer

Mike Szczys

Handy Links:

  • This slide deck:
         https://slides.com/golioth/hil-testing-zephyr
     
  • Example Repo:
         https://github.com/golioth/zephyr_twister_hil_testing

@szczys@chaos.social on Mastodon

@szczys@bsky.social on Bluesky

  • Developer Relations Engineer at Golioth
  • 15 years of firmware experience
  • Previously: Editor in Chief of Hackaday

Mike Szczys

What is Golioth?

We make it easy for hardware engineers to connect sensors and other devices to the web.

https://golioth.io/

Demo

Zephyr: basic/blinky

  • Compile on cloud
  • Flash and run on hardware
  • No actual test confirmation
  • Use GitHub secrets

workflow file: https://glth.io/3PgsZhC

What are self-hosted runners?

Self-Hosted Runners

  • Continuous Integration (CI) on a computer you control
  • Hardware under test is directly connected to your runner
  • Read more:
    • GitHub: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners
    • GitLab: https://docs.gitlab.com/runner/install/index.html

Self-Hosted Runners

Demo

Authenticating a runner with GitHub

Demo

Zephyr: hello_world

  • Compile on self-hosted runner
  • Twister build/flashes/tests
  • Uses hardware map

workflow file: https://glth.io/3qZriNK

Demo

Golioth: hello

  • Compile on self-hosted runner
  • Twister build/flashes/tests
  • Uses hardware map & env variable
  • Uses a pytest harness

workflow file: https://glth.io/44MYHsA

Summary:

  • Hardware-in-the-Loop (HIL) automates tests on the actual hardware
  • There are unique challenges to reliability compared to build-only testing
  • Careful implementations can be as touchless as cloud runners
  • Huge time savings over manual testing

 

  • Application: https://github.com/golioth/zephyr_twister_hil_testing
  • https://golioth.io

Workflow Examples:

Try Golioth:

Hardware-in-the-Loop Testing with Zephyr RTOS

By Golioth

Hardware-in-the-Loop Testing with Zephyr RTOS

  • 84