FrankenTrace: Low-Cost, Cycle-Level, Widely Applicable Program Execution Tracing for ARM Cortex-M SoC

May 9, 2023·
Maciej Matraszek
Maciej Matraszek
,
Mateusz Banaszek
,
Wojciech Ciszewski
,
Konrad Iwanicki
· 0 min read
Overview of FrankenTrace’s operation
Abstract
Program execution tracing is an important technique in software development and analysis. However, noninvasively obtaining cycle-level traces for modern low-power ARMv7-M-based SoCs is challenging, because convenient off-the-shelf high-speed tracing probes are expensive and cannot be applied to SoCs that lack high-speed debug components, notably Embedded Trace Macrocell (ETM) and parallel tracing port (PTP). To address this issue, in this work, we present FrankenTrace, a technique for generating full, noninvasive, cycle-level program counter traces and full, cycle-level data transfer traces of varying invasiveness on SoCs with only low-speed debug components, namely Debug Watchpoint and Trace unit (DWT), Instrumentation Trace Macrocell (ITM), Single Wire Output (SWO), and an inexpensive probe. We demonstrate the technique by tracing software running on a node of the 1KT testbed.
Type
Publication
In CPS-IoT Week ‘23: Proceedings of Cyber-Physical Systems and Internet of Things Week 2023 (6th Workshop on Benchmarking Cyber-Physical Systems & Internet of Things (CPS-IoTBench))
publications
Maciej Matraszek
Authors
PhD Candidate
Currently, my research is focused on low-power wireless sensor networks with various aspects: once I was conducting sociometric studies with wearable IoT devices, another time I am trying to model the inner working of a microcontroller.