Application Note 198 - Using the uVision Socket Interface

Revision 1.3 - August 2008

This Application Note explains how to control and monitor uVision via its in-built TCP/IP interface.

Information in this file, the accompany manuals, and software is
Copyright (c) KEIL - An ARM Company.
All rights reserved.

 


Revision History

Contents

Overview


The uVision Socket Interface (UVSOCK) enables uVision to be controlled and monitored by one or more third party applications (Clients). It enables the Client(s) to perform:

The Client has access to the power of uVision's device database, build system, and features such as advanced debugging with the Real-Time Agent. The Client and uVision work together to provide a seamless experience for the end-user.

The interface is implemented over TCP/IP giving it several distinct advantages over other inter-process communication methods (e.g. RPC, COM objects, etc). It is cross platform, and can be used locally on the PC running uVision, or remotely from another PC that is on the network.

UVSOCK can be used in one of two ways:

The recommended method is via the UVSOCK Client, as this provides the programmer with a familiar, easy to use C interface. Using the TCP/IP Connection directly is only recommended for users who require control of uVision from a Client running on an operating system other than Microsoft Windows.

Requirements and Configuration


One of the following products is required:

The TCP server port used by uVision must be set via one of the following methods:

Setting the socket to any available port will start the UVSOCK server on the localhost interface (a commonly used port is 4823). Setting the port to 0 disables UVSOCK.

UVSOCK Client (UVSC)


The UVSOCK Client (UVSC) simplifies using UVSOCK for the Client application. It removes the requirement for the Client programmer to be familiar with TCP/IP, or deal with the asynchronous nature of the UVSOCK interface. It is implemented as a compact Windows Dynamically Linked Library (DLL). The DLL implements a C API (UVSC_C.h) that provides access to all the features of the UVSOCK interface. It can be loaded into a Client application using the normal Windows methods. The client can be programmed in any language that is capable of using a DLL interface.

The UVSC DLL is provided with the KEIL tools at the location:

To guarantee compatibility with UV3.exe, the DLL must be loaded by your application from this location. The UVSC DLL must not be included in your distributed application, unless your application is guaranteed to be used only with the specific version of KEIL tools from which the UVSC DLL was taken.

To simplify Client code implementation, the UVSC Tester application is provided. This implements a test Client application in Visual C++ with MFC. The source code for the UVSC Tester is provided and can be modified for use in your application.

UVSC API Documentation

UVSC API Header File

TCP/IP Connection (UVSOCK)


The UVSOCK interface can be used directly, without using the UVSOCK Client, although this is only recommended in cases where the UVSOCK Client cannot be used, such as when the Client is running on an operating system other than Microsoft Windows. The UVSOCK API (UVSOCK.h) documentation describes how TCP/IP communication should be implemented by the client.

UVSOCK API Documentation

USOCK API Header File

UVSC Tester


The UVSC Tester is provided as an example UVSOCK client application. It uses the UVSC DLL to communicate with uVision via UVSOCK, and implements most features of the interface. The source code is provided and may be used as a starting point for integrating uVision control in your application.

UVSC Tester Source Code

UVSC Tester Application

Technical Support

At Keil Software, we are dedicated to providing you with the best development tools and technical support. That's why we offer numerous ways you can get the technical support you need to complete your embedded projects.

Many of the features of our Technical Support Knowledgebase and Web Site are the results of your suggestions. If you have any ideas that will improve them, please give us your feedback!

Contact Details

If you experience any problems or have any questions about this Application Note, contact one of our distributors or offices for assistance.

In the USA...

KEIL - An ARM Company
1501 10th Street, Suite 110
Plano, TX 75074
USA

800-348-8051 - Sales
972-312-1107 - Support
972-312-1159 - Fax

sales.us@keil.com
- Sales E-Mail
support.us@keil.com
- Support E-mail
In Europe...

KEIL - An ARM Company
Bretonischer Ring 15
D-85630 Grasbrunn
Germany

+49 89 456040-0 - Sales
+49 89 456040-24 - Support
+49 89 468162 - Fax

sales.intl@keil.com
- Sales E-Mail
support.intl@keil.com
- Support E-Mail

Copyright (c) KEIL - An ARM Company.
All rights reserved.
Visit our web site at www.keil.com.

Generated with doxygen.