Embedded Target Communications with TCF Martin Oberhuber Michael Scharf Wind River.

Slides:



Advertisements
Similar presentations
Debugging Windows ® CE Applications And Systems David Streams Lead Program Manager Windows CE Tools Microsoft Corporation
Advertisements

Using MapuSoft Instead of OS Vendor’s Simulators.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Windows Communication Foundation and Web Services.
Rheeve: A Plug-n-Play Peer- to-Peer Computing Platform Wang-kee Poon and Jiannong Cao Department of Computing, The Hong Kong Polytechnic University ICDCSW.
DSDP Poster : Eclipse Summit Europe 2006 | © 2006 by IBM and Wind River Systems all content except logos and trademarks is made available under the EPL.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
CS3771 Today: network programming with sockets  Previous class: network structures, protocols  Next: network programming Sockets (low-level API) TODAY!
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
Copyright © 2006 Intel Corporation, released under EPL version /20061 Eclipse DSDP-TM Target Connection Adapters Peter Lachner WW08’06 rev 1.0.
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
2440: 141 Web Site Administration Remote Web Server Access Tools Instructor: Enoch E. Damson.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
Sales Kickoff - ARCserve
TCP/IP protocols Communication over Internet is mostly TCP/IP (Transmission Control Protocol over Internet Protocol) TCP/IP "stack" is software which allows.
1 Web Server Administration Chapter 9 Extending the Web Environment.
ISO Layer Model Lecture 9 October 16, The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Introducing Axis2 Eran Chinthaka. Agenda  Introduction and Motivation  The “big picture”  Key Features of Axis2 High Performance XML Processing Model.
Copyright ®xSpring Pte Ltd, All rights reserved Versions DateVersionDescriptionAuthor May First version. Modified from Enterprise edition.NBL.
Pattern Oriented Software Architecture for Networked Objects Based on the book By Douglas Schmidt Michael Stal Hans Roehnert Frank Buschmann.
LWIP TCP/IP Stack 김백규.
Software Framework for Teleoperated Vehicles Team Eye-Create ECE 4007 L01 Karishma Jiva Ali Benquassmi Safayet Ahmed Armaghan Mahmud Khin Lay Nwe.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
1 Version 3.0 Module 11 TCP Application and Transport.
Computer Emergency Notification System (CENS)
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
© 2004 Mercury Computer Systems, Inc. FPGAs & Software Components Graham Bardouleau & Jim Kulp Mercury Computer Systems, Inc. High Performance Embedded.
Unit - VI. Linux and Real Time: Real Time Tasks Hard and Soft Real Time Tasks Linux Scheduling Latency Kernel Preemption Challenges in Kernel Preemption.
4061 Session 25 (4/17). Today Briefly: Select and Poll Layered Protocols and the Internets Intro to Network Programming.
© 2002 IBM Corporation Confidential | Date | Other Information, if necessary © Wind River Systems, released under EPL 1.0. All logos are TM of their respective.
802.11n Sniffer Design Overview Vladislav Mordohovich Igor Shtarev Luba Brouk.
BridgePoint Integration John Wolfe / Robert Day Accelerated Technology.
SKYPIAX, how to add Skype capabilities to FreeSWITCH (and Asterisk) CHICAGO, USA, September 2009.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Byoung-Jo CHOI Fall 2007 SW Project II Advanced Linux Programming.
E81 CSE 532S: Advanced Multi-Paradigm Software Development Venkita Subramonian, Christopher Gill, Ying Huang, Marc Sentany Department of Computer Science.
© 2008 by Wind River; made available under the EPL v1.0 | 19-Nov-2008 TCF The Target Communication Framework Michael Scharf, Wind River wiki.eclipse.org/DSDP/TM/TCF_FAQ.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
1 Network Communications A Brief Introduction. 2 Network Communications.
An open source user space fast path TCP/IP stack and more…
TCF - Target Communication Framework Update for Helios Martin Oberhuber Pawel Piech Wind River.
Introduction to Android Programming
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
SDN controllers App Network elements has two components: OpenFlow client, forwarding hardware with flow tables. The SDN controller must implement the network.
Windows Communication Foundation and Web Services
Mobile Device Development
Data Transport for Online & Offline Processing
Windows Communication Foundation and Web Services
Chapter 3: Windows7 Part 4.
Northbound API Dan Shmidt | January 2017
WEB API.
Nathan Totten Technical Evangelist Windows Azure
Student: Popa Andrei-Sebastian
So what is Target Management all about?
Anyware's Implementation of the Target Communication Framework
Code Composer Essentials 3.0
DSDP - Target Management
Azure Container Service
CMPE419 Mobile Application Development
Exceptions and networking
Presentation transcript:

Embedded Target Communications with TCF Martin Oberhuber Michael Scharf Wind River

2 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Tutorial Themes How we’re going to run this: Practical Interactive Workspace Take-away

3 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 The Stick All-in-one Eclipse ZIP QEMU/mini.zip Workspace.zip Compilers –OPTIONAL - For the adventurous –We provide pre-built executables –If you want to build yourself, install the compiler EXE’s Tools –Ingredients of the all-in-one. Install if you want your own Eclipse. Tcf_source –patches

4 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Agenda TCF Overview Building and running TCF native –Workspace Setup –Command-line tools –Protocol Basics Building and running embedded –Source structure, Removing a Service –Proxy Setup Adding a Service or Value-add –The C side (client and server) –The Java side (client)

5 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 System Debug: the Big Picture CPU HW IP DSP 3 rd party SW CPU Debugger 3 rd party SW DSP Debugger SoC (Model) Target Description IP-XACT, XML Target Server(s) TCF This slide © SPRINT and Infineon 2007, All rights reserved. Eclipse

6 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Today: Separate Communications per tool UI Target Tool ATool BTool CTool D Agent AAgent BHardware C Value Add B Value Add C Host P1 P3 P2

7 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Bad for the User UI Target Tool ATool BTool CTool D Agent AAgent BAgent C Value Add B Value Add C Host P1 P3 P2 ?? ?

8 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Bad Design! UI Target Tool ATool BTool CTool D Agent AAgent BAgent C Value Add B Value Add C Host

9 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Limited eco system Too many different tools agents and protocols Add-on providers need to provide multiple integrations Huge effort putting it all together end-to-end Lock-in to single vendor for end-to-end solution –No best-of-breed mashup solutions

10 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Design Goals of TCF Protocol Framework provides common infrastructure –communication protocol –Agent: “Service container” –Proxying Same protocol on all layers supporting value-add –Support pass-through Tools can use services in uniform way Service implementers can focus on functionality

11 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 TCF vs. ECF TCF – Target Communication (Protocol) Framework –Protocol, independent of API –API in multiple languages (C, Java, Perl, …) –One extendable Protocol (though supports multiple transports) –Typically point-to-point only ECF – Eclipse Communication Framework –API independent of Protocol –API in Java - abstract specification of concepts: Message, Channel, Container, ID Datashare, Filetransfer, Directory Listing –ONE API for multiple protocols (e.g. Files; FTP, HTTP, EFS, …) –Very flexible one-to-many communications TCF and ECF are similar, but ECF is on a higher layer

12 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 TCF - Core Design Ideas Use the same extendable protocol end-to-end –allow value-adding servers to intercept select services Extension: Abstract Services as building blocks –Same tool for multiple targets (e.g. agent, OCD, simulator) –Avoid tools specific agents –Bridge gap with specific services to configure common ones Data-driven by target –Service knows best how to represent the system –If not possible, put the knowledge in the lowest possible layer and data drive the layers above Support high latency communication links

13 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Service 4 Service 5 TCF: Common agent and protocol Tool A Tool BTool CTool D TCF Agent Value Add UI Target Host Service 1Service 2Service 3

14 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Peer is a Communication endpoint Service 4 Service 5 Tool A Tool BTool CTool D Value Add UI Target Host Service 1Service 2Service 3 TCF Agent

15 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Service Service 4 Service 5 Tool A Tool BTool CTool D TCF Agent Value Add UI Target Host Service 1Service 2Service 3

16 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Message Channel Service 4 Service 5 Tool A Tool BTool CTool D TCF Agent Value Add UI Target Host Service 1Service 2Service 3 TCF Channel

17 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Channels and Messages Communication between peers use channels Channels abstract/hide the transport layer –Currently TCP –Possible: RS232, JTAG, USB etc Channels transmit Messages

18 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 TCF Communication Protocol Message –A packet of data –Transmitted over communication channel Multiple channels per peer Proxying/Tunneling –Message forwarding –“Decorator” can intercept communication –“Value-add” services (e.g. debug info) –No protocol conversion needed

19 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 The TCF Message Types Command (send) –Request some action on remote peer Progress –Long running commands may send “progress ticks” Result (reply) –Remote peer sends one result for each command! Event –Notify a change Flow control –prevent congestion

20 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Command Command is a message Sent to remote peer Remote peer must send one Result for each Command!

21 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Result Result is a message –Data, Errors Sent as a response to a command Remote peer sends one Result per Command!

22 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Commands are Asynchronous Sender of a command returns immediately –Fast on high latency connections Sender receives results –asynchronously

23 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Event Event is a message Notification about state changes

24 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Message order guaranteed on channel Keep state of remote peer Without message ordering no consistent state Ordering per channel and direction Command X=1 Result X=1 Event X=2 Command X=3 Event X=4 Result X=3 Event X=5

25 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Flow Control Prevent congestion

26 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Service 4 Service 5 TCF: Layered View Tool A Tool BTool CTool D TCF Agent Value Add UI Target Host Service 1Service 2Service 3

27 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Communication Layers Channel Messages Services Transport Layer (e.g. TCP/IP)

28 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Transport Layer: Byte Stream Channel Messages ????????????????????????????????????????????? Services Transport Layer (e.g. TCP/IP)

29 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Channel: Message Stream Messages ?????  ??????????????????????????????  ??????? Channel Services ?????????????????????????????????????????????? Transport Layer (e.g. TCP/IP)

30 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Messages: Command Result Event Flow Messages ?????  ??????????????????????????????  ??????? C 17 SysMonitor getChildren ?????? ?????????????????????????????????????????????? Channel Transport Layer (e.g. TCP/IP) Services

31 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Message Type Messages C 17 SysMonitor getChildren ?????? Message Type ?????  ??????????????????????????????  ??????? ?????????????????????????????????????????????? Channel Transport Layer (e.g. TCP/IP) Services

32 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Token Messages C 17 SysMonitor getChildren ?????? Token: Channel Unique To identify Result ?????  ??????????????????????????????  ??????? ?????????????????????????????????????????????? Channel Transport Layer (e.g. TCP/IP) Services

33 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Service Id Messages C 17 SysMonitor getChildren ?????? Service id ?????  ??????????????????????????????  ??????? ?????????????????????????????????????????????? Channel Transport Layer (e.g. TCP/IP) Services

34 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Command Name Messages C 17 SysMonitor getChildren ?????? Command name ?????  ??????????????????????????????  ??????? ?????????????????????????????????????????????? Channel Transport Layer (e.g. TCP/IP) Services

35 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Arguments (byte array) Messages C 17 SysMonitor getChildren ?????? Arguments (byte array) ?????  ??????????????????????????????  ??????? ?????????????????????????????????????????????? Channel Transport Layer (e.g. TCP/IP) Services

36 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Argument Representation: e.g. JSON Messages C 17 SysMonitor getChildren [“p123”] C 17 SysMonitor getChildren ?????? ?????  ??????????????????????????????  ??????? ?????????????????????????????????????????????? Channel Transport Layer (e.g. TCP/IP) Services Marshalling: JSON

37 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 The 5 TCF Messages Command C Progress P Result R Event E Flow F

38 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 TCF and the OSI Layers 7 Application Layer 6 Presentation Layer 5 Session Layer 4 Transport Layer 3 Network Layer 2 Data Link Layer 1 Physical Layer Channel + Messages JSON Services

39 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 TCF as Layer 3 and 4 7 Application Layer 6 Presentation Layer 5 Session Layer 4 Transport Layer 3 Network Layer 2 Data Link Layer 1 Physical Layer JSON Services Channel + Messages

40 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Prototype implementation Lightweight C-based agent –Minimal agent has < 4000 lines of C code –Minimal impact on the target Eclipse plug-ins –Java TCF implementation to access service

41 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Getting Real: Development Tools Eclipse-TCF-Preinstalled.zip –Eclipse SDK 3.5m6Eclipse SDK –CDT 6.0m6CDT –RSE 3.1m6RSE –Optional: Subclipse with GEF or SubversiveSubclipseGEFSubversive –Target Emulator QEMU-arm-tcf.zip with mini Linux + ssh Compilers: *.exe with installer –Cygwin, or MinGW MSYS (with Wascana), or VS ExpressCygwinMinGWWascana –CodeSourcery g++ Lite for ARMCodeSourcery

42 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Workspace Setup and Build Import into Workspace: tcf.zip –Import > General > Existing Projects > Archive –Or import SVN Team Project Set Build TCF Agent native / cross –User-defined build (hand written Makefile) – external shell Type “make” on host Type “make ARCH=ARM” for target ARM –Visual Studio (Express): open agent.sln and build Need VS for Windows Debugging Need external dbghelp.dll for bug fixes – CQ 2553CQ 2553

43 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 TCF Sample Session Open Command prompt 1 for agent: –cd org.eclipse.tm.tcf.agent/Cygwin/i686/Debug –./agent -L- Open Command prompt 2 for client: –./client -L- –help –peers –connect tcp: :1534 –tcf FileSystem roots –tcf FileSystem opendir "/root" –tcf FileSystem readdir "FS0" –tcf Agent is auto-detected JSON messages Using an ID Logging to stdout Shortcut: connect TCP::

44 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Auto Discovery Discovers Peers and Services Simplifies setup –Client UI can easily find peers and discover services TCF comes with a simple UDP auto discovery –Other mechanisms possible and optional

45 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 How Discovery works First agent binds UDP::1534 to listen –If port is not available, somebody else is master already Become slave: periodically send “Hello” to UDP::1534 Master responds with list of known peers Master listens for new slaves announcing themselves –Keep list of known slaves, broadcast to all when asked When master dies, a slave will get no response on poll –After timeout on poll, slave becomes new master –It has the full list of known peers already at this time Across networks: fixed master – tcfreg program Other implementations of Protocol / API are possible

46 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Cross-compiling for QEMU ARM Define OPSYS, ARCH in the Makefile Not all Services may be supported on target Platform –Use config.h to disable unwanted services Look at SVN diffs in your Workspace Once built, use RSE “SSH Only” to drag & drop executables into the remote. Don’t forget chmod +x

47 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Agent Structure Documented on TCF Agent Prototype docsTCF Agent Prototype Services: filesystem, sysmon, processes; runctrl, memory, breakpoints, registers; expressions, stacktrace, symbols Core handlers / event dispatch protocol, channel*, streams, event, inputbuf, ip_ifc tcf.h Infra: cmdline, errors, exceptions, asyncreq json / base64, mdep, myalloc, trace Core services proxy, discovery*, streams context, dwarf*, linen., memorymap, windbg main*, test, config, diag.

48 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Agent Structure (2) Main and config configures and instantiates framework and services („hook up“) –#define SERVICE_xxx Event loop sends request into service, service responds immediately or asynchronously One event Thread only Service protocol spec relates to functions in code: –command_roots, event_context_created,... Client cmdline is just another source of events

49 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Advanced: connecting into QEMU This is in run.bat, to redirect SSH (2222) and port 7000: –qemu.exe –redir tcp:2222::22 -redir tcp:7000::7000 Start run.bat –Login with “root : root” Or ssh localhost –p 2222 –l root –./agent –L- -sTCP::7000 RSE: New TCF connection to localhost:7000 –Show QEMU Linux processes -sURL Server socket on port 7000

50 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Connecting QEMU from outside This is in puppy_redir.bat: –start puppy.exe -redir tcp:1534:: is the TCF default port for discovery. QEMU forwards it from the client to the host in both directions From Eclipse, launch RSE+TCF –Run > Debug Configurations > Eclipse App –Open RSE Perspective –New Connection : TCF –Files Subsystem Properties : Port : 7000 –Expand Processes / All Processes  Shows QEMU Linux Processes

51 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 RSE sample Process service File service

52 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Multiplexing: Tunnel into QEMU QEMU is not discoverable because it cannot talk to UDP::1534 – since that port is not shared –Use a remote value-add for dispatching multiple channels Inside QEMU: –Stop agent.exe –Shell 1:./valueadd –L- -sTCP::7000 –Shell 2:./agent –L- -sTCP::7010 Using default port On local commandline –./client –L- –connect TCP::7000 –peers –tcf Locator redirect TCP::7010 –tcf FileSystem roots Peer on 7010 is autodetected Multiplexer on port 7000 value-add supports multiple clients/channels

53 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 More on command-line tools Tcfreg: dumbed-down agent as UDP discovery registry only Tcflog: no service itself: forwards requests and logs them Valueadd: provides Locator.redirect service only Code mostly common, in main_*.c –l : log level –L : log to file –s : for servers (agent, tcflog, valueadd): Port to expose e.g. TCP:localhost:1534, default just TCP: Additional client option: –S : replay a script Additional agent options: –i : interactive, -d : daemon, -t : test

54 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 The Java side org.eclipse.tm.tcf –Plain Java, no dependency to Eclipse –Protocol binding only –Asynchronous, callbacks

55 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Java: TCF Service Implementation Asynchronous: DoneMkDir is the Callback Commands go into a queue to run on Command Thread Callback

56 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 More about Services Protocol Specification / Docs can be viewed locally –org.eclipse.tm.tcf.docs project C Impl: Each has a macro define to enable/disable –FileSearch “#if SERVICE_” to find impl. –Common init function to register commands –Common naming pattern Java Impl: Each service is an interface –Extends Iservice –Implemented by a Proxies –Async callback mechanism

57 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Required service: Locator Used to discover peers Peer lifecycle events When connected peers can list its services

58 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 TCF Services Run Control Service Breakpoints Service Memory Service Registers Service Processes Service Stack Trace Service System Monitor Service File System Service

59 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Value-add Service 4 Service 5 Tool A Tool BTool CTool D TCF Agent Value Add UI Target Host Service 1Service 2Service 3

60 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Use Case: SimpleJtagDevice Protocol –TCP/IP Services –Service Manager (returns fixed list of services) –Debug (run-control, breakpoint, memory access) –Possibly Others (flash programming, download, etc) No Dynamic Addition or Removal of Services No Multiplexing (single client) No Forwarding No Dynamic Discovery 60

61 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Use Case: TestExceutionAgent Protocol –Depends on OS configuration and board Services –Service Manager (returns fixed list of services) –Process launch and kill –Standard I/O redirection –File system access No Dynamic Addition or Removal of Services No Multiplexing (multiple clients) No Forwarding No Dynamic Discovery 61

62 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Use Case: LinuxUserModeAgent Protocol –Typically TCP/IP, but depends on OS configuration and hardware Services –Service Manager –Debug (run-control, breakpoint, memory access) –OS Awareness (process/thread list, CPU utilization, etc) –Process launch and kill –Standard I/O redirection –File system access Possibly Dynamic Addition or Removal of Services Possibly Multiplexing (multiple clients) Possibly Forwarding Possibly Dynamic Discovery 62

63 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 TCF Plugins Org.eclipse.tm.tcf – Core Java framework Org.eclipse.tm.tcf.agent – The agent (plain C) Org.eclipse.tm.tcf.debug.* - Debug Integration Org.eclipse.tm.tcf.docs – Org.eclipse.tm.tcf.dsf.* - DSF integration Org.eclipse.tm.tcf.examples.daytime.* - How to create a custom Service (both agent and client) Org.eclpise.tm.tcf.rse – RSE Files and Processes

64 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Debugging Run > Debug Configurations > TCF –Select connection (auto-discovered) –Program: /root/helloworld/helloworld –Args: “tcf is cool” –Debug Switch to “Debug Perspective” Show View “TCF Trace” Suspend / Resume, Registers

65 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 TCF Debugging example

66 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 TCF: Next Steps A large number of adopters today – “TCF Round Table” –Mostly “whitebox adoption” today –Conversion from TCF to legacy proprietary Protocol conversion agent (like valueadd) TCF C Agent binding to legacy implementation Core Protocol spec is frozen, working on Services –Version / maturity / status info to be added to docs Getting involved: –Bugzilla, Newsgroup, Wiki

67 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Specification Status Review of current and specification of additional services in power.org and Eclipse Transport Channel Current Services –Run Control, Memory, Register, Breakpoint, Processes, Stack Trace, File System, System Monitoring

68 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Links TCF Homepage has all the pointers – –SVN Team Project Sets, ViewSVN –Documentation Getting Started (less than what we did) Protocol Specification (messages, events, JSON) Services description Agent description 68

69 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Questions?

70 TCF Tutorial | © 2007, 2009 Wind River Systems, Inc. | all contents except logos and trademarks made available under the EPL v1.0 Credits Idea: –Felix Burton (Wind River), –Eugene Tarassov (Wind River) Original implementation –Eugene Tarassov