Lab1 - TSLite Phase I
1. TSLite, Phase I: Installation and Testing for one-way communication.
Selection of VMServer/VM
Host-Target Connection
Hardware Setup
Network Connection
Virtual Machine Serial Port Connection Setup
Software Installation
Windows XP setup
Set up TSLite in Windows XP VM
Set up VC++ 6.0
Configure the communication channel
Set up the host environment
TSLite setup
Create TSLite VM
TSLite's README.TXT
Make a Boot Disk
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.
Download tslite.iso.
If you don't have a virtual CD drive in Windows XP VM, then create one.
Mapping the virtual CD drive using tslite.iso, instead of a physical CD drive.
Open the virtual CD.
Click "setup"
Select setup directory: C:\embed_net\tslite
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
Include files: C:\EMBED_NET\TSLITE\INCLUDE
Note: include files can be found from include.tar.gz
Executable files: C:\EMBED_NET\TSLITE\BIN
Note: include files can be found from bin.tar.gz
Library files: C:\EMBED_NET\TSLITE\LIB
Note: include files can be found from lib.tar.gz
Install the Embedded StudioExpress add-in
Tools --> Customize --> Add-ins and Macro Files
Browse to C:\embed_net\tslite\bin
Select etsvc5.dll
You will add a new add-in Phar Lap Embedded StudioExpress
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
File ==> New ==> Virtual machine
Next ==> Typical
Other
Version: other
Name the Virtual Machine
Virtual machine name: tslite
Localtion: C:\Virutal Machines\tslite
No network
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
Create a virtual floppy disk in a Windows XP VM.
L:\VM\xp_vc++_12G\Windows XP Professional\tslite.flp
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
Open Command Prompt from START RUN cmd and go into the following directory.
cd c:\embed_net\tslite\monitor
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
cd c:\embed_net\tslite\bin
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
cd c:\embed_ne\tslite\bin
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
Download hello.tar.gz
Uncompress and save to a directory, for example C:\embed_net\teslite\projects\hello
cd C:\embed_net\tslite\projects\hello
C:\embed_net\tslite\bin\runemb release\hello. Note: You may need to download bin.tar.gz
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...