Lab2 - TSLite Phase II: Installation and Testing for Two way communication

TSLite (Phase II: Two way communication)

  1. Overview of UPS Project
  2. Create a common workspace
  3. Create New Programming Projects
  4. Set up UPS2 to test the second USN-Serial connection
  5. Source code

OS/Software/Tools used during this lab:

(1) VMware Server / VMware Workstation

(2) Windows XP

(3) Cygwin

(A) Download and install Cygwin from the following link inside your guest operating system Windows XP which is installed in VMware Server/ VMware Workstation.

B. Create a Common Workspace

To create a common workspace you need to follow the steps as below.

  • Back up the project by typing the following command in a Cygwin window

cd c:/embed_net/tslite

cp -R projects projects.orig

  • Activate VC++ 6.0
  • File --> New --> Win32 Console Application
  • Use these parameters

Project name: projects

Location: c:\embed_net\tslite

The "projects" workspace is now created.

  • Remove the project: projects
  • Insert the following projects into the "projects" workspace.




C. Create a New Programming Projects

The following procedure will create an ETS Kernel Project which is a Win32 console application project that has the switch /ETS:FILENAME in its link command line. When Developer Studio links the program, Embedded StudioExpress intercepts the operation and redirects it to the LinkLoc linker, using the filename specified in the /ETS switch as a linker command file.

    • Click New ETS Project in the Embedded StudioExpress toolbar
    • Enter these parameters in the "ETS Project Wizard - Step 1" window

Workspace Name: myproj

Workspace Base Directory:


Linker Command File: (*) Create New File

    • Check these parameters in the "ETS Project Wizard - Step 2 of 3" window

[x] PC-Compatible Screen Driver

[x] PC-Compatible Keyboard Driver

Note: If PC-Compatible Screen Driver is turned on then @pcat_sc.emb is not commented out in myproj.lnk

! PC-Compatible Screen Driver


This setting will enable the displaying of message on the target machine instead of the host machine.

    • Add the source code myproj.c which is created in this way:

cd C:/embed_net/tslite/projects/myproj

cp ../hello/hello.c myproj.c

    • Add created myproj.c to project myproj.
    • Compile and execute myproj. The target machine displays

Hello world!

A DOS window pops up in the host machine and displays:

Press a key to exit...

D. Set up UPS2 to test the second USN-Serial connection

- Set up UPS2 to test the second USN-Serial connection

    • Activate VC++ 6.0
    • Open this workspace


    • Rebuild the ups2 project

Note: You may encounter this error

C:\embed_net\tslite\projects\ups2\ups2\upsall.h(10) : fatal error C1083: Cannot open include file: 'embkern.h': No such file or directory

This is caused by incorrect INCLUDE directory setup.

    • Run with com2

Right click ups2 --> setting --> Debug -->

Program arguments: com2

    • Execute the project ups2

To build and execute ups2.exe first make project ups2 as Active Project.

- Then Build project ups2 as below from menu Build -> Build UPS2.exe.

- Then Execute UPS2.exe from menu Build -> Execute UPS2.exe

In the following snapshot, bottom red indication shows project ups2 is successful built.

- Following snapshot shows the downloading of file UPS2.exe.

- Don’t close the Executable window till you finish execution of winups.exe. It must be required to remain open to get the final result.

    • Execute the project WINUPS

- First activate project WINUPS as below.

- Then Build project winups as below from menu Build  Build WINUPS.exe.

- Then Execute WINUPS.exe from menu Build -> Execute WINUPS.exe

In the following snapshot, bottom red indication shows project WINUPS is successful built.

- Execute the project winups which pops up the following window.

      • File --> Port Settings

Select COM2

      • File --> Connect to UPS

Click buttons to experiment

- By clicking on “Connect to UPS” pops up the following window.

      • File --> Disconnect from UPS

- By clicking on “Disconnect to UPS” black window of UPS.exe will show the message of “Press any key to exit ….”.

- When you press any key in that window that window will be closed and you can finish your TSLite Phase II (Two way communication) successfully.