@inproceedings{10.1145/3759426.3760979,
author = {Rojas Castillo, Carlos and Marra, Matteo and Gonzalez Boix, Elisa},
title = {A Control-Flow Graph Approach to Language-Agnostic Debugging for Microcontrollers},
year = {2025},
isbn = {9798400721496},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3759426.3760979},
doi = {10.1145/3759426.3760979},
abstract = {Language virtual machines (VMs) for resource-constrained environments enabled the use of managed languages, such as JavaScript or Python, on microcontrollers units (MCUs). WebAssembly (Wasm) has also broadened the range of programming languages on these resource-constrained devices. However, most MCU debugging support targets languages that compile to native code, making them unsuitable for source-level debugging of applications running on managed runtimes. As a result, debugging on MCU VMs is often performed using logging, manual resets, and GPIO toggling for call tracing. In this work, we propose a language-agnostic approach for debugging MCUs. Our approach builds specialised control-flow graphs (CFGs) to enable language-agnostic debugging from compiler-generated Wasm bytecode and debugging information. During debugging, developers can use traditional debugging operations for which the debugger utilises the specialised CFGs to advance computation. We implemented a CFG debugger prototype for the WARDuino Wasm VM, building on a basic debug API. We show that our debugger successfully targets four languages that compile to Wasm without requiring any modification to the debugger. Our benchmarks reveal that the prototype’s execution speed outperforms WARDuino’s debugger by factors from 7 to 215.},
booktitle = {Proceedings of the 22nd ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes},
pages = {38–56},
numpages = {19},
keywords = {Breakpoints, Debugging, IoT, Stepping, WebAssembly, microcontrollers},
location = {Singapore, Singapore},
series = {MPLR '25}
}