PHiLIP has been deployed to run HiL (Hardware-in-the-Loop) tests for RIOT OS. The deployment has been running for several years continuously growing and adapting to testing needs. The infrastructure built around the deployment of PHiLIP involves custom built adaption boards, test nodes, multi-platform DUTs and wiring, CI (Continuous Integration) tools, and tests built upon open-source testing frameworks.
A CI Test Node consists of the custom board that provides connections between a Raspberry Pi and PHiLIP and a standard 20 pin ribbon connector to the DUT. This allows for the simple wiring of DUT in different form factors without developing specific breakout boards. A test is provided to ensure wires are correctly routed. The custom board also provides basic power measurement and control tools to help with low power testing, some protection circuitry, and signal conditioning.
Raspberry Pi 3 b+
The raspberry pis are loaded with stock Raspbian image, then updated via ansible:
- Basic developer packages installed
- Peripherals configured
- PHiLIP and raspberry pi specific python packages installed
- PHiLIP firmware updated
- Jenkins slave instance installed and configured
- Credentials and keys added
- Various flashing software installed
- Shared copy of RIOT used for flashing configuration installed
- Robot Framework packages installed
This process is run during initial commissioning and can be executed anytime after to update to the latest state.
Blue Pill Hat
The BPH (Blue Pill Hat) helps with wiring, provides features to help run tests, and increases testing capabilities. The schematics, gerbers and BOMs are all openly available. Designs can easily be altered as the as this is a public project on Circuit Maker. A python CLI tool is also available to simply the interface to the BPH.
The ribbon cable wiring follows this pattern:
|BPH Pin||Color||DUT Pin|
There are also versions that only report to have 32 KiB, but actually have 64 KiB.
|Flash||32 KiB/ 64 KiB / 128 KiB|
|Frequency||up to 72 MHz|
|ADC||2x 12-bit, 10 channels|
|Vcc||2.0 to 3.6 V|
RIOT OS DUTs
Tests are run on a growing number of boards covering many different CPUs (AVR, cortex-m0+, cortex-m0, cortex-m3, cortex-m4, cortex-m7, cortex-m23, esp32, esp8266). Two types of test can be run, on-target and PHiLIP-based tests. The on-target tests only require a DUT and exist in the RIOT OS repository. The PHiLIP-based tests require specific wiring to PHiLIP and use Robot-Framework to build the tests. These tests specifically target peripherals and IO such as I2C, SPI, UART, timers, and GPIO.
Several racks have been filled with test nodes and DUTs. The racks are housed at HAW Hamburg.
The CI (Continuous Integration) manages the infrastructure updates, test execution, and serving the test results. This consists of a
Jenkins is open source automation server software. The CI can deploy and preform updates completely code driven, meaning no manual configuration steps are needed. The RIOT HiL Jenkins CI contains a docker image, casc configurations, and dsl scripts to achieve this.
Our Jenkins is responsible for coordinating all the tests and test nodes. This handles adding and accessing new test node, issuing the nightly tests, or allowed specific tests to be run with specific configurations.
Ansible is an automation platform that helps manage infrastructure. The deployment uses Ansible to commission and update new test nodes and build servers.
The test results are hosted on a custom website, allowing an overview of all the test results and providing plots of metric information