
Amirhossein Mohtashami
Continuous Integration and Unit Testing with Hardware-in-the-Loop for Enhancing Embedded Software Quality.
Rel. Alessandro Savino, Stefano Di Carlo, Arturo Guadalupi. Politecnico di Torino, Corso di laurea magistrale in Ingegneria Elettronica (Electronic Engineering), 2025
![]() |
PDF (Tesi_di_laurea)
- Tesi
Licenza: Creative Commons Attribution Non-commercial No Derivatives. Download (8MB) |
Abstract: |
This thesis presents the design and implementation of a complete Continuous Integration (CI) workflow for automated testing and validation of embedded firmware using Hardware-in-the-Loop (HIL) techniques. While CI is widely used in software development, applying it to embedded systems introduces unique challenges due to dependencies on real hardware, timing constraints, and limited observability. The proposed system automates the full firmware testing cycle using a Go-based host orchestration tool, custom firmware (ATU) on the Arduino GIGA R1 WiFi board, and SCPI-controllable lab instruments: a Rigol DP832 power supply, DS1054Z oscilloscope, and Keithley DMM6500 multimeter. The process includes automatic sketch compilation and flashing via Arduino CLI, test command execution via serial communication, and signal validation through TCP/IP communication with the instruments. The Go orchestration program coordinates these components to run end-to-end tests without user intervention. Each test captures data such as current consumption, PWM signal parameters (frequency and duty cycle), and analog voltage output, saving the results in structured JSON format. Optionally, oscilloscope screenshots are stored for visual confirmation. The system supports flexible and repeatable test cases like verifying PWM signal characteristics, DAC voltage accuracy, and power draw under different conditions. Experimental runs showed a significant reduction in manual test time, while maintaining traceability and accuracy. Screenshots and JSON files ensure reproducibility and can be archived or used in CI pipelines. The entire setup was developed with future integration in mind: the host application is modular, and the system is fully compatible with GitHub Actions or other CI servers. This allows embedded software teams to run automated firmware tests on real hardware, extending modern CI/CD practices to the embedded domain. |
---|---|
Relatori: | Alessandro Savino, Stefano Di Carlo, Arturo Guadalupi |
Anno accademico: | 2024/25 |
Tipo di pubblicazione: | Elettronica |
Numero di pagine: | 104 |
Soggetti: | |
Corso di laurea: | Corso di laurea magistrale in Ingegneria Elettronica (Electronic Engineering) |
Classe di laurea: | Nuovo ordinamento > Laurea magistrale > LM-29 - INGEGNERIA ELETTRONICA |
Aziende collaboratrici: | Arduino srl |
URI: | http://webthesis.biblio.polito.it/id/eprint/36486 |
![]() |
Modifica (riservato agli operatori) |