Bifröst Visualizing and Checking Behavior of Embedded Systems across Hardware and Software Will McGrath – wmcgrath@stanford.edu Jeremy Warner – jeremy.warner@berkeley.edu
e M bedded G ateway C loud [MGC] embedded gateway cloud 2
e M bedded G ateway C loud [MGC] embedded gateway cloud 3
4
Program logic bug? 5
Program logic bug? Protocol error? 6
Program logic bug? Protocol error? Wiring issue? 7
Program logic bug? Protocol error? Peripheral not configured? Wiring issue? 8
Sensor data out of range? Program logic bug? Protocol error? Peripheral not configured? Wiring issue? 9
Sensor data out of range? Defective part? Program logic bug? Protocol error? Peripheral not configured? Wiring issue? 10
11
Toast Board Measures analog voltages at all breadboard rows Compares measured results to intended circuit to identify errors No embedded software support 12
13
14
15
Existing Embedded Debugging Techniques • Multimeter • Point to point • Obscures rapid changes • Oscilloscope/Logic Analyzer • Fast, but expensive • Nontrivial configuration • Print Debugging • Easy, but weak time information • GDB • Powerful, but not always available • Complex configuration 16
In contrast with prior work which has focused on providing tools only for debugging software or circuits, we directly address the interconnected nature of embedded systems projects. 17
We believe that giving developers insight into how hardware and software interact in a richly-linked environment will enable more efficient debugging of embedded systems. 18
Hardware Software Sensors Actuators 19
Bifröst 20
Bifröst: IDE Overview Trace Digital Signals Analog Signals Variable Values User Program Time-linked console Code line at current time 21
Instrumentation Capture Analysis 22
Instrumentation Capture Analysis Hardware Instrumentation: Digital signals Analog signals Software Instrumentation: Line numbers Variable values 23
Instrumentation Capture Analysis Hardware Instrumentation: Digital signals Record with Analog signals Logic Analyzer Software Instrumentation: Line numbers Variable values 24
Instrumentation Capture Analysis Hardware Linked Visualization Instrumentation: Digital signals Signals Record with Analog signals Logic Analyzer Code Console Software Instrumentation: Automatic & User Line numbers Authored Checks Variable values 25
Bifröst: usage example 26
Bifröst: configuration 27
Bifröst: blinking LED 28
Bifröst: recording data 29
Bifröst: variable tracing 30
Bifröst: trace ⇔ code linkage 31
Bifröst: code-based navigation 32
Bifröst: console-based navigation 33
Data Capture 34
Capture: example Backend 35
Capture: setup Backend Program Code 36
Capture: setup Backend Configuration Program Instrumented Code Code 37
Capture: execution Backend Debugging information: code lines + function info 38
Capture: execution Backend Trace (w/ debug info) + decoded protocols Debugging information: code lines + function info 39
Capture: execution Backend Trace (w/ debug info) + decoded protocols Trace + Debugging Debug + information: Protocol code lines + function info 40
Capture: inspection incrementally step, record, and visualize 41
Code Instrumentation 42
Code Instrumentation 43
Core Library Instrumentation 44
Checks automatically inferred user-parameterized 45
Checks: automatically inferred “ Writes should generate activity on a pin” “Communication protocols adherence” 46
Checks: user-parameterized "when D1 rises expect line 11 in 100 ms" 47
Checks: user-parameterized "when D1 rises expect line 11 in 100 ms" pin 48
Checks: user-parameterized "when D1 rises expect line 11 in 100 ms" pin event 49
Checks: user-parameterized "when D1 rises expect line 11 in 100 ms" pin event source code 50
Checks: user-parameterized "when D1 rises expect line 11 in 100 ms" pin event source code timing 51
Checks: user-parameterized “When D1 rises, expect Line 17 in 20 ms” 52
Checks: user-parameterized “When D1 rises, expect Line 17 in 20 ms” 53
Checks: user-parameterized “When D1 rises, expect Line 17 in 20 ms” 54
Evaluation How effectively does Bifröst aid embedded debugging? 55
Evaluation: issues Users identified issues such as: pin misconfiguration thresholding issues switch bouncing timing issues 56
Evaluation: strategies Users identified these issues using: variable/signal data comparison code statement execution monitoring automatic and user-inferred checks 57
Limitations performance: instrumentation overhead (full speed to under 10x) scope: only instruments user code and Arduino core functions 58
Future Work • Support for continuous capture • Support for multiple devices • Checking & visualizing networked behavior 59
Thanks! Will McGrath – wmcgrath@stanford.edu Jeremy Warner – jeremy.warner@berkeley.edu With: Daniel Drew, Mitchell Karchemsky, Majeed Kazemitabaar, David Mellis, and Björn Hartmann
Recommend
More recommend