polito.it
Politecnico di Torino (logo)

Development of a testing framework enabling Continuous Integration with Hardware-In-the-Loop for Arduino cores

Ruggero Rossino

Development of a testing framework enabling Continuous Integration with Hardware-In-the-Loop for Arduino cores.

Rel. Alessandro Savino, Stefano Di Carlo, Arturo Guadalupi. Politecnico di Torino, NON SPECIFICATO, 2025

[img] PDF (Tesi_di_laurea) - Tesi
Licenza: Creative Commons Attribution Non-commercial No Derivatives.

Download (5MB)
Abstract:

In recent years, Continuous Integration (CI) has become a widespread practice in software development thanks to the many benefits it offers. Most notably, it allows for earlier bug detection, leading to improved code quality and reliability. However, this paradigm has had a hard time making its way into the domain of embedded systems due to the problems that stem from interacting with real hardware, such as setting up the environment, repeatability of the tests, and the cost of the whole infrastructure. This thesis aims to develop a testing framework with Hardware-In-the-Loop to enable CI practices in the development process of Arduino Cores. Although the primary motivation behind this project is the reliable migration from the MBed OS operating system to the Zephyr RTOS (Real Time Operating System) for GIGA R1 WiFi boards, the adopted approach allows it to be easily extended to other contexts. The testing procedure is based on a loopback design where a board running a stable core, named Validator, sends a predefined sequence of data to another board running the core under evaluation, referred to as Device Under Test (DUT). The DUT echoes the data back to the Validator, which compares them with the original sequence via their CRC (Cyclic Redundancy Check) values. A match indicates that no loss or modification occurred during the process, making the test successful; a mismatch, on the other hand, causes the test to fail. This technique allows to reliably test bidirectional communication and data integrity under various conditions by adjusting parameters such as ports, baud rate, and clock speed. Moreover, it can also be applied to several communication protocols. To coordinate the testing process, an orchestrator has been developed. It runs on a host machine and is responsible for setting up the test environment based on a configuration file, compiling and uploading the sketches, and collecting and logging the results of each test. The configuration file allows developers to specify the board models, cores, and the parameters with which the tests should be run. The framework has been integrated with GitHub Actions in order to automatically trigger test execution on a remote machine for every new pull request in the Core's repository. This implementation yielded a fully functional proof of concept capable of validating Serial, I2C, and CAN protocols, laying a strong foundation for future expansions to support more test types, cores, and boards.

Relatori: Alessandro Savino, Stefano Di Carlo, Arturo Guadalupi
Anno accademico: 2025/26
Tipo di pubblicazione: Elettronica
Numero di pagine: 81
Soggetti:
Corso di laurea: NON SPECIFICATO
Classe di laurea: Nuovo ordinamento > Laurea magistrale > LM-32 - INGEGNERIA INFORMATICA
Aziende collaboratrici: Arduino srl
URI: http://webthesis.biblio.polito.it/id/eprint/37746
Modifica (riservato agli operatori) Modifica (riservato agli operatori)