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 1.0 - February 2008: Initial revision [UVSOCK API V2.03]
- Revision 1.1 - April 2008: [UVSOCK API V2.04]
- Revision 1.2 - April 2008: [UVSOCK API V2.05]
- Revision 1.3 - August 2008: [UVSOCK API V2.07]
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:
- Application configuration
- Application building
- Application debugging
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.
One of the following products is required:
- RealView Microcontroller Development Kit V3.22 (or greater)
- Keil 8051 Development Tools V8.14a (or greater)
- Keil 166 Development Tools V6.12 (or greater)
- Keil 251 Development Tools V4.54 (or greater)
The TCP server port used by
uVision must be set via one of the following methods:
- In the uVision menu select Tools --> Configure Socket Port Number...
- Set SOCKETPORT in Tools.ini to the required socket port
- Call the UVSOCK Client (UVSC) API UVSC_OpenConnection function with the required socket port
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.
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
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
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
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.
-
Technical Support Knowledgebase
More than 1500 technical support questions and answers are available in the Support Solutions Knowledgebase. When a new question arises, it is added to the knowledgebase which is continuously published to the Web. This enables you to get technical support at times when our support staff is unavailable.
-
Application Notes
Numerous Application Notes help you decipher complex features and implement robust applications.
-
Example Programs and Files
Utility programs, example code, and sample projects are regularly added to the Download File section of the web site.
-
Discussion Forum
Post questions, comments, and suggestions to the Keil Software Discussion Forum and interact with other Keil users around the world.
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!
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
|