Lab1 - TSLite Phase I: Installation and Testing for one-way communication

Lab1 - TSLite Phase I

1. TSLite, Phase I: Installation and Testing for one-way communication.

  1. Selection of VMServer/VM
  2. Host-Target Connection
    1. Hardware Setup
      1. Network Connection
    2. Virtual Machine Serial Port Connection Setup
  3. Software Installation
    1. Windows XP setup
      1. Set up TSLite in Windows XP VM
      2. Set up VC++ 6.0
      3. Configure the communication channel
      4. Set up the host environment
    2. TSLite setup
      1. Create TSLite VM
        1. TSLite's README.TXT
      2. Make a Boot Disk
  4. Test the Hello World project.

Procedure

A. Selection of VMServer/VM

- I am using VMware Workstation 7.0 in the host OS of Windows 7.

- I installed Windows XP as a guest OS inside virtual machine (VMware Workstation 7). Also install VMware tools in Windows XP.

B.a Not required in case of Virtual Machine usage

B.b Virtual Machine Serial Port Connection Setup

In Windows XP virtual machine

COM 1

Device status

[v] Connected

[v] Connect at power on

--------------------------

Connection

( ) Use physical serial port

( ) Use output file

(*) Use named pipe:

\\.\pipe\com_1

This end is the server

The other end is a virtual machine

COM 2

Device status

[v] Connected

[v] Connect at power on

--------------------------

Connection

( ) Use physical serial port

( ) Use output file

(*) Use named pipe:

\\.\pipe\com_2

This end is the client

The other end is a virtual machine

[ ] Yield CPU on poll

C. Software Installation

a. Windows XP Setup

i. Set up TSLite in Windows XP VM using ISO file

You need Visual C++ installed in Windows XP before installation of tslite.

    1. Download tslite.iso.
    2. If you don't have a virtual CD drive in Windows XP VM, then create one.
    3. Mapping the virtual CD drive using tslite.iso, instead of a physical CD drive.
    4. Open the virtual CD.
    5. Click "setup"
    6. Select setup directory: C:\embed_net\tslite
    7. Answer NO to the following question

Windows NT requires a device driver in order for you to use parallel port communication. Do you want to install the parallel port driver now?

ii Set up the VC++ 6.0

  • Install VC++ 6.0
  • Configure VC++ 6.0
  • Tools --> Option --> Directories
    1. Include files: C:\EMBED_NET\TSLITE\INCLUDE
    2. Note: include files can be found from include.tar.gz
    3. Executable files: C:\EMBED_NET\TSLITE\BIN
    4. Note: include files can be found from bin.tar.gz
    5. Library files: C:\EMBED_NET\TSLITE\LIB
    6. Note: include files can be found from lib.tar.gz
  • Install the Embedded StudioExpress add-in
  • Tools --> Customize --> Add-ins and Macro Files
    1. Browse to C:\embed_net\tslite\bin
    2. Select etsvc5.dll
    3. You will add a new add-in Phar Lap Embedded StudioExpress
        1. Click Close
    • The Embedded StudioExpress toolbar should appear on VC++ 6.0
  • iii. Configure the communication channel
      • Activate VC++
      • Click Target Configuration Settings
    • Communications:
    • Port: COM1
    • Baud Rate: AUTO
    • Download Mode
    • (*) Download
    • ( ) No Download
    • ETS Base Directory: c:\embedn_net\tslie
  • iv. Set up the host environment
    • See page 74 of the book "Real-Time Programming, A Guide to 32-bit Embedded Development"
      • Start --> Control Panel --> System --> Advanced --> Environment Variables --> System variables
      • PATH:
      • C:\embed_net\tslite\bin;c:\Program Files\Microsoft Visual
    • Studio\VC98\Bin;c:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin
      • INCLUDE:
      • C:\embed_net\tslite\include;c:\Program Files\Microsoft Visual Studio\VC98\include
      • LIB:
      • C:\embed_net\tslite\lib;c:\Program Files\Microsoft Visual Studio\VC98\lib
      • PHARCOMM: -COM 1

C. TSLite Setup

a. Create TSLite Virtual Machine

i. Create the TSLite VM by yourself

  1. File ==> New ==> Virtual machine
  2. Next ==> Typical
  3. Other

Version: other

  1. Name the Virtual Machine

Virtual machine name: tslite

Localtion: C:\Virutal Machines\tslite

No network

  1. Disk size [GB}: 0.5

- TSLite VM Serial Port Connection Setup

  • COM 1

Device status

[ ] Connected

[v] Connect at power on

--------------------------

Connection

( ) Use physical serial port

( ) Use output file

(*) Use named pipe:

\\.\pipe\com_1

This end is the client

The other end is a virtual machine

  • COM 2

Device status

[ ] Connected

[v] Connect at power on

--------------------------

Connection

( ) Use physical serial port

( ) Use output file

(*) Use named pipe:

\\.\pipe\com_2

This end is the server

The other end is a virtual machine

C.b.ii Make a Boot disk

- Create a virtual book disk

    1. Create a virtual floppy disk in a Windows XP VM.

L:\VM\xp_vc++_12G\Windows XP Professional\tslite.flp

    1. Download monitor.tar.gz and uncompress into a directory in the Windows XP VM. for example

c:\embed_net\tslite\monitor

Note: You can skip this step if you has set up TSLite in Windows XP VM

    1. Open Command Prompt from START  RUN  cmd and go into the following directory.

cd c:\embed_net\tslite\monitor

    1. Type this command in the Windows XP VM.

disk1440 a

Now, you have a virtual TSLite boot disk

L:\VM\xp_vc++_12G\Windows XP Professional\tslite.flp

Note: This file is created outside of Win XP VM, so it cannot be found inside the VM.

5. After the virtual boot disk is created, disable the Windows XP VM from booting from the virtual boot disk.

Device states

[*] Connected [ ] Connect at power on

(*) Use floppy image: tslite.flp

6. Before you can use this floppy disk, you need to change the configuration settings of ETS Monitor. Note: The default value is LPT1.

  • Option 1: If you use serial port, you need
    1. cd c:\embed_net\tslite\bin
    2. cfigkern -com 1 a:diskkern.bin
    • Modifying ETS Kernel Settings in monitor file 'A:\DISKKERN.BIN':
    • COM port Setting:
    • Old State: LPT1:
    • New State: COM1
    • Note: In our experiment, we use Option 1.
      • Option 2: If you use parallel port other than LPT 1, for example, LPT 2, then
      1. cd c:\embed_ne\tslite\bin
      2. cfigkern -lpt 2 a:diskkern.bin
    • Boot TSLite from the virtual floppy disk
      • - Configure previously created tslite VM and add virtual floppy drive with created bootable floppy image tslite.flp.
    • - Power on the Virtual machine tslite from bootable virtual floppy disk. It is booted from created bootable floppy disk and shown the following result.
    • D. Test the "Hello World" Project
      • Before you test the "Hello World" project, you need to activate TSLite VM
      • Try the 'Hello World' project
        • You can use pre-built executable code
          1. Download hello.tar.gz
          2. Uncompress and save to a directory, for example C:\embed_net\teslite\projects\hello
          3. cd C:\embed_net\tslite\projects\hello
          4. C:\embed_net\tslite\bin\runemb release\hello. Note: You may need to download bin.tar.gz
          5. You will see a Download Window pops up and code is downloaded from the Host Machine to the target Machine.

- On the Host Machine (i.e., Windows XP VM), the following message is displayed

Hello world!

Otherwise, follow the following procedure to regenerate the executable code, and download the code from VC++ 6.0.

- Open VC++ 6.0

- File ==> Open workspace

C:\embed_net\tslite\projects\hello\HELLO.dsw

- Build --> Rebuild All

- Execute

- You will see a Download Window pops up and code is downloaded from the Host Machine to the target Machine.

- On the Host Machine, a DOS window pops up and displays the following messsage:

Hello world!

Press a key to exit...