Post on 04-Jul-2015
description
transcript
Tutorial:Using Tools formobile Linux(TmL)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
2
brought to you by
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
3
presented by
Mauren Brenner (project committer)
Fabio Rigo (project contributor)
Eric Cloninger (project leader)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
4
Setting Up theEnvironment for theHands-on Sessions
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
5
Setting Up the Environment
• URL
http://www.filedropper.com/eclipsecontmltutorial
• USB drive– TmLTutorial_Instructions.pdf (requires PDF viewer), or
– TmLTutorial_Instructions.txt (plain text)
• We’ll have a few minutes to finish setup prior to the hands-on sessions
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
6
Agenda
• TmL scope and objectives
• Overview of TmL components
• Hands-on sessions
• Feedback and discussion
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
7
Hands-on Sessions
• Using the Device Framework to integrate an emulator into Eclipse
• Using the VNC Viewer to visualize the emulator display
• Using the Protocol Framework to implement an echo protocol
• Using the /proc Tools to get system information
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
8
Audience
• Developers of Eclipse-based IDEs for mobile Linux application development
• All those otherwise interested in Eclipse for mobile, embedded or Linux development
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
9
Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
10
TmL Scopeand Objectives
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
11
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
12
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
13
Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
14
Overview ofTmL Components
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
15
Device Framework
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
16
What we’re going to do
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
17
VNC Viewer
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
18
What we’re going to do
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
19
Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
20
What we’re going to do
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
21
/proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
22
What we’re going to do
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
23
QEMU Puppy Linux Emulator
• A small Linux distro we’ll use for the exercises
• http://www.puppylinux.org/
• http://www.erikveen.dds.nl/qemupuppy/
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
24
Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
25
Setting Up the Environment
• USB drive– TmLTutorial_Instructions.pdf (requires PDF viewer), or
– TmLTutorial_Instructions.txt (plain text)
• Import project
– org.eclipsecon.tml.puppy
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
26
Hands-on Session 1:
Using the Device Framework to Integrate an Emulator
into Eclipse
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
27
Session 1: Device Framework
• Objective
– Explore the device framework to create a device to represent a QEMU emulator running Linux puppy
• Exercise– Create a device plug-in to represent a Linux
puppy emulator
– Define services to start and stop this emulator
– Define a wizard to create instances
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
28
Session 1: Device Framework
• Exercise Steps– Step 1: Create the Device Type extension
– Step 2: Define device handler and launcher
– Step 3: Define state machine (start service)
– Step 4: Define state machine (stop service)
– Step 5: Wizard
– Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
29
Session 1: Device Framework
Step 1: Create the Device Type extension
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
30
Session 1: Device Framework
Step 1: Create the Device Type extension
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
31
Session 1: Device Framework
Step 1: Create the Device Type extension
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
32
Session 1: Device Framework
Step 1: Create the Device Type extension
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
33
Session 1: Device Framework
Step 2: Define device handler and launcher
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
34
Session 1: Device Framework
Step 2: Define device handler and launcher
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
35
Session 1: Device Framework
Step 2: Define device handler and launcher
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
36
Session 1: Device Framework
Step 3: Define state machine (start service)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
37
Session 1: Device Framework
Step 3: Define state machine (start service)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
38
Session 1: Device Framework
Step 3: Define state machine (start service)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
39
Session 1: Device Framework
Step 3: Define state machine (start service)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
40
Session 1: Device Framework
Step 4: Define state machine (stop service)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
41
Session 1: Device Framework
Step 4: Define state machine (stop service)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
42
Session 1: Device Framework
Step 4: Define state machine (stop service)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
43
Session 1: Device Framework
Step 4: Define state machine (stop service)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
44
Session 1: Device Framework
Step 5: Wizard
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
45
Session 1: Device Framework
Step 5: Wizard
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
46
Session 1: Device Framework
Step 5: Wizard
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
47
Session 1: Device Framework
Step 5: Wizard
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
48
Session 1: Device Framework
Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
49
Session 1: Device Framework
Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
50
Session 1: Device Framework
Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
51
Session 1: Device Framework
Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
52
Session 1: Device Framework
Step 6: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
53
Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
54
Hands-on Session 2:
Using the VNC Viewerto Visualize
the Emulator Display
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
55
Session 2: VNC Viewer
• Objective– Integrate Puppy Emulator with VNC Viewer
• Exercise– Connect the Puppy Emulator created in Session 1
into VNC view
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
56
Session 2: VNC Viewer
• Exercise Steps– Step 1: Update state machine (connect)
– Step 2: Update state machine (disconnect)
– Step 3: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
57
Session 2: VNC Viewer
Step 1: Update state machine (connect)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
58
Session 2: VNC Viewer
Step 1: Update state machine (connect)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
59
Session 2: VNC Viewer
Step 1: Update state machine (connect)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
60
Session 2: VNC Viewer
Step 1: Update state machine (connect)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
61
Session 2: VNC Viewer
Step 2: Update state machine (disconnect)
• Follow the same steps to define an operation to disconnect the VNC client from the emulator, using:
– Service
org.eclipse.tml.service.vncviewer.unplugVncViewerService
– States
• startId : IDLE-VNC
• endId : IDLE
• haltId : IDLE-VNC
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
62
Session 2: VNC Viewer
Step 3: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
63
Session 2: VNC Viewer
Step 3: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
64
Session 2: VNC Viewer
Step 3: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
65
Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
66
Hands-on Session 3:
Using the Protocol Framework to Implement a Simple
Echo Protocol
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
67
Session 3: Protocol Framework
• Objective– Explore the protocol framework to create a
service to implement the client side of a communication protocol
• Exercise– Implement an echo protocol client using TmL
protocol framework
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
68
Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
69
Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
70
Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
71
Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
72
Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
73
Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
74
Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
75
Session 3: Protocol Framework
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
76
Session 3: Protocol Framework
• Exercise Steps– Step 1: Create a Protocol Definition extension
– Step 2: Create the Message extensions
– Step 3: Create a Message Direction extension
– Step 4: Create a toolbar action
– Step 5: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
77
Session 3: Protocol Framework
Step 1: Create a Protocol Definition extension
org.eclipse.tml.protocol.protocolDefinition
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
78
Session 3: Protocol Framework
Step 1: Create a Protocol Definition extension
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
79
Session 3: Protocol Framework
Step 1: Create a Protocol Definition extension
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
80
Session 3: Protocol Framework
Step 1: Create a Protocol Definition extension
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
81
Session 3: Protocol Framework
Step 2: Create the Message extensions
org.eclipse.tml.protocol.protocolMessage
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
82
Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
83
Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
84
Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
85
Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
86
Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
87
Session 3: Protocol Framework
Step 2: Create the Message extensions
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
88
Session 3: Protocol Framework
Step 3: Create a Message Direction extension
org.eclipse.tml.protocol.protocolMessageDirection
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
89
Session 3: Protocol Framework
Step 3: Create a Message Direction extension
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
90
Session 3: Protocol Framework
Step 3: Create a Message Direction extension
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
91
Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
92
Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
93
Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
94
Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
95
Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
96
Session 3: Protocol Framework
Step 4: Create a toolbar action
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
97
Session 3: Protocol Framework
Step 5: Run the exercise
• Run the plug-in as an Eclipse application
• Start the emulator instance and connect it to the VNC Viewer
• Launch the Echo Server available at theemulator– Open the console
– cd /root
– ./echoServer 10000
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
98
Session 3: Protocol Framework
Step 5: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
99
Session 3: Protocol Framework
Step 5: Run the exercise
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
100
Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
101
Hands-on Session 4:
Using the /proc Tools to Get System Information
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
102
Session 4: /proc Tools
• Objective– Explore the /proc tools views on Eclipse
• Exercise– Connect to an emulator running Linux using
/proc tools and TCF agent
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
103
Session 4: /proc Tools
• Run the org.eclipsecon.tml.puppyplug-in as an Eclipse application and start the emulator
• Start the /proc tools server on the emulator (/root/tcf_Debug/agent)
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
104
Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
105
Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
106
Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
107
Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
108
Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
109
Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
110
Session 4: /proc Tools
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
111
Any Questions?
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
112
Feedbackand
Discussion
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
113
© 2009 Motorola, Inc. and Eldorado Research Institute.Made available under the EPL v1.0.
114
Project Resources
http://www.eclipse.org/dsdp/tml
http://wiki.eclipse.org/DSDP/TML