Printed in U.S.A., October 1993; reprinted July 1995
265691 1–9761 revision B
SPNU133
CDT370Addendum
totheTMS370Family
CSourceDebugger
User'sGuide
SPRU133
July 1995
Printed on Recycled Paper
IMPORTANT NOTICE
T exas Instruments (TI) reserves the right to make changes to its products or to discontinue any
semiconductor product or service without notice, and advises its customers to obtain the latest
version of relevant information to verify , before placing orders, that the information being relied
on is current.
TI warrants performance of its semiconductor products and related software to the specifications
applicable at the time of sale in accordance with TI’s standard warranty . T esting and other quality
control techniques are utilized to the extent TI deems necessary to support this warranty.
Specific testing of all parameters of each device is not necessarily performed, except those
mandated by government requirements.
Certain applications using semiconductor products may involve potential risks of death,
personal injury , or severe property or environmental damage (“Critical Applications”).
TI SEMICONDUCTOR PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED, OR
WARRANTED TO BE SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES
OR SYSTEMS OR OTHER CRITICAL APPLICATIONS.
Inclusion of TI products in such applications is understood to be fully at the risk of the customer.
Use of TI products in such applications requires the written approval of an appropriate TI officer .
Questions concerning potential risk applications should be directed to TI through a local SC
sales office.
In order to minimize risks associated with the customer’s applications, adequate design and
operating safeguards should be provided by the customer to minimize inherent or procedural
hazards.
TI assumes no liability for applications assistance, customer product design, software
performance, or infringement of patents or services described herein. Nor does TI warrant or
represent that any license, either express or implied, is granted under any patent right, copyright,
mask work right, or other intellectual property right of TI covering or relating to any combination,
machine, or process in which such semiconductor products or services might be or are used.
Copyright 1995, Texas Instruments Incorporated
About This Manual
This book tells you how to install and use the CDT370 (Compact Development
T ool) and explains the similarities and differences between the debugger used
with the CDT370 and the debugger that is described in the
Source Debugger User’s Guide
Information About Cautions
This book contains cautions.
This is an example of a caution statement.
A caution statement describes a situation that could potentially
damage your software or equipment.
Read This First
TMS370 Family C
.
The information in a caution is provided for your protection. Please read each
caution carefully.
FCC Warning
This equipment is intended for use in a laboratory test environment only. It
generates, uses, and can radiate radio frequency energy and has not been
tested for compliance with the limits of computing devices pursuant to subpart
J of part 15 of FCC rules, which are designed to provide reasonable protection
against radio frequency interference. Operation of this equipment in other
environments may cause interference with radio communications, in which
case the user at his own expense will be required to take whatever measures
may be required to correct this interference.
Read This First
iii
Trademarks
Trademarks
PC-DOS is a trademark of International Business Machines.
MS-DOS and Windows are trademarks of Microsoft Corporation.
10–1.Predefined Constants for Use With Conditional Commands10-1. . . . . . . . . . . . . . . . . . . . . . . .
viii
Introduction
Chapter 1
Introduction
The CDT370 (Compact Development Tool) offers a low-cost but highly efficient route to TMS370 family development. In addition, the CDT370 supports
programming of the new Field Programmable Microcontroller (FPM) family
members. Features such as a new interactive windowed CDT370 debugger,
real-time emulation, and an integrated EPROM and EEPROM programmer all
contribute to enhanced user productivity and, consequently , a shorter design
cycle.
The CDT370 is composed of:
-
CDT370 emulator board
-
Interactive windowed CDT370 C-source debugger
-
Assembler and linker
-
Complete support documentation
The CDT370 debugger is a screen-oriented, interactive program that aids in
the development of applications for TMS370 family microcontrollers. The debugger is used with a hardware unit called an emulator, which provides realtime, in-circuit emulation of the TMS370 microcontroller. The debugger runs
under the MS-DOS operating system on an IBM or compatible and connects
to the emulator through an add-on PC connection or RS-232 serial communications link.
TopicPage
1.1About The CDT370 Board1-2
1.2About The Target Cable Set1-3
Introduction
1-1
About the CDT370 Board
1.1About the CDT370 Board
Once the CDT370 is unpacked, you can begin code development immediately .
Everything required to emulate or program TMS370 devices is provided. The
CDT370 supports the following devices:
-
TMS370Cx1x
-
TMS370Cx2x
-
TMS370Cx4x
-
TMS370Cx5x
Use the
XDS22 Extended Development System
to develop code for
TMS370Cx3x PACT devices.
The CDT370 emulator hardware is a single board that can be connected in two
different ways:
-
The CDT370 board is designed to plug into the expansion chassis of any
IBM XT/AT or compatible
-
The CDT370 can be connected to the PC through an RS-232 serial link
The CDT370 on-board hardware provides:
-
Serial/parallel communication interface
-
Real-time TMS370 emulation logic (up to 20 MHz)
-
Real-time TMS370 data EEPROM emulation logic
-
Real-time trace circular buffer (up to 2048 program steps)
-
Real-time 24-bit cycle counter
-
Integrated EPROM and EEPROM device programmer
1-2
1.2About the Target Cable Set
Each emulator can have a target cable with a connector on one end that has
the same pinout as the device being emulated. This connector plugs directly
into the socket on the application system (also referred to as the
circuit board that would normally hold the TMS370 device. This allows direct,
in-circuit emulation. Each target cable also has an easy-extract socket that
allows you to program the devices.
In the supported TMS370 family, there are five different packages:
-
28DIL
-
28LCC
-
40DIL
-
44LCC
-
68LCC
There are seven different target cables to support these packages because
the 40-pin DIL and the 44-pin LCC TMS370Cx2x devices have different pinouts than the 40-pin DIL and 44-pin LCC TMS370Cx4x devices. As a result,
the emulator target cables for the devices are different and not interchangeable. The seven target cable sets are listed below along with the devices they
support:
About the Target Cable Set
target system
)
-
x1x devices in 28-pin DIL socket28-pin DIL target cable. . . . . . . . . . . . .
This chapter includes the proper procedures to set up the CDT370.
The following topics are covered:
TopicPage
2.1System Hardware Requirements 2-2
2.2System Software Requirements2-3
2.3Unpacking the CDT370 Board 2-4
2.4Add-On PC Connection 2-5
2.5Serial RS-232 Connection 2-7
2.6Software Installation 2-9
2.7Using the Debugger With Microsoft Windows2-15
2.8Power-Up Procedure 2-17
2.9Invoking the Debugger 2-18
2.10 Exiting the Debugger2-21
Chapter Title—Attribute Reference
2-1
System Hardware Requirements
2.1System Hardware Requirements
HostAn IBM PC XT/A T or 100% compatible PC with a hard-disk system,
a serial port or a free full-length internal slot, and a 1.2-Mbyte 5-1/4”
floppy-disk drive.
MemoryA minimum of 640K bytes of main memory is needed, but extended
(minimum 256K bytes) memory is also needed when you run the debugger under Windows.
DisplayA monochrome screen can be used, but a color screen (EGA or
VGA) is recommended.
CableA target cable is required to connect the CDT370 board to the target,
but it is not needed when the emulator runs in stand-alone mode.
OptionsA Microsoft-compatible mouse.
An EGA- or VGA-compatible graphics display card and a large
monitor.
The debugger has two options that allow you to change the overall
size of the debugger display.
To use a larger screen size, you must invoke the debugger with the
appropriate option. For more information about options, refer to
Section 2.9,
MiscellaneousBlank, formatted disks.
Invoking the Debugger
.
2-2
Note:Firmware Version
Make sure you are using a CDT370 board with firmware version 3.0 or later.
2.2System Software Requirements
Operating SystemMS-DOS or PC-DOS (version 3.0 or later)
Optional: Microsoft Windows (version 3.0 or later)
Software ToolsTMS370 C compiler, assembler (version 5.06 or later), and linker.
If you have a program that you assembled with an earlier version of
the assembler, be sure to update it.
Optional Files
†
init.cmd is a file that contains debugger commands. The version of
this file that’s shipped with the debugger defines a ’370 memory
map. If this file isn’t present when you first invoke the debugger, then
all memory is invalid at first. When you first start using the debugger,
this memory map should be sufficient for your needs.
Later, you may want to define your own memory map. For information about setting up your own memory map, refer to Section 7.2,
Memory Mapping
ily C Source Debugger User’s Guide
In addition to init.cmd, there are several other .cmd files in the maps
directory. These .cmd files define memory maps for standard ’370
devices. If you want to emulate a specific device, copy the appropriate .cmd file into your init.cmd file.
init.clr is a general-purpose screen configuration file. If this file isn’t
present when you invoke the debugger, the debugger uses the default screen configuration.
The default configuration file (.clr extension) is for color monitors;
another file (.mon extension) can be used with monochrome monitors. Several of each type of screen configuration file are included
in your screens directory. When you first invoke the debugger, the
default screen configuration should be sufficient for your needs. Later, you may want to define your own custom configuration.
and
Defining a Memory Map
System Software Requirements
, in the
TMS370 Fam-
.
†
For information about these files and about setting up your own
screen configuration, refer to
TMS370 Family C Source Debugger User’s Guide
the
Customizing the Debugger Display
.
, in
Due to the 640K-byte memory limitation under DOS, it may not be
possible to load and/or debug large applications with the DOS version of the debugger. The Windows version of the debugger will
make use of any extended memory available on the PC.
Included as part of the debugger package, these files are available on the C-source debugger
product disk but have not been copied by the installation process.
Getting Started
2-3
Unpacking the CDT370 Board
2.3Unpacking the CDT370 Board
Before you unpack the CDT370 board, decide if you want to plug the board into
an expansion slot inside your PC or connect it to an RS-232 cable outside your
PC. Placing the board inside your computer’s case is preferable, but if you
have no empty slots or if the internal mount makes it awkward to access the
target system, the RS-232 link can be used.
Remove the CDT370 board from its antistatic protection sheath.
To avoid damage to the board, do not touch the board directly,
except at a static-free workstation.
Do not connect any electric motors or fluorescent lights to the
CDT370 power circuit. Noise and/or voltage spikes from these
devices could affect operation.
Do not plug the CDT board into a slot next to an Ethernet card. The
target cables are not shielded.
2-4
2.4Add-On PC Connection
The CDT370 board can be plugged into any IBM PC XT/AT or compatible.
There are two different areas of jumpers on the board:
-
CONF with two possible positions
-
COM PORT with 4 possible positions
The shipping position is: Add-on PC link / Address 318h, IRQ4.
Figure 2–1.Configuration Switches
Add-On PC Connection
COM2COM4
Add-On
Table 2–1.On-Board Switches
CONFCOM PortComments
ADD-ON
ADD-ON
ADD-ON
ADD-ON
RS-232
RS-232
Step 1: The CONF jumper must be set to the ADD-ON position, and the com
Step 2: Switch off your IBM PC XT/A T or compatible and remove the cover.
RS232
COM1COM3
COM1
COM2
COM3
COM4
X
X
Add-on PC link / 318h, IRQ4
Add-on PC link / 358h, IRQ2
Add-on PC link / 338h, IRQ3
Add-on PC link / 398h, IRQ7
RS-232 link / serial com port 1
RS-232 link / serial com port 2
PORT jumper must be set to one of the four positions that are
referred to as COM1 through com 4.
Then, carefully plug the properly configured CDT370 board into an
empty slot.
Getting Started
2-5
Add-On PC Connection
Step 3: To use the CDT370 to perform in-circuit emulation on your target
device or device programming, plug the target cable dedicated to the
TMS370 family member you are working with into the CDT370 board
before closing the cover.
For target cable connection, refer to Chapter 8,
T arget Connectors
Step 4: Close the cover of your PC and turn the power on.
.
2-6
2.5Serial RS-232 Connection
This section discusses connecting the debugger’s host machine to the
CDT370 board with a serial RS-232 communication link.
In addition to what is supplied with the CDT370 board, you must supply a 5-volt
regulated power supply (Icdt max = 1.8 A. Standard 5-V , 3-A power supply recommended) and an RS-232 serial cable type DB-9.
Do not connect the system to a power source at this time. Wait until
all installation checks are complete.
Check to make sure that there are no metal objects beneath the
CDT370 board that might short the V
Step 1: The CONF jumper must be set to the position RS232.
When the CONF jumper is set to RS232, the com PORT area’s jumper is not relevant, and any position is allowed.
Serial RS-232 Connection
, ground, or other signals.
cc
Step 2: Connect the external regulated power supply to the CDT370 board
through the dedicated connector. Make sure that the polarity is set
correctly.
Step 3: Connect the RS-232 cable of the host to the DB-9 pin connector of
the CDT370 according to the cable description (Table 2–2).
Step 4: If you want to perform in-circuit emulation or device programming
with the CDT370, install the target cable dedicated to the TMS370
family member you are working with.
For target cable connections, refer to Chapter 8,
T arget Connectors
Step 5: Turn the CDT370 board on before you turn on the application hard-
ware.
.
Getting Started
2-7
Serial RS-232 Connection
The CDT370 uses 8 of the 9 signals on a DB9 connector to communicate with
the host. The pin and signal assignments for the emulator and host computer
are listed in Table 2–2.
Table 2–2.RS-232
Pin and Signal Assignments
CDT370HOST
Function
Female DB-9DB-25DB-9
Pin
SignalSignalPin/XTPin/AT
Connect Established1DCDDCD81
Data to Host2TXRX32
Data to Emulator3RXTX23
Terminal Ready4DTRDTR204
Signal Ground5GNDGND75
Emulator Ready6DSRDSR66
Attention to Emulator7CTSRTS47
Attention to Host8RTSCTS58
Not used9RIRI229
2-8
2.6Software Installation
This section explains the process of installing the debugger software on a
hard-disk system:
1) Make a backup copy of each product disk. Refer to a DOS manual, if necessary, to complete this step.
2) On your hard disk or system disk, create a directory named 370TOOLS.
This directory will contain the debugger software.
md c:\370TOOLS
3) Insert a product disk into drive A. Copy the debugger software onto the
hard disk or system disk.
copy a:\*.* c:\370TOOLS\*.* /v
Repeat this step for each product diskette.
4) If you don’t plan to use both the DOS and the Windows versions of the
debugger, you may want to delete the one you’re not using.
To delete the DOS executable file, enter:
del cdt370.exe
To delete the Windows executable file, enter:
del cdt370w.exe
Software Installation
Modifying your config.sys file
When using the debugger, you can have only twenty files open or active at the
same time. To tell the system not to allow more than twenty active files, you
must add the following line to your config.sys file:
FILES = 20
Once you have edited your config.sys file and added the line, invoke the file
by turning off the PC’s power and turning it on again.
Setting up the debugger environment
To ensure that your debugger works correctly, you must:
-
Modify the PATH statement to identify the 370TOOLS directory.
-
Define environment variables so that the debugger can find the files it
needs.
Not only must you do these things before you invoke the debugger for the first
you must do them any time you power up or reboot the system
time,
Getting Started
.
2-9
Software Installation
You can accomplish these tasks by entering individual DOS commands, but
it’s simpler to put the commands in a batch file.
Y ou can edit your system’s autoexec.bat file; however , in some cases, modifying the autoexec.bat file may interfere with other applications running on your
PC. So, if you prefer, you can create a separate batch file that performs these
tasks.
Figure 2–2 (a) shows an example of an autoexec.bat file that contains the suggested modifications (highlighted in bold type).
Figure 2–2 (b) shows a sample batch file that you could create instead of editing the autoexec.bat file. (For the purpose of discussion, assume that this sample file is named initdb.bat). The subsections following the figure explain these
modifications.
Figure 2–2.DOS Command Setup for the Debugger
(a) Sample autoexec.bat file
P ATH statement
Environment
variables and
I/O space
(b) Sample initdb.bat file
P ATH statement
Environment
variables and
I/O space
Invoking the new or modified batch file
-
If you modify the autoexec.bat file, be sure to invoke it before invoking the
debugger for the first time. To invoke this file, enter:
autoexec
DATE
TIME
ECHO OFF
PATH=c:\dos;c:\370tools
SET D_DIR=c:\370tools
SET D_SRC=;c:\csource
SET D_OPTIONS=–p2 –b
SET C_DIR=c:\370tools
CLS
PATH=C:\370tools;%path%
SET D_DIR=c:\370tools
SET D_SRC=c:\csource
SET D_OPTIONS=–p2 –b
2-10
-
If you create an initdb.bat file, you must invoke it before invoking the debugger for the first time. If you are using Microsoft Windows, invoke
initdb.bat
to invoke initdb.bat any time that you power up or reboot your PC. To do
so, enter:
initdb
Modifying the path statement
Define a path to the debugger directory. The general format for doing this is:
Software Installation
before
entering the Windows environment. After that, you’ll need
PATH = C:\370TOOLS;
This allows you to invoke the debugger without specifying the name of the directory that contains the debugger executable file.
-
If you are modifying your autoexec.bat file and it already contains a P A TH
statement, simply include ;C:\370TOOLS at the end of the statement, as
shown in Figure 2–2 (a).
-
If you are creating an initdb.bat file, use a different format for the PATH
statement:
PATH=C:\370TOOLS;%path%
The addition of ;%path% ensures that this P ATH statement won’t undo the
PATH statements in other batch files (including the autoexec.bat file).
Setting up the environment variables
An environment variable is a special system symbol that the debugger uses
for finding or obtaining certain types of information. The debugger uses three
environment variables named D_DIR, D_SRC, and D_OPTIONS. The next
three steps tell you how to set up these environment variables. The format for
doing this is the same for both the autoexec.bat and initdb.bat files.
pathname2;pathname3
;...
-
Set up the D_DIR environment variable to identify the 370TOOLS directory:
SET D_DIR=C:\370TOOLS;
pathname2
;....
(Be careful not to precede the equal sign with a space).
This directory contains auxiliary files (init.cmd) that the debugger needs.
Getting Started
2-1 1
Loading...
+ 58 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.