Bifröst
Visualizing and Checking Behavior
- f Embedded Systems across
Hardware and Software
Will McGrath – wmcgrath@stanford.edu Jeremy Warner – jeremy.warner@berkeley.edu
Bifrst Visualizing and Checking Behavior of Embedded Systems across - - PowerPoint PPT Presentation
Bifrst 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
Visualizing and Checking Behavior
Hardware and Software
Will McGrath – wmcgrath@stanford.edu Jeremy Warner – jeremy.warner@berkeley.edu
eMbedded Gateway Cloud [MGC]
embedded gateway cloud
eMbedded Gateway Cloud [MGC]
embedded gateway cloud
Program logic bug?
Program logic bug? Protocol error?
Program logic bug? Protocol error? Wiring issue?
Program logic bug? Protocol error? Peripheral not configured? Wiring issue?
Program logic bug? Protocol error? Peripheral not configured? Sensor data out of range? Wiring issue?
Program logic bug? Protocol error? Peripheral not configured? Sensor data out of range? Wiring issue? Defective part?
Toast Board
12Measures analog voltages at all breadboard rows Compares measured results to intended circuit to identify errors No embedded software support
Existing Embedded Debugging Techniques
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.
17We believe that giving developers insight into how hardware and software interact in a richly-linked environment will enable more efficient debugging of embedded systems.
18Hardware Software
Sensors Actuators
Bifröst
20Trace
21Bifröst: IDE Overview
Digital Signals Analog Signals Variable Values Code line at current time User Program Time-linked console
Analysis Instrumentation Capture
Instrumentation
23Hardware Instrumentation: Digital signals Analog signals Software Instrumentation: Line numbers Variable values
Analysis Capture
Hardware Instrumentation: Digital signals Analog signals Software Instrumentation: Line numbers Variable values Record with Logic Analyzer
Analysis Instrumentation Capture
Hardware Instrumentation: Digital signals Analog signals Software Instrumentation: Line numbers Variable values
Automatic & User Authored Checks
Signals Record with Logic Analyzer
Analysis Instrumentation Capture
Linked Visualization
Code Console
Bifröst: usage example
Bifröst: configuration
Bifröst: blinking LED
Bifröst: recording data
Bifröst: variable tracing
30Bifröst: trace ⇔ code linkage
31Bifröst: code-based navigation
32Bifröst: console-based navigation
33Data Capture
Capture: example
35Backend
Capture: setup
Program Code
36Backend
Capture: setup
Configuration Program Code Instrumented Code
37Backend
Debugging information: code lines + function info
38Capture: execution
Backend
Trace (w/ debug info) + decoded protocols Debugging information: code lines + function info
39Capture: execution
Backend
Trace (w/ debug info) + decoded protocols Trace + Debug + Protocol Debugging information: code lines + function info
40Capture: execution
Backend
incrementally step, record, and visualize
41Capture: inspection
Code Instrumentation
42Code Instrumentation
43Core Library Instrumentation
44Checks
automatically inferred user-parameterized
45Checks: automatically inferred
“Writes should generate activity on a pin”
“Communication protocols adherence”
46Checks: user-parameterized
"when D1 rises expect line 11 in 100 ms"
Checks: user-parameterized
"when D1 rises expect line 11 in 100 ms"
pin
Checks: user-parameterized
"when D1 rises expect line 11 in 100 ms"
event pin
Checks: user-parameterized
"when D1 rises expect line 11 in 100 ms"
source code pin event
Checks: user-parameterized
"when D1 rises expect line 11 in 100 ms"
timing pin event source code
“When D1 rises, expect Line 17 in 20 ms”
52Checks: user-parameterized
“When D1 rises, expect Line 17 in 20 ms”
53Checks: user-parameterized
“When D1 rises, expect Line 17 in 20 ms”
54Checks: user-parameterized
How effectively does Bifröst aid embedded debugging?
55Evaluation
Evaluation: issues
Users identified issues such as: pin misconfiguration thresholding issues switch bouncing timing issues
Evaluation: strategies
Users identified these issues using: variable/signal data comparison code statement execution monitoring automatic and user-inferred checks
Limitations
performance: instrumentation overhead (full speed to under 10x)
58scope:
and Arduino core functions
Future Work
With: Daniel Drew, Mitchell Karchemsky, Majeed Kazemitabaar, David Mellis, and Björn Hartmann
Will McGrath – wmcgrath@stanford.edu Jeremy Warner – jeremy.warner@berkeley.edu