Page 1
CDT370 Addendum to the TMS370 Family C Source Debugger User's Guide Addendum 1993 Microprocessor Development Systems...
Page 2
Printed in U.S.A., October 1993; reprinted July 1995 SPNU133 2656911–9761 revision B...
Page 3
CDT370 Addendum to the TMS370 Family C Source Debugger User's Guide SPRU133 July 1995 Printed on Recycled Paper...
Page 4
IMPORTANT NOTICE Texas 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.
Page 5
This book tells you how to install and use the CDT370 (Compact Development Tool) and explains the similarities and differences between the debugger used with the CDT370 and the debugger that is described in the TMS370 Family C Source Debugger User’s Guide .
Page 6
Trademarks Trademarks PC-DOS is a trademark of International Business Machines. MS-DOS and Windows are trademarks of Microsoft Corporation.
Page 7
............Differences Between XDS/22 BTT and CDT370 Trace .
Introduction Chapter 1 Introduction The CDT370 (Compact Development Tool) offers a low-cost but highly effi- cient 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,...
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...
About the Target Cable Set 1.2 About 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 target system ) circuit board that would normally hold the TMS370 device.
Running Title—Attribute Reference Chapter 2 Getting Started This chapter includes the proper procedures to set up the CDT370. The following topics are covered: Topic Page System Hardware Requirements System Software Requirements Unpacking the CDT370 Board Add-On PC Connection Serial RS-232 Connection...
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, Invoking the Debugger . Miscellaneous Blank, formatted disks. Note: Firmware Version Make sure you are using a CDT370 board with firmware version 3.0 or later.
System Software Requirements 2.2 System Software Requirements Operating System MS-DOS or PC-DOS (version 3.0 or later) Optional: Microsoft Windows (version 3.0 or later) Software Tools TMS370 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.
Unpacking the CDT370 Board 2.3 Unpacking 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.
Add-On PC Connection 2.4 Add-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.
Page 20
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.
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 rec- ommended) and an RS-232 serial cable type DB-9.
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...
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 Modifying your config.sys file...
Software Installation You can accomplish these tasks by entering individual DOS commands, but it’s simpler to put the commands in a batch file. You can edit your system’s autoexec.bat file; however, in some cases, modify- ing the autoexec.bat file may interfere with other applications running on your PC.
Page 25
Software Installation If you create an initdb.bat file, you must invoke it before invoking the de- bugger for the first time. If you are using Microsoft Windows, invoke initdb.bat before entering the Windows environment. After that, you’ll need to invoke initdb.bat any time that you power up or reboot your PC. To do so, enter: initdb Modifying the path statement...
Page 26
For more information about options, refer to Section 2.9, Invoking the Debugger . Verifying the installation To ensure that you have correctly installed the emulator and debugger soft- ware, enter this command at the system prompt: CDT370 C:\370TOOLS\sample –p serial port CDT370 C:\370TOOLS\sample –a add_on address 2-12...
Page 28
Software Installation If the target cable is not installed on the target, is it isolated from any con- ductive surfaces, including conductive foam or bags? Is the emulator board installed properly and powered? Are you using the correct host communication port? If an RS-232 link is used, is the cable properly connected and wired? Is your serial port or add-on address set correctly? 2-14...
Serial Connection: The debugger will communicate with Windows through Windows com port 1 if you have connected the CDT370 to com port 1, and Windows com port 2 if you have connected the CDT370 to com port 2. The standard communication settings (baud rate, data bits, parity, stop bits, and flow control) are configured directly by the debugger soft- ware without your intervention and can therefore be ignored.
Page 30
If you prefer, you can also execute the DOS version from Windows by entering cdt370.exe at the command line. If you are going to be switching frequently between the basic debugger and the profiler, it might be more convenient for you to create separate program items for each.
If a target system is used, replace the TMS370 microprocessor in the target system with the target connector of the CDT370. See Section 8.4, Connecting the Target Cable to the Target System . Make sure that the pin orientation is correct.
The debugger will not operate unless the emulator is correctly con- nected and turned on. Here’s the basic format for the commands that invoke the debugger: cdt370 [ filename ] [ –options ] cdt370 is the command that invokes the debugger. If you are using Microsoft Windows, use cdt370w to invoke the debugger.
The –p or –a option identifies the serial port or the add-on address that the debugger uses for communicating with the emulator. The default value, –a1, corresponds to the CDT370 board shipping position (Add-on PC link, Address 318h, IRQ4). Depending on your configuration, use one of these values: Table 2–5.
Page 34
Invoking the Debugger Note: You Cannot Use the –a and –p Options at the Same Time the –a and –p options are mutually exclusive; only one can be used (accord- ing to your hardware configuration) . If you used a wrong setting, you’ll see this error message when you try to in- voke the debugger: CANNOT INITIALIZE TARGET SYSTEM ! ! –...
Exiting the Debugger 2.10 Exiting the Debugger To exit any version of the debugger and return to the operating system, enter this command: quit You don’t need to worry about where the cursor is or which window is active—just type. If a program is running, press to halt program execution before you quit the debugger.
This chapter explains how to use the circular trace buffer that exists on the CDT370 board. With the trace buffer and the trace and timing commands, you can monitor and collect statistics on the CPU as it runs. This chapter also cov-...
Trace and Timing 3.1 Trace and Timing There is a 2K x 16-bit trace circular buffer on the CDT370 board. The TMS370 internal address bus is stored each time an opcode fetch is detected. When you want to display the contents of this buffer, the debugger reconstitutes all the opcodes executed by the TMS370.
Trace and Timing When trace samples are displayed on the screen, they include the information shown in Table 3.1 identified by a heading displayed on top of the screen. Table 3–1. Displayed Trace Samples Field Description SAMPLE Index in trace buffer ADDRESS 16-bit value of address bus REVERSE ASM...
Page 40
Code benchmarking, as explained in the TMS370 Family C Source Debugger User’s Guide , is also available in the CDT370. The value of the pseudoregister CLK is valid after a RUN or a RUNB command that is terminated by a software...
Trace Commands 3.2 Trace Commands To access the Trace , simply hit , or click Trace from the menu bar. This opens a trace pull-down menu in which you can select or click the following commands: Inspect Position Save Inspect frames (the I command) When Inspect is selected, the debugger checks the emulator to determine how many trace samples have been collected.
Page 42
Trace Commands To select the frame to display within the Inspect window, enter an adequate frame number, select the Bottom frame (with the keys or by clicking it with the mouse), or select the Top frame (with the keys or by clicking it with the mouse).
Please refer to the Summary of Commands and Special Keys in the TMS370 Family C Source Debugger User’s Guide for a description of these commands. Since the CDT370 does not have a BTT, you remain in control of the command line; that is, you do not have to press to regain control after entering a RUNF, RRUNF, or WRUNF command.
Running Title—Attribute Reference Chapter 4 Programming With the debugger, it is possible to: Program an EPROM device (FPM) Program data EEPROM Blank Check a device Verify a device Upload the contents of a device to RAM These features use the emulator’s memory. First, you must configure the emu- lator memory map to match the device you are emulating.
Programming a Device (the P Command) 4.1 Programming a Device (the P Command) The P (programming) command is used to program the device that you will plug into the target connector’s easy-extract socket. When you type or click the P on the menu bar with the mouse, the Device Programming win- dow is displayed and a dialog box is opened as shown in Figure 4–1.
Program is the default selection. The action selected will be applied to the memory address ranges selected previously. Program This action programs the contents of the CDT370 RAM into the device (byte per byte copy, at the same addresses). The program is automatically verified. Blank Check This action checks whether a device has already been programmed or not.
Memory Type Selection 4.3 Memory Type Selection Once you have selected an action, select the type of memory you want to ac- cess. The dialog box looks like: Figure 4–3. Select Memory Type Dialog Box DEVICE PROGRAMMING Selected Action Data EEPROM start address 1F00 <<Program Eprom>>...
Validation Dialog Box 4.4 Validation Dialog Box After selecting the memory type, the Validation dialog box allows you to start or cancel the operation. Figure 4–4. Validation Dialog Box DEVICE PROGRAMMING Selected Action Selected Memory Type Data EEPROM start address 1F00 Data EEPROM end address...
Messages 4.5 Messages Depending on the action selected, the following messages can be displayed: Action Message Program Device programmed and checked Programmation failed Verification failed Blank Check Device is blank Device is not blank Verify Device programmed and checked Verification failed Upload Device upload completed Fault condition ...
Autotest The Autotest command, from the Load pull-down menu, provides a quick tech- nical check of the CDT370 board functionality. When you select this function, the debugger loads the Autotest and a TMS370C756 memory map required to perform the test. When started, the Autotest software displays the message: AUTOTEST IN PROGRESS.
TMS370 device with Osc 2 as the clock. If there is not a usable clock signal at Osc 2, the device will use Osc 1. The CDT370 20 MHz oscillator (location Osc 1) is used to generate the default clock. You can also plug in another oscillator at Osc 2, to work at any allowed fre- quency.
Running Title—Attribute Reference Chapter 7 Defining a Memory Map Before you begin using the debugger, you must supply the debugger with a memory map. The memory map tells the debugger which areas of memory it can access and how those areas are accessed. Topic Page Memory Mapping Introduction...
Memory Mapping Introduction 7.1 Memory Mapping Introduction The memory mapping capability of the TMS370 debugger allows you to spec- ify exactly how the CPU is allowed to access various memory ranges. The TMS370 device provides significant flexibility in the memory map, with its vari- ous configurations of internal memory and external addressing capability.
Array programming Programming time of 10 ms (20 ms for array programming) You access emulated data EEPROM on the CDT370 in the same way as you would access EEPROM on a TMS370 chip. For more information, refer to Data EEPROM Modules in the TMS370 Family Data Manual .
Page 58
Memory Mapping Register File Memory Description Locations are part of the TMS370 on-chip register file. Mapping Attributes It should be mapped as IRAM for location 0x00 to 0x7F or 0xFF, depending on the device to emulate. Peripheral Frame Memory Description This type is used for 16-byte ranges in the peripheral register file. Program ROM/EPROM Memory Description This memory type is used for addresses that fall in the range of the on-chip mask ROM.
Page 59
EEPROM VIOL Since the data EEPROM memory is emulated through a simple RAM, all writ- ten data are retained as long as the CDT370 is powered; they are lost when it is switched-off. In all other respects, the CDT370 behaves exactly as if you were programming actual data EEPROM with a TMS370 device.
Copying Data Within the On-Board RAM 7.3 Copying Data Within the On-Board RAM You can use the MEMCOPY command to copy data from one location in the on-board RAM to another. The syntax for the command is: memcopy source, destination, length The source parameter identifies the starting address of the range that you want to copy.
Running Title—Attribute Reference Chapter 8 Target Cables Target cables allow you to emulate and program TMS370 devices. This chap- ter describes the target cables and their installation. The following sections are included: Topic Page Target Cables Description Switches Description Installing the Target Cable in the Emulator Connecting the Target Cable to the Target System How to Use the Target Cable Chapter Title—Attribute Reference...
Target Cables Description 8.1 Target Cables Description All the CDT370 target cables are built in the same way and allow you to emu- late any of the TMS370 devices or program any TMS370 Field Programmable Device. Figure 8–1. PLCC Target Cable Termination...
Switches Description 8.2 Switches Description Figure 8–2 shows the position of the target cable switches for both the emula- tion and the programming configuration. Figure 8–2. Switch Positions In-Circuit Emulation Device Programming Table 8–2 shows the signals that are controlled by these three switches. Table 8–2.
8.3 Installing the Target Cable in the Emulator To install a target cable in the emulator or change from one cable to another one, you must remove the CDT370 board from the PC when it is connected in add-on PC mode.
Make sure that no device is plugged into the easy extract socket A ground connection is made between the CDT370 and the target system through the V pin of the emulation pod. For normal applications, plug the tar- get connector into the target system in place of the microprocessor.
How to Use the Target Cable 8.5 How to Use the Target Cable Emulation mode When you use the CDT370 as a real time in-circuit emulator, all three switches (S1,S2,S3) must be in the EMUL position. Programming mode In this mode, the CDT power must be on and the board must be under the control of the debugger software.
Page 69
How to Use the Target Cable If you need to program many devices: 1) Configure all switches in the EMUL position. 2) Extract the programmed device from the easy extract socket and insert a new device. 3) Set all the switches to the PROG position. 4) Run the programming command.
This chapter contains a brief system repair guide for both the add-on PC con- nection and the serial link. The following topics are included in this chapter. Topic Page The Debugger Menu Doesn’t Display The CDT370 Does Not Function The Target System Doesn’t Respond Chapter Title—Attribute Reference...
7) If the CDT370 board seems to be well configured and you are using a tar- get system, disconnect the target connector from the CDT 370 board and try again.
Page 73
If it works with the target connector discon- nected, see Section 9.3, Target System Doesn’t Respond . 10) If the CDT370 board seems to be well configured and you are using a tar- get system, disconnect the target connector from the CDT 370 board and try again.
The CDT370 Does Not Function 9.2 The CDT370 Does Not Function If the debugger screen displays but the CDT370 does not function, you can run the Autotest Software by typing the A (Autotest) Command in the Load menu. This Autotest Software must be run with no link to a target system (Target Connectors must be disconnected from the target system) and no chip resident in the easy extract socket.
2) If OK, power off the target system, remove the target connector from target system, and check for broken or bent pins. 3) If the problem remains, power off the target system and the CDT370. If an add-on PC connection is used, power off the PC and remove the cover.
Chapter 10 Additional Notes Like the other debugging tools available to the 370 family, the CDT370 debug- ger defines a symbol that you can use in batch files (See Entering Commands From a Batch File in the TMS370 Family Debugger User’s Guide ).
Page 83
IMPORTANT NOTICE Texas 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.
Need help?
Do you have a question about the CDT370 and is the answer not in the manual?
Questions and answers