Bifrst Visualizing and Checking Behavior of Embedded Systems across - - PowerPoint PPT Presentation

bifr st
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Bifröst

Visualizing and Checking Behavior

  • f Embedded Systems across

Hardware and Software

Will McGrath – wmcgrath@stanford.edu Jeremy Warner – jeremy.warner@berkeley.edu

slide-2
SLIDE 2 2

eMbedded Gateway Cloud [MGC]

embedded gateway cloud

slide-3
SLIDE 3 3

eMbedded Gateway Cloud [MGC]

embedded gateway cloud

slide-4
SLIDE 4 4
slide-5
SLIDE 5 5

Program logic bug?

slide-6
SLIDE 6 6

Program logic bug? Protocol error?

slide-7
SLIDE 7 7

Program logic bug? Protocol error? Wiring issue?

slide-8
SLIDE 8 8

Program logic bug? Protocol error? Peripheral not configured? Wiring issue?

slide-9
SLIDE 9 9

Program logic bug? Protocol error? Peripheral not configured? Sensor data out of range? Wiring issue?

slide-10
SLIDE 10 10

Program logic bug? Protocol error? Peripheral not configured? Sensor data out of range? Wiring issue? Defective part?

slide-11
SLIDE 11 11
slide-12
SLIDE 12

Toast Board

12

Measures analog voltages at all breadboard rows Compares measured results to intended circuit to identify errors No embedded software support

slide-13
SLIDE 13 13
slide-14
SLIDE 14 14
slide-15
SLIDE 15 15
slide-16
SLIDE 16

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
slide-17
SLIDE 17

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
slide-18
SLIDE 18

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
slide-19
SLIDE 19 19

Hardware Software

Sensors Actuators

slide-20
SLIDE 20

Bifröst

20
slide-21
SLIDE 21

Trace

21

Bifröst: IDE Overview

Digital Signals Analog Signals Variable Values Code line at current time User Program Time-linked console

slide-22
SLIDE 22 22

Analysis Instrumentation Capture

slide-23
SLIDE 23

Instrumentation

23

Hardware Instrumentation: Digital signals Analog signals Software Instrumentation: Line numbers Variable values

Analysis Capture

slide-24
SLIDE 24 24

Hardware Instrumentation: Digital signals Analog signals Software Instrumentation: Line numbers Variable values Record with Logic Analyzer

Analysis Instrumentation Capture

slide-25
SLIDE 25 25

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

slide-26
SLIDE 26 26

Bifröst: usage example

slide-27
SLIDE 27 27

Bifröst: configuration

slide-28
SLIDE 28 28

Bifröst: blinking LED

slide-29
SLIDE 29 29

Bifröst: recording data

slide-30
SLIDE 30

Bifröst: variable tracing

30
slide-31
SLIDE 31

Bifröst: trace ⇔ code linkage

31
slide-32
SLIDE 32

Bifröst: code-based navigation

32
slide-33
SLIDE 33

Bifröst: console-based navigation

33
slide-34
SLIDE 34 34

Data Capture

slide-35
SLIDE 35

Capture: example

35

Backend

slide-36
SLIDE 36

Capture: setup

Program Code

36

Backend

slide-37
SLIDE 37

Capture: setup

Configuration Program Code Instrumented Code

37

Backend

slide-38
SLIDE 38

Debugging information: code lines + function info

38

Capture: execution

Backend

slide-39
SLIDE 39

Trace (w/ debug info) + decoded protocols Debugging information: code lines + function info

39

Capture: execution

Backend

slide-40
SLIDE 40

Trace (w/ debug info) + decoded protocols Trace + Debug + Protocol Debugging information: code lines + function info

40

Capture: execution

Backend

slide-41
SLIDE 41

incrementally step, record, and visualize

41

Capture: inspection

slide-42
SLIDE 42

Code Instrumentation

42
slide-43
SLIDE 43

Code Instrumentation

43
slide-44
SLIDE 44

Core Library Instrumentation

44
slide-45
SLIDE 45

Checks

automatically inferred user-parameterized

45
slide-46
SLIDE 46

Checks: automatically inferred

“Writes should generate activity on a pin”

“Communication protocols adherence”

46
slide-47
SLIDE 47 47

Checks: user-parameterized

"when D1 rises expect line 11 in 100 ms"

slide-48
SLIDE 48 48

Checks: user-parameterized

"when D1 rises expect line 11 in 100 ms"

pin

slide-49
SLIDE 49 49

Checks: user-parameterized

"when D1 rises expect line 11 in 100 ms"

event pin

slide-50
SLIDE 50 50

Checks: user-parameterized

"when D1 rises expect line 11 in 100 ms"

source code pin event

slide-51
SLIDE 51 51

Checks: user-parameterized

"when D1 rises expect line 11 in 100 ms"

timing pin event source code

slide-52
SLIDE 52

“When D1 rises, expect Line 17 in 20 ms”

52

Checks: user-parameterized

slide-53
SLIDE 53

“When D1 rises, expect Line 17 in 20 ms”

53

Checks: user-parameterized

slide-54
SLIDE 54

“When D1 rises, expect Line 17 in 20 ms”

54

Checks: user-parameterized

slide-55
SLIDE 55

How effectively does Bifröst aid embedded debugging?

55

Evaluation

slide-56
SLIDE 56 56

Evaluation: issues

Users identified issues such as: pin misconfiguration thresholding issues switch bouncing timing issues

slide-57
SLIDE 57 57

Evaluation: strategies

Users identified these issues using: variable/signal data comparison code statement execution monitoring automatic and user-inferred checks

slide-58
SLIDE 58

Limitations

performance: instrumentation overhead (full speed to under 10x)

58

scope:

  • nly instruments user code

and Arduino core functions

slide-59
SLIDE 59

Future Work

  • Support for continuous capture
  • Support for multiple devices
  • Checking & visualizing networked behavior
59
slide-60
SLIDE 60

Thanks!

With: Daniel Drew, Mitchell Karchemsky, Majeed Kazemitabaar, David Mellis, and Björn Hartmann

Will McGrath – wmcgrath@stanford.edu Jeremy Warner – jeremy.warner@berkeley.edu