![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
TMS470R1x Emulator Software Getting Started Guide 1996 Microcontroller Products Printed in U.S.A., October 1996 M414009-9741A SPNU123B Book Type Two Lines Volume # Title Two Lines Subtitle Line Two year Book Type Volume # Book Type Two Lines Title Two Lines Title Subtitle Line Two Title Two Lines Subtitle Title Subtitle Book Type Title year TMS470R1x Emulator Software Getting Started Guide Literature Number: SPNU123B Manufacturing Part Number: M414009-9741 revision A October 1996 Printed on Recycled Paper 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. 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. Testing 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 (c) 1996, Texas Instruments Incorporated ii Preface Read This First About This Manual The book tells you how to install release 1.xx of the TMS470R1x emulator debugging tools on your system. It also does the following: - Tells you how to set environment variables for parameters that you use often Gives helpful information for troubleshooting Gives information on new or changed features for this release of the emulator How to Use This Manual The goal of this book is to get you started using the emulator specifically designed for the TMS470R1x. Following are the topics covered in this getting started guide: For information about ... Installing the emulator, setting environment variables, and verifying the installation on WindowsTM 3.1 systems Installing the emulator, setting environment variables, and verifying the installation on Windows NTTM systems Installing the emulator, setting environment variables, and verifying the installation on WindowsTM 95 systems Installing the emulator, setting environment variables, and verifying the installation on a SPARCstationTM Installing the emulator, setting environment variables, and verifying the installation on HP systems Workstation Troubleshooting Installing the Emulator Device Driver Manually See ... Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Appendix A Appendix B iii Notational Conventions Notational Conventions This document uses the following conventions. - The TMS470R1x family of processors is referred to as '470. Program listings, program examples, and interactive displays are shown in a special typeface similar to a typewriter's. Examples use a bold version of the special typeface for emphasis; interactive displays use a bold version of the special typeface to distinguish commands that you enter from items that the system displays (such as prompts, command output, error messages, etc.). Here is an example of a command that you might enter: cd /cdrom/hp - In syntax descriptions, the instruction, command, or directive is in a bold typeface font and parameters are in an italic typeface. Portions of a syntax that are in bold should be entered as shown; portions of a syntax that are in italics describe the type of information that should be entered. Here is an example of a command syntax: PATH=C:\pathname1 ;pathname2 PATH is the command. This command has one parameter, indicated by pathname. - Square brackets ( [ and ] ) identify an optional parameter. If you use an optional parameter, you specify the information within the brackets; you don't enter the brackets themselves. Here's an example of a command that has an optional parameter: emurst [options] This command allows you to specify one or more options. iv Related Documentation From Texas Instruments / FCC Warning Related Documentation From Texas Instruments The following books describe the TMS470R1x and related support tools. To obtain a copy of any of these TI documents, call the Texas Instruments Literature Response Center at (800) 477-8924. When ordering, please identify the book by its title and literature number. TMS470R1x Assembly Language Tools User's Guide (literature number SPNU118) describes the assembly language tools (assembler, linker, and other tools used to develop assembly language code), assembler directives, macros, common object file format, and symbolic debugging directives for the TMS470R1x devices. TMS470R1x C Source Debugger User's Guide (literature number SPNU124) describes the TMS470R1x emulator and simulator versions of the C source debugger interface. This book discusses various aspects of the debugger interface, including window management, command entry, code execution, data management, and breakpoints. It also includes a tutorial that introduces basic debugger functionality. TMS470R1x Optimizing C Compiler User's Guide (literature number SPNU119) describes the TMS470R1x C compiler. This C compiler accepts ANSI standard C source code and produces assembly language source code for the TMS470R1x devices. TMS470R1x User's Guide (literature number SPNU134) gives a detailed description of the TMS470R1x RISC microcontroller: its architecture including registers, ICEBreaker module, and interfaces (memory, coprocessor, and debug), its instruction sets (both 16- and 32-bit), and electrical specifications. XDS51x Emulator Installation Guide (literature number SPNU070) describes the installation of the XDS510TM, XDS510PPTM, and XDS510WSTM emulator controllers. The installation of the XDS511TM emulator is also described. 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 v Trademarks Trademarks HP-UX, HP 9000 Series 700, and PA-RISC are trademarks of Hewlett-Packard Company. Microsoft, MS-DOS, Windows, and Windows NT are registered trademarks of Microsoft Corporation. OpenWindows, Solaris, and SunOS are trademarks of Sun Microsystems, Inc. PC and PC-DOS are trademarks of International Business Machines Corporation. Pentium is a trademark of Intel Corporation. SPARCstation is trademark of SPARC International, Inc., but licensed exclusively to Sun Microsystems, Inc. UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Limited. X Window System is a trademark of the Massachusetts Institute of Technology. XDS510, XDS510PP, and XDS510WS are trademarks of Texas Instruments Incorporated. vi If You Need Assistance If You Need Assistance. . . - World-Wide Web Sites TI Online http://www.ti.com Semiconductor Product Information Center (PIC)http://www.ti.com/sc/docs/pic/home.htm Microcontroller Home Page http://www.ti.com/sc/micro North America, South America, Central America Product Information Center (PIC) (972) 644-5580 TI Literature Response Center U.S.A. (800) 477-8924 Software Registration/Upgrades (214) 638-0333 U.S.A. Factory Repair/Hardware Upgrades (713) 274-2285 U.S. Technical Training Organization (972) 644-5580 Microcontroller Hotline (713) 274-2370 Microcontroller Modem BBS (713) 274-3700 8-N-1 Fax: (214) 638-7742 Fax: (713) 274-4203 Email:*H370@msg.ti.com - Europe, Middle East, Africa European Product Information Center (EPIC) Hotlines: Multi-Language Support +33 1 30 70 11 69 Deutsch +49 8161 80 33 11 or +33 1 30 70 11 68 English +33 1 30 70 11 65 Francais +33 1 30 70 11 64 Italiano +33 1 30 70 11 67 EPIC Modem BBS +33 1 30 70 11 99 European Factory Repair +33 1 93 22 25 40 Europe Customer Training Helpline Fax: +33 1 30 70 10 32 Email: epic@ti.com - Fax: +49 81 61 80 40 10 Asia-Pacific Literature Response Center +852 2 956 7288 Fax: +852 2 956 2200 Japan Product Information Center +0120-81-0026 (in Japan) +03-3457-0972 or (INTL) 813-3457-0972 Fax: +0120-81-0036 (in Japan) Fax: +03-3457-1259 or (INTL) 813-3457-1259 Documentation When making suggestions or reporting errors in documentation, please include the following information that is on the title page: the full title of the book, the publication date, and the literature number. Mail: Texas Instruments Incorporated Email: comments@books.sc.ti.com Technical Documentation Services, MS 702 P.O. Box 1443 Houston, Texas 77251-1443 Note: When calling a Literature Response Center to order documentation, please specify the literature number of the book. Read This First vii viii Contents Contents 1 Installing the Debugger With Windows 3.1x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Lists the hardware and software you need to install the emulator board and C source debugger; provides installation instructions for PC systems running Windows 3.1x. 1.1 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Hardware checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Software checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Step 1: Installing the XDS510 or XDS510PP Emulator Controller . . . . . . . . . . . . . . . . . 1-4 Step 2: Installing the Debugger Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 Step 3: Setting Up a DLL File for Your XDS510 or XDS510PP . . . . . . . . . . . . . . . . . . . . 1-5 Additional XDS510PP Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6 Diagnostic files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7 Step 4: Setting Up the Debugger Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8 Identifying the directory that contains the executable files (PATH statement) . . . . . . . . 1-8 Identifying alternate directories for the debugger (D_DIR) . . . . . . . . . . . . . . . . . . . . . . . . 1-8 Identifying directories that contain source files (D_SRC) . . . . . . . . . . . . . . . . . . . . . . . . . 1-9 Setting default debugger options (D_OPTIONS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9 Step 5: Resetting the Emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11 Special Considerations When Resetting the XDS510PP . . . . . . . . . . . . . . . . . . . . . . . . 1-12 The smcmode command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12 Step 6: Describing Your Target System to the Debugger . . . . . . . . . . . . . . . . . . . . . . . . 1-13 Step 7: Verifying the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14 Installation Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 2 Installing the Debugger With Windows NT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 Lists the hardware and software you need to install the emulator version of the C source debugger; provides installation instructions for PC systems running Windows NT. 2.1 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hardware checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Software checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 1: Installing the XDS510 Emulator Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 2: Installing the Debugger Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 3: Installing the Emulator Device Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 4: Verifying the Emulator Device Driver Installation . . . . . . . . . . . . . . . . . . . . . . . . . Driver installation error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 2-2 2-3 2-4 2-4 2-5 2-7 2-7 ix 2.2 2.3 2.4 2.5 Contents 2.6 2.7 2.8 2.9 2.10 3 Step 5: Setting Up the Debugger Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 Identifying the directory that contains the executable files (PATH statement) . . . . . . . . 2-9 Identifying alternate directories for the debugger (D_DIR) . . . . . . . . . . . . . . . . . . . . . . . 2-10 Identifying directories that contain source files (D_SRC) . . . . . . . . . . . . . . . . . . . . . . . . 2-10 Setting default debugger options (D_OPTIONS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 Step 6: Resetting the Emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12 Step 7: Describing Your Target System to the Debugger . . . . . . . . . . . . . . . . . . . . . . . . 2-13 Step 8: Verifying the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14 Installation Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15 Installing the Debugger With Windows 95 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 Lists the hardware and software you need to install the emulator version of the C source debugger; provides installation instructions for PC systems running Windows 95. 3.1 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Hardware checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Software checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 Step 1: Installing the XDS510 or XDS510PP Emulator Controller . . . . . . . . . . . . . . . . . 3-4 Step 2: Installing the Debugger Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 Step 3: Setting Up a DLL File for Your XDS510 or XDS510PP . . . . . . . . . . . . . . . . . . . . 3-5 Additional XDS510PP Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6 Diagnostic files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7 Step 4: Setting Up the Debugger Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 Identifying the directory that contains the executable files (PATH statement) . . . . . . . . 3-8 Identifying alternate directories for the debugger (D_DIR) . . . . . . . . . . . . . . . . . . . . . . . . 3-8 Identifying directories that contain source files (D_SRC) . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 Setting default debugger options (D_OPTIONS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 Step 5: Resetting the Emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11 Special Considerations When Resetting the XDS510PP . . . . . . . . . . . . . . . . . . . . . . . . 3-12 The smcmode command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 Step 6: Describing Your Target System to the Debugger . . . . . . . . . . . . . . . . . . . . . . . . 3-13 Step 7: Verifying the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14 Installation Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 x Contents 4 Installing the Debugger on a SPARCstation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 Lists the hardware and software you need to install the workstation emulator and C source debugger; provides installation instructions for SPARCstations running SunOS. 4.1 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Hardware checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Software checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Step 1: Installing the XDS510WS Emulator Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Step 2: Installing the Debugger Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Mounting the CD-ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Copying the files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5 Unmounting the CD-ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5 Step 3: Ensuring That the Emulator Supports the Debugger . . . . . . . . . . . . . . . . . . . . . . 4-6 Step 4: Describing Your Target System to the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . 4-7 Step 5: Setting Up the Debugger Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Modifying the path shell variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Setting up the environment variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Invoking the new or modified .cshrc file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10 Step 6: Verifying the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11 Using the Debugger With the X Window System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Using the keyboard's special keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Changing the debugger font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Color mappings on monochrome screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 4.2 4.3 4.4 4.5 4.6 4.7 4.8 5 Installing the Debugger on an HP Workstation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 Lists the hardware and software you need to install the workstation emulator and C source debugger; provides installation instructions for HP workstations running HP-UX. 5.1 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hardware checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Software checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 1: Installing the XDS510WS Emulator Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 2: Installing the Debugger Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mounting the CD-ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying the files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unmounting the CD-ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 3: Ensuring That the Emulator Supports the Debugger . . . . . . . . . . . . . . . . . . . . . . Step 4: Describing Your Target System to the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . Step 5: Setting Up the Debugger Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modifying the path shell variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting up the environment variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Invoking the new or modified .cshrc file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 5-2 5-3 5-4 5-4 5-4 5-5 5-5 5-5 5-6 5-7 5-7 5-7 5-9 5.2 5.3 5.4 5.5 5.6 Contents xi Contents 5.7 5.8 Step 6: Verifying the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the Debugger With the X Window System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the keyboard's special keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing the debugger font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Color mappings on monochrome screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 5-11 5-11 5-12 5-12 A Workstation Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1 Describes problems that you may encounter while installing and using the emulator on your SPARCstation or HP Workstation and gives suggestions for resolving those problems. A.1 A.2 A.3 A.4 A.5 Problems When Booting Your Workstation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Problems With Multiple Emulators on SunOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Problems When Resetting the Emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Problems When Invoking the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Emulator and Debugger Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2 A-2 A-3 A-5 A-7 B Installing the Emulator Device Driver Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1 Provides instructions for installing the emulator device driver manually. B.1 B.2 B.3 B.4 Copying the Device Driver File and Invoking the Registry Editor . . . . . . . . . . . . . . . . . . Setting Up the Genport Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Up the Values for the Genport Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Up the Parameters Directory and Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2 B-3 B-4 B-6 xii Chapter 1 Installing the Debugger With Windows 3.1x This chapter provides instructions for installing the C source debugger on a PCTM running Windows 3.1x. When you complete the installation, turn to the TMS470R1x C Source Debugger User's Guide. To install the emulator controller, see the XDS51x Emulator Installation Guide, which is included in your kit. Topic 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 Page System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Step 1: Installing the XDS510 or XDS510PP Emulator Controller . . 1-4 Step 2: Installing the Debugger Software . . . . . . . . . . . . . . . . . . . . . . . . 1-4 Step 3: Setting Up a DLL File for Your XDS510 or XDS510PP . . . . . 1-5 Additional XDS510PP Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6 Step 4: Setting Up the Debugger Environment . . . . . . . . . . . . . . . . . . . 1-8 Step 5: Resetting the Emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11 Step 6: Describing Your Target System to the Debugger . . . . . . . . . 1-13 Step 7: Verifying the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14 1.10 Installation Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15 Installing the Debugger With Windows 3.1x 1-1 System Requirements 1.1 System Requirements To install the '470 C source debugger and TMS470R1x emulator, you need the items in the following hardware and software checklists. Hardware checklist System Memory Disk space Display Required hardware Optional hardware XDS510 emulator controller 80386-, 80486, or PentiumTM-based PC 4-16 Mbytes of free memory 10 Mbytes available disk space for executables and libraries Color monitor CD-ROM drive MicrosoftTM-compatible mouse XDS510TM or XDS510PPTM emulator controller Note: The speed at which your system operates depends on the amount of RAM available on your PC and the number of debuggers running simultaneously. 1-2 System Requirements Software checklist Operating system Software tools Required files included with the debugger package Windows 3.1x TMS470R1x assembler and linker Optional: TMS470R1x C compiler emu470.exe is the debugger executable file emurst.exe resets the XDS510 emulator emurstpp.exe resets the XDS510PP emulator board.dat describes your target system to the debugger in terms of what devices are on the emulation scan path. The board.dat file included in the debugger package is for a target board with one TMS470R1x named tms470. board.cfg is a text file used to describe your target system to the debugger in terms of what devices are on the emulation scan path. The board.cfg file included in the debugger package is for a target board with one TMS470R1x named tms470. The composer utility allows you to convert your text board configuration file (board.cfg) into a format the debugger can read (board.dat ). For the emulator to initialize properly, you must create a new board.dat file with this release of the composer or use the samples that are provided for you. Optional files included with the debugger package emuinit.cmd is a general-purpose batch file that contains debugger commands. The version of this file that is shipped with the debugger defines a '470 memory map. 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, see the TMS470R1x C Source Debugger User's Guide. Installing the Debugger With Windows 3.1x 1-3 Step 1: Installing the XDS510 or XDS510PP Emulator Controller / Step 2: Installing the Debugger Software Step1: Installing the XDS510 or XDS510PP Emulator Controller 1.2 Step 1: Installing the XDS510 or XDS510PP Emulator Controller Before installing the '470 debugger software, you must install an XDS510 emulator controller: the XDS510 or XDS510PP. Follow the instructions in the XDS51x Emulator Installation Guide to install the XDS510 emulator controller. 1.3 Step 2: Installing the Debugger Software To install the debugger on a Windows 3.1x system, follow these steps: 1) Insert the debugger CD-ROM into your CD-ROM drive. 2) Start Windows 3.1x. 3) From the File menu, select Run. 4) In the dialog box, enter the following command (replace d with the letter of your CD-ROM drive): d:\setup.exe 5) Click on OK. 6) Follow the on-screen instructions. The setup.exe program creates a program group for the TMS470R1x Emulator that looks similar to the following example: 1-4 Step 3: Setting Up a DLL File for Your XDS510 or XDS510PP 1.4 Step 3: Setting Up a DLL File for Your XDS510 or XDS510PP After you run the installation program (setup.exe), you must set up a DLL (dynamic link library) file for your XDS510 or XDS510PP. You can set up the smg510w.dll file for your XDS510 or XDS510PP by running a batch file, or you can do it manually. - For the XDS510: J J Run set510.bat. This file sets up the smg510w.dll file. or Copy the smg510.xds file to the smg510w.dll file. - For the XDS510PP: J J Run set510pp.bat. This file sets up the smg510w.dll file. or Copy the smg510.pp file to the smg510w.dll file. Installing the Debugger With Windows 3.1x 1-5 Additional XDS510PP Setup 1.5 Additional XDS510PP Setup If you are using the XDS510PP, you need to complete the following: - Check your BIOS (basic input/output system) to ensure that your printer is in one of the following modes: EPP: Enhanced printer port SPP4: 4-bit unidirectional mode SPP8: 8-bit bidirectional mode EPP mode provides the best performance. If your BIOS offers the options EPP+ECP and EPP+SPP, select EPP+SPP. The EPP+ECP option is not supported. Note the port address of your printer. - Edit the parameters in the xds510pp.ini file to match your system. The xds510pp.ini file contains parameters for the printer address, printer mode, and printer speed. Make sure the xds510pp.ini file is in the same directory as your debugger software. The following is a sample xds510pp.ini file: port = 378 mode = EPP speed = 10 Where: J J J Port is the I/O address of your printer port. Mode is the printer port mode (EPP, SPP4, or SPP8). Speed is a delay parameter that may be required on some systems. Set this parameter to 10 initially. You can reduce this number once your XDS510PP is up and running. 1-6 Additional XDS510PP Setup Diagnostic files The XDS510PP software includes diagnostic files that help you determine system information (see Table 1-1). Use these files if you have problems setting up your parallel printer port. Table 1-1. Diagnostic Files File smcmode.exe -h -r -m x Purpose Determines if your parallel printer port uses a port controller device manufactured by SMC. gives you more information about the options. resets the status register. sets your printer port to mode x where: Mode 0: Standard bidirectional mode. Mode 1: EPP and SPP mode. Mode 2: ECP mode. Mode 3: ECP and EPP mode. Mode 4: Non bidirectional mode. nscmode.exe portchk.exe Determines if your parallel printer port uses a port controller device manufactured by National Semiconductor. Determines if your parallel printer port is bidirectional. For more information about the smcmode.exe program, see Section 1.7, Special Considerations When Resetting the XDS510PP. Installing the Debugger With Windows 3.1x 1-7 Step 4: Setting Up the Debugger Environment 1.6 Step 4: Setting Up the Debugger Environment You can define environment variables that set certain debugger parameters you normally use. An environment variable is a system symbol that you define and assign to a string. When you use environment variables, default values are set, making each individual invocation of the debugger simpler because these parameters are automatically specified. The debugger uses three environment variables: D_DIR, D_SRC, and D_OPTIONS. By default, the installation program sets up these environment variables in your autoexec.bat file: SET PATH=C:\EMU470;%PATH% SET D_DIR=C:\EMU470; If you choose not to have the environment variables set up automatically, you can modify your autoexec.bat file to exclude the SET commands above. The remainder of this section describes these environment variables and other variables that you can define. Identifying the directory that contains the executable files (PATH statement) You must include the emulator directory in your PATH statement. This allows you to specify the debugger executable without specifying the name of the directory that contains the executable file. - If you modify your autoexec.bat file to change the path information, add the following to the end of the PATH statement: ;C:\EMU470 If you set the PATH statement from the command line, use this format: SET PATH=C:\EMU470;%PATH% (Be careful not to precede the equal sign with a space.) The addition of ;%PATH% ensures that this PATH statement does not undo the PATH statements in any other batch files (including the autoexec.bat file). Identifying alternate directories for the debugger (D_DIR) The debugger uses the D_DIR environment variable to name alternative directories that contain auxiliary files (emurst, emuinit.cmd, etc.) that the debugger needs. The command for assigning the environment variable is as follows: SET D_DIR=C:\EMU470 (Be careful not to precede the equal sign with a space.) 1-8 Step 4: Setting Up the Debugger Environment Identifying directories that contain source files (D_SRC) The debugger uses the D_SRC environment variable to find directories that contain program source files. The command for assigning the environment variable is as follows: SET D_SRC=pathname1; pathname2 . . . (Be careful not to precede the equal sign with a space.) The pathnames are directories that contain program source files. You can separate pathnames with a semicolon or with blanks. Setting default debugger options (D_OPTIONS) You might find it useful to set default debugger options using the D_OPTIONS environment variable. When you use the D_OPTIONS environment variable, the debugger uses the options and/or input filenames that you name with D_OPTIONS every time you run the debugger. The command for assigning the environment variable is a follows: SET D_OPTIONS=[object filename] [debugger options] (Be careful not to precede the equal sign with a space.) This tells the debugger to load the specified object file and use the specified options each time you invoke the debugger. The options that you can identify with D_OPTIONS are listed on page 1-10. Installing the Debugger With Windows 3.1x 1-9 Step 4: Setting Up the Debugger Environment These are the options you can identify with D_OPTIONS: Option -b[b] -bl -bw -c -f filename -font size -i pathname -me -min -n processor name Brief Description Select the screen size. Select screen length. Select screen width. Clear the .bss section. Identify a new board configuration file. Select font point size. Identify additional directories. Select little-endian format. Select the minimal debugging mode. Identify the processor for debugging (this processor name must match the processor name as stated in the configuration file). Identify the port address. Enter the profiling environment. Load the symbol table only. Identify a new initialization file. Load without the symbol table. -p port address -profile -s -t filename -v Note: Overriding D_OPTIONS You can override D_OPTIONS by invoking the debugger or emurst with the -x option. For more information about options, see the invocation instructions in the TMS470R1x C Source Debugger User's Guide. 1-10 Step 5: Resetting the Emulator 1.7 Step 5: Resetting the Emulator You must reset your XDS510 or XDS510PP before invoking the debugger. A successful reset can occur only after you have powered up the target board. You can reset the emulator by adding one of the following commands to the autoexec.bat file: XDS510: emurst [-x] [-p port address] XDS510PP: emurstpp [-x] The -x option tells the emurst/emurstpp utility to ignore any options specified with the D_OPTIONS environment variable. The -p option identifies the port address. When you want to reset your XDS510 or XDS510PP without rebooting your system, use the icons provided in the program group. - To reset the XDS510 from Windows, click on the EMURST icon in the TMS470R1x Emulator program group. - To reset the XDS510PP from Windows, click on the EMURSTPP icon in the TMS470R1x Emulator program group. Note: If the debugger is running, emurst/emurstpp will not reset the emulator. The debugger displays the following message: RESET DISALLOWED : DEBUGGER RUNNING If an error message appears after the emulator is reset, see Section 1.10, Installation Error Messages. Installing the Debugger With Windows 3.1x 1-11 Step 5: Resetting the Emulator Special Considerations When Resetting the XDS510PP You must reset your XDS510PP with the emurstpp command before invoking the debugger. After resetting the XDS510PP with the emurstpp command, you will see one of two messages. - If you see the following message, the reset was successful: EMURST FOR THE XDS510PP VERSION 1.0 XDS510PP IS RESET, HARDWARE VERSION 1 If you see the following message, the reset was unsuccessful: EMURST FOR THE XDS510PP VERSION 1.0 COMMUNICATIONS ERROR, OR POD HAS NO POWER The smcmode command If emurstpp does not reset your XDS510PP, it is possible that the printer port device in your computer and the SMC chip in the XDS510PP are confused during power cycles. Enter the following command: smcmode -r If your computer has an SMC device, this command resets and initializes the device for proper operation. The smcmode command works only if your computer uses an SMC printer port controller chip. To determine if your computer uses an SMC printer port controller chip, enter the following command with no parameters: smcmode This command tells you if an SMC device is installed and lists the device's configuration. 1-12 Step 6: Describing Your Target System to the Debugger 1.8 Step 6: Describing Your Target System to the Debugger In order for the debugger to understand how you have configured your target system, you must supply a file for the debugger to read. You can either use the default configuration file, board.dat, or create your own file. - If you are using an emulation scan path that contains only one '470 and no other devices, you can use the board.dat file that comes with the '470 emulator kit. This file describes the single '470 in the scan path and gives the '470 the name tms470. Since the debugger automatically looks for a file called board.dat in the current directory and in the directories specified with the D_DIR environment variable, you don't need to create your own board configuration file. If you want to use a different name for the target device or you want the debugger to recognize a different target configuration, you must follow these steps: 1) Create the board configuration file. 2) Use composer to translate the board configuration file to binary so that the debugger can read it. 3) Specify the target processor name as stated in the configuration file. This name is used with the -n option when invoking the debugger. These steps are described in the TMS470R1x C Source Debugger User's Guide. - Installing the Debugger With Windows 3.1x 1-13 Step 7: Verifying the Installation 1.9 Step 7: Verifying the Installation To ensure that you have correctly installed the emulator and debugger software, enter this command at the system prompt: emu470 -p port address -n tms470 You should see a display similar to this one: emu470 (tms470) Load Break Watch Memory Color LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB MoDe Analysis Run=F5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, #- #- #- #- #- #- #- #- #- #- #- #- #- #- #- Step=F8 Next=F10 DISASSEMBLY 000000000 55555555 000000004 55555555 000000003 55555555 00000000c 55555555 000000010 55555555 000000014 55555555 000000013 55555555 00000001c 55555555 000000020 55555555 000000024 55555555 000000023 55555555 00000002c 55555555 000000030 55555555 000000034 55555555 000000033 55555555 COMMAND ARM7TDMI Silicone Revision 0.1.7 XDS510 Emulator Revision 1 CPU PC aaaaaaaa SP aaaaaaaa LR aaaaaaaa CPSR aaaaaaaa R0 aaaaaaaa R1 aaaaaaaa R2 aaaaaaaa R3 aaaaaaaa R4 aaaaaaaa R5 aaaaaaaa R6 aaaaaaaa R7 aaaaaaaa R8 aaaaaaaa R9 aaaaaaaa R10 aaaaaaaa WATCH STATUS_REGISTER 3: C-bit 1 4: V-bit 0 5: I-bit 1 6: F-bit 0 7: T-bit 1 8: MODE 0x0000000a 5 55555555 5 55555555 5 55555555 5 55555555 5 55555555 5 55555555 Memory map defined as: RAM tms470> 0- 80000, 512K - If you see a display similar to this one, you have correctly installed your emulator and debugger. If you see a display and the lines of code say Invalid address or the fields in the MEMORY window are shown in red, the debugger may not be able to find the emuinit.cmd file. Check for the file in the directories specified by the D_DIR environment variable or ensure that the file is in the current directory. Reenter the command above. If you don't see a display, your debugger or board may not be installed properly. Go back through the installation instructions and be sure that you have followed each step correctly; then reenter the command above. - 1-14 Installation Error Messages 1.10 Installation Error Messages While invoking the debugger, you may see one of the following messages: CANNOT INITIALIZE THE TARGET SYSTEM ! ! - Check I/O configuration - Check cabling and target power CANNOT DETECT TARGET POWER ! ! - Check I/O configuration - Check cabling and target power One or several of the following conditions may be the cause: - Is the target power on? Is the XDS510/XDS510PP installed snugly? Is the device installed snugly? Is the cable connecting your emulator and target system loose? Is your target board getting the correct voltage? Is your emulator scan path interrupted? One or more devices on the emulator scan path may have been removed. Check the connections; either they are not connected, or they are connected improperly. Did you use the -n option? Was it used with an incorrect device name? You must supply a valid device name with the -n option. After you powered up the target board, did you execute the emurst/ emurstpp command? This command must be executed after you powered up the target board. Installing the Debugger With Windows 3.1x 1-15 Installation Error Messages - Did you use the -p option? Is your port address correct (XDS510 only)? J J Check to be sure the -p option used with the D_OPTIONS environment variable matches the I/O address defined by your switch settings. For information about the switch settings, see the XDS510 installation instructions in the XDS51x Emulator Installation Guide. Check to see if you have a conflict in address space with another bus setting. If you have a conflict, change the switches on your board to one of the alternative settings. Modify the -p option of the D_OPTIONS environment variable to reflect the change in your switch settings. - Is the board.dat file in the current directory or in a directory specified by D_DIR? After you have checked all of the above, repeat the verification instructions on page 1-14. 1-16 Chapter 2 Installing the Debugger With Windows NT This chapter provides instructions for installing the C source debugger on a PC running Windows NTTM. When you complete the installation, turn to the TMS470R1x C Source Debugger User's Guide. To install the emulator controller, see the XDS51x Emulator Installation Guide, which is included in your kit. Topic 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 Page System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Step 1: Installing the XDS510 Emulator Controller . . . . . . . . . . . . . . . 2-4 Step 2: Installing the Debugger Software . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Step 3: Installing the Emulator Device Driver . . . . . . . . . . . . . . . . . . . . 2-5 Step 4: Verifying the Emulator Device Driver Installation . . . . . . . . . 2-7 Step 5: Setting Up the Debugger Environment . . . . . . . . . . . . . . . . . . . 2-9 Step 6: Resetting the Emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12 Step 7: Describing Your Target System to the Debugger . . . . . . . . . 2-13 Step 8: Verifying the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14 2.10 Installation Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15 2-1 System Requirements 2.1 System Requirements To install the '470 C source debugger and TMS470R1x emulator, you need the items in the following hardware and software checklists. Hardware checklist System Memory Disk space Display Required hardware Optional hardware XDS510 emulator controller 32-bit x86- or Pentium-based PC with an ISA/EYES, VESA local, or PCI bus. 4-16 Mbytes of free memory 10 Mbytes available disk space for executables and libraries Color monitor CD-ROM drive Microsoft-compatible mouse XDS510 emulator controller 2-2 System Requirements Software checklist Operating system Software tools Required files included with the debugger package Windows NT version 3.5 or higher TMS470R1x assembler and linker Optional: TMS470R1x C compiler emu470.exe is the debugger executable file emurst.exe resets the XDS510 emulator board.dat describes your target system to the debugger in terms of what devices are on the emulation scan path. The board.dat file included in the debugger package is for a target board with one TMS470R1x named tms470. board.cfg is a text file used to describe your target system to the debugger in terms of what devices are on the emulation scan path. The board.cfg file included in the debugger package is for a target board with one TMS470R1x named tms470. The composer utility allows you to convert your text board configuration file (board.cfg) into a format the debugger can read (board.dat ). For the emulator to initialize properly, you must create a new board.dat file with this release of the composer or use the samples provided for you. Optional files included with the debugger package emuinit.cmd is a general-purpose batch file that contains debugger commands. The version of this file that is shipped with the debugger defines a '470 memory map. 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, see the TMS470R1x C Source Debugger User's Guide. Installing the Debugger With Windows NT 2-3 Step 1: Installing the XDS510 Emulator Controller / Step 2: Installing the Debugger Software Step 1: Installing the XDS510 Emulator Controller 2.2 Step 1: Installing the XDS510 Emulator Controller Before installing the '470 debugger software, you must install the XDS510 emulator controller. Follow the instructions in the XDS51x Emulator Installation Guide to install the XDS510 emulator controller. 2.3 Step 2: Installing the Debugger Software To install the debugger on a Windows NT system, follow these steps: 1) Insert the debugger CD-ROM into your CD-ROM drive. 2) Start Windows NT. 3) From the File menu, select Run. 4) In the dialog box, enter the following command (replace d with the letter of your CD-ROM drive): d:\setup.exe 5) Click on OK. 6) Follow the on-screen instructions. The setup.exe program creates a program group for the TMS470R1x Emulator that looks similar to the following example: 2-4 Step 3: Installing the Emulator Device Driver 2.4 Step 3: Installing the Emulator Device Driver You must install the emulator device driver, genport.sys, in the Windows NT registry to enable the debugger to communicate with the emulator. To install the emulator device driver, you can use the regdrv.exe driver installation program. The regdrv.exe program is stored in the emu470\drivers subdirectory of the emulation software and performs the following tasks: - Copies genport.sys to the Windows NT drivers directory. In most cases, this directory is C:\WINDOWS\SYSTEM32\DRIVERS or C:\WINNT35\SYSTEM32\DRIVERS. However, the directory name may be different on your system. Registers the genport.sys parameters in the Windows NT registry. Note: The Windows NT registry (also referred to as the configuration registry) serves as a repository for all information about the computer hardware that the Windows NT operating system is running on, the software installed on the system, and the users of the system. Device drivers, applications, and users can also place information in the registry and can later query the registry for the information they need. To install the the emulator device driver, genport.sys, follow these steps: 1) Set your current directory to the driver subdirectory where the emulator software is installed. For example, enter a command like the following: CD:\EMU470\DRIVER 2) Execute the driver installation program. regdrv.exe The regdrv.exe program prompts you to enter the path to the directory where the genport.sys device driver is located. If you don't enter a path, the regdrv.sys program searches the current directory. Installing the Debugger With Windows NT 2-5 Step 3: Installing the Emulator Device Driver 3) To accept the default parameters, press enter. The regdrv.exe program prompts you to register the emulator driver parameters. J J Y If you enter Y, the regdrv.exe program checks to see if the emulator driver is already installed. If it is, the regdrv.exe program prompts you to replace/update the driver with the new emulator driver. If you enter N, the regdrv.exe program exits without updating the emulator driver parameters in the Windows NT registry. 4) To complete the installation, enter the following: When the registration is complete, the regdrv.exe program displays the status of the registration. 5) Reboot your PC. If you get error messages during the installation process, see the Driver Installation Error Messages subsection on page 2-7. For information about installing the emulator device driver, see Appendix B, Installing the Emulator Device Driver Manually. 2-6 Step 4: Verifying the Emulator Device Driver Installation 2.5 Step 4: Verifying the Emulator Device Driver Installation To ensure that you have correctly installed the emulator device driver, follow these steps: 1) Turn off the power to the TMS470 target board. 2) Connect the JTAG cable to the TMS470 target board. 3) Turn on the power to the TMS470 target board. If a hard reset is not generated automatically after power up, apply a hard reset to the TMS470 device. 4) From the command prompt in an MS-DOSTM window, enter: emurst If the port address has a value other than 240, you must use the -p option with the emurst command to specify the appropriate port address. - If you see a message similar to the following, you have correctly installed the emulator device driver. XDS510 IS RESET, HARDWARE VERSION 3 If you see this message: CANNOT DETECT TARGET POWER follow the troubleshooting tips below. Driver installation error messages Invalid Source Path Description Action The directory path that you entered does not exist. Be sure that the path to the emulator software is correct. Discontinue the driver installation program by entering N at the next prompt. Reinvoke the regdrv program and reenter the emulator software directory. Can't find the emulator driver Description Action The directory path that you entered does not contain the emulator driver genport.sys. Check the directory path and make sure it corresponds to the emulator software directory. Installing the Debugger With Windows NT 2-7 Step 4: Verifying the Emulator Device Driver Installation Can't find Windows NT SYSTEM32\DRIVERS\ directory Description The Windows NT drivers directory should be c:\pathname\system32\drivers. Typically, the pathname is c:\windows\ or c:\winnt35. Reinvoke the regdrv program and enter the correct pathname to the system32\drivers directory. If you continue to see this message, you may need to install the emulator driver manually. Refer to Appendix B, Installing the Emulator Device Driver Manually, for more information. Action Can't overwrite emulator driver - access denied Description Action The permissions for the emulator driver are not correct. Check the permissions on the emulator driver that is already installed. If the driver is loaded in memory, from the command line, type NET STOP GENPORT to stop the driver. Reinstall the driver by following the directions in Section 2.4, Installing the Emulator Device Driver. 2-8 Step 5: Setting Up the Debugger Environment 2.6 Step 5: Setting Up the Debugger Environment You can define environment variables that set certain debugger parameters you normally use. An environment variable is a system symbol that you define and assign to a string. When you use environment variables, default values are set, making each individual invocation of the debugger simpler because these parameters are automatically specified. The debugger uses three environment variables-D_DIR, D_SRC, and D_OPTIONS. The debugger uses environment variables for finding or obtaining certain types of information. By default, the installation program sets up these environment variables: SET PATH=C:\EMU470;%PATH% SET D_DIR=C:\EMU470 These variables are set up in the registry under: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\Environment If you choose not to have the environment variables set up automatically, you can set up the environment variables in the System applet of the Control Panel. The remainder of this section describes these environment variables and other variables that you can define. Identifying the directory that contains the executable files (PATH statement) You must include the emulator directory in your PATH statement. This allows you to specify the debugger executable without specifying the name of the directory that contains the executable file. - If you modify your System applet to change the path information, add the following to the end of the PATH statement: ;C:\EMU470 If you set the PATH statement from the command line, use this format: SET PATH=C:\EMU470;%PATH% (Be careful not to precede the equal sign with a space.) The addition of ;%PATH% ensures that this PATH statement does not undo the PATH statements in any other batch files (including the autoexec.bat file). Installing the Debugger With Windows NT 2-9 Step 5: Setting Up the Debugger Environment Identifying alternate directories for the debugger (D_DIR) The debugger uses the D_DIR environment variable to name alternative directories that contain auxiliary files (emurst, emuinit.cmd, etc.) that the debugger needs. The command for assigning the environment variable is as follows: SET D_DIR=C:\EMU470 (Be careful not to precede the equal sign with a space.) Identifying directories that contain source files (D_SRC) The debugger uses the D_SRC environment variable to name directories that contain program source files. The command for assigning the environment variable is as follows: SET D_SRC=pathname1; pathname2 . . . (Be careful not to precede the equal sign with a space.) The pathnames are directories that contain program source files. You can separate pathnames with a semicolon or with blanks. Setting default debugger options (D_OPTIONS) You might find it useful to set default debugger options using the D_OPTIONS environment variable. When you use the D_OPTIONS environment variable, the debugger uses the options and/or input filenames that you name with D_OPTIONS every time you run the debugger. The command for assigning the environment variable is a follows: SET D_OPTIONS=[object filename] [debugger options] (Be careful not to precede the equal sign with a space.) This tells the debugger to load the specified object file and use the specified options each time you invoke the debugger. The options that you can identify with D_OPTIONS are listed on page 2-11. 2-10 Step 5: Setting Up the Debugger Environment These are the options you can identify with D_OPTIONS: Option -b[b] -bl -bw -c -f filename -font size -i pathname -me -min -n processor name Brief Description Select the screen size. Select screen length. Select screen width. Clear the .bss section. Identify a new board configuration file. Select font point size. Identify additional directories. Select little-endian format. Select the minimal debugging mode. Identify the processor for debugging (this processor name must match the processor name as stated in the configuration file). Identify the port address. Enter the profiling environment. Load the symbol table only. Identify a new initialization file. Load without the symbol table. -p port address -profile -s -t filename -v Note: Overriding D_OPTIONS You can override D_OPTIONS by invoking the debugger or emurst with the -x option. For more information about options, see the invocation instructions in the TMS470R1x C Source Debugger User's Guide. Installing the Debugger With Windows NT 2-11 Step 6: Resetting the Emulator 2.7 Step 6: Resetting the Emulator You must reset the emulator before invoking the debugger. Reset can occur only after you have powered up the target board. You can reset the emulator by adding the following command to the autoexec.bat file: - emurst [-x] [-p port address] The -x option tells the emurst utility to ignore any options specified with the D_OPTIONS environment variable. The -p option identifies the port address. When you want to reset your XDS510 or XDS510PP without rebooting your system, use the icons provided in the program group. - To reset the XDS510 from Windows, click on the EMURST icon in the TMS470R1x Emulator program group. Note: If the debugger is running, emurst will not reset the emulator. The debugger displays the following message: RESET DISALLOWED : DEBUGGER RUNNING If an error message appears after the emulator is reset, see Section 2.10, Installation Error Messages. 2-12 Step 7: Describing Your Target System to the Debugger 2.8 Step 7: Describing Your Target System to the Debugger In order for the debugger to understand how you have configured your target system, you must supply a file for the debugger to read. You can either use the default configuration file, board.dat, or create your own file. - If you are using an emulation scan path that contains only one '470 and no other devices, you can use the board.dat file that comes with the '470 emulator kit. This file describes the single '470 in the scan path and gives the '470 the name tms470. Since the debugger automatically looks for a file called board.dat in the current directory and in the directories specified with the D_DIR environment variable, you don't need to create your own board configuration file. If you want to use a different name for the target device or you want the debugger to recognize a different target configuration, you must follow these steps: 1) Create the board configuration file. 2) Use composer to translate the board configuration file to binary so that the debugger can read it. 3) Specify the target processor name as stated in the configuration file. This name is used with the -n option when invoking the debugger. These steps are described in the TMS470R1x C Source Debugger User's Guide. - Installing the Debugger With Windows NT 2-13 Step 8: Verifying the Installation 2.9 Step 8: Verifying the Installation To ensure that you have correctly installed the emulator and debugger software, enter this command at the system prompt: emu470 -p port address -n tms470 You should see a display similar to this one: emu470 (tms470) Load Break Watch Memory Color LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB MoDe Analysis Run=F5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, #- #- #- #- #- #- #- #- #- #- #- #- #- #- #- Step=F8 Next=F10 DISASSEMBLY 000000000 55555555 000000004 55555555 000000003 55555555 00000000c 55555555 000000010 55555555 000000014 55555555 000000013 55555555 00000001c 55555555 000000020 55555555 000000024 55555555 000000023 55555555 00000002c 55555555 000000030 55555555 000000034 55555555 000000033 55555555 COMMAND ARM7TDMI Silicone Revision 0.1.7 XDS510 Emulator Revision 1 CPU PC aaaaaaaa SP aaaaaaaa LR aaaaaaaa CPSR aaaaaaaa R0 aaaaaaaa R1 aaaaaaaa R2 aaaaaaaa R3 aaaaaaaa R4 aaaaaaaa R5 aaaaaaaa R6 aaaaaaaa R7 aaaaaaaa R8 aaaaaaaa R9 aaaaaaaa R10 aaaaaaaa WATCH STATUS_REGISTER 3: C-bit 1 4: V-bit 0 5: I-bit 1 6: F-bit 0 7: T-bit 1 8: MODE 0x0000000a 5 55555555 5 55555555 5 55555555 5 55555555 5 55555555 5 55555555 Memory map defined as: RAM tms470> 0- 80000, 512K - If you see a display similar to this one, you have correctly installed your emulator and debugger. If you see a display and the lines of code say Invalid address or the fields in the MEMORY window are shown in red, the debugger may not be able to find the emuinit.cmd file. Check for the file in the directories specified by the D_DIR environment variable or ensure that the file is in the current directory. Reenter the command above. If you don't see a display, your debugger or board may not be installed properly. Go back through the installation instructions and be sure that you have followed each step correctly; then reenter the command above. - 2-14 Installation Error Messages 2.10 Installation Error Messages While invoking the debugger, you may see one of the following messages: CANNOT INITIALIZE THE TARGET SYSTEM ! ! - Check I/O configuration - Check cabling and target power CANNOT DETECT TARGET POWER ! ! - Check I/O configuration - Check cabling and target power One or several of the following conditions may be the cause: - Is the target power on? Is the XDS510 board installed snugly? Is the device installed snugly? Is the cable connecting your emulator and target system loose? Is your target board getting the correct voltage? Is your emulator scan path interrupted? One or more devices on the emulator scan path may have been removed. Check the connections; either they are not connected, or they are connected improperly. Did you use the -n option? Was it used with an incorrect device name? You must supply a valid device name with the -n option. After you powered up the target board, did you execute the emurst command? This command must be executed after you powered up the target board. Is the board.dat file in the current directory or in a directory specified by D_DIR? Is the emulator driver installed properly? Installing the Debugger With Windows NT 2-15 Installation Error Messages - Did you use the -p option? Is your port address correct? J J Check to be sure the -p option used with the D_OPTIONS environment variable matches the I/O address defined by your switch settings. For information about the switch settings, see the XDS510 installation instructions in the XDS51x Emulator Installation Guide. Check to see if you have a conflict in address space with another bus setting. If you have a conflict, change the switches on your board to one of the alternative settings. Modify the -p option of the D_OPTIONS environment variable to reflect the change in your switch settings. After you have checked all of the above, repeat the verification instructions on page 2-14. 2-16 Chapter 3 Installing the Debugger With Windows 95 This chapter provides instructions for installing the C source debugger on a PC running Windows 95. When you complete the installation, turn to the TMS470R1x C Source Debugger User's Guide. To install the emulator controller, see the XDS51x Emulator Installation Guide, which is included in your kit. Topic 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 Page System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Step 1: Installing the XDS510 or XDS510PP Emulator Controller . . 3-4 Step 2: Installing the Debugger Software . . . . . . . . . . . . . . . . . . . . . . . . 3-4 Step 3: Setting Up a DLL File for Your XDS510 or XDS510PP . . . . . 3-5 Additional XDS510PP Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6 Step 4: Setting Up the Debugger Environment . . . . . . . . . . . . . . . . . . . 3-8 Step 5: Resetting the Emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11 Step 6: Describing Your Target System to the Debugger . . . . . . . . . 3-13 Step 7: Verifying the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14 3.10 Installation Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15 3-1 System Requirements 3.1 System Requirements To install the '470 C source debugger and TMS470R1x emulator, you need the items in the following hardware and software checklists. Hardware checklist System Memory Disk space Display Required hardware Optional hardware XDS510 emulator controller 32-bit x86- or Pentium-based PC with an ISA/EISA, VESA local, or PCI bus 4-16 Mbytes of free memory 10 Mbytes available disk space for executables and libraries Color monitor CD-ROM drive Microsoft-compatible mouse XDS510 or XDS510PP emulator controller Note: The speed at which your system operates depends on the amount of RAM available on your PC and the number of debuggers running simultaneously. 3-2 System Requirements Software checklist Operating system Software tools Required files included with the debugger package Windows 95 TMS470R1x assembler and linker Optional: TMS470R1x C compiler emu470.exe is the debugger executable file emurst.exe resets the XDS510 emulator emurstpp.exe resets the XDS510PP emulator board.dat describes your target system to the debugger in terms of what devices are on the emulation scan path. The board.dat file included in the debugger package is for a target board with one TMS470R1x named tms470. board.cfg is a text file used to describe your target system to the debugger in terms of what devices are on the emulation scan path. The board.cfg file included in the debugger package is for a target board with one TMS470R1x named tms470. The composer utility allows you to convert your text board configuration file (board.cfg) into a format the debugger can read (board.dat ). For the emulator to initialize properly, you must create a new board.dat file with this release of the composer or use the samples that are provided for you. Optional files included with the debugger package emuinit.cmd is a general-purpose batch file that contains debugger commands. The version of this file that is shipped with the debugger defines a '470 memory map. 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, see the TMS470R1x C Source Debugger User's Guide. Installing the Debugger With Windows 95 3-3 Step 1: Installing the XDS510 or XDS510PP Emulator Controller / Step 2: Installing the Debugger Software Step 1: Installing the XDS510 3.2 Step 1: Installing the XDS510 or XDS510PP Emulator Controller Before installing the '470 debugger software, you must install an XDS510 emulator controller: the XDS510 or XDS510PP. Follow the instructions in the XDS51x Emulator Installation Guide to install the XDS510 emulator controller. 3.3 Step 2: Installing the Debugger Software To install the debugger on a Windows 95 system, follow these steps: 1) Insert the debugger CD-ROM into your CD-ROM drive. 2) Start Windows 95. 3) From the Start menu, select Run. 4) In the dialog box, enter the following command (where d: is the name of your CD-ROM drive): d:\setup.exe 5) Click on OK. 6) Follow the on-screen instructions. The setup.exe program creates a program group for the TMS470R1x Emulator that looks similar to the following example: 3-4 Step 3: Setting Up a DLL File for Your XDS510 or XDS510PP 3.4 Step 3: Setting Up a DLL File for Your XDS510 or XDS510PP After you run the installation program (setup.exe), you must setup a DLL (dynamic link library) file for your XDS510 or XDS510PP. You can set up the smg510w.dll file for your XDS510 or XDS510PP by running a batch file, or you can do it manually. - For the XDS510: J J Run set510.bat. This file sets up smg510w.dll file. or Copy the smg1095.xds file to the smg510w.dll file. - For the XDS510PP: J J Run set510pp.bat. This file sets up the smg510w.dll file. or Copy the smg1095.pp file to the smg510w.dll file. Installing the Debugger With Windows 95 3-5 Additional XDS510PP Setup 3.5 Additional XDS510PP Setup If you are using the XDS510PP, you need to complete the following: - Check your BIOS (basic input/output system) to ensure that your printer is in one of the following modes: EPP: Enhanced printer port SPP4: 4-bit unidirectional mode SPP8: 8-bit bidirectional mode EPP mode provides the best performance. If your BIOS offers the options EPP+ECP and EPP+SPP, select EPP+SPP. The EPP+ECP option is not supported. Note the port address of your printer. - Edit the parameters in the xds510pp.ini file to match your system. The xds510pp.ini file contains parameters for the printer address, printer mode, and printer speed. Make sure the xds510pp.ini file is in the same directory as your debugger software. The following is a sample xds510pp.ini file: port = 378 mode = EPP speed = 10 Where: J J J Port is the I/O address of your printer port. Mode is the printer port mode (EPP, SPP4, or SPP8). Speed is a delay parameter that may be required on some systems. Set this parameter to 10 initially. You can reduce this number once your XDS510PP is up and running. 3-6 Additional XDS510PP Setup Diagnostic files The XDS510PP software includes diagnostic files that help you determine system information (see Table 3-1). Use these files if you have problems setting up your parallel printer port. Table 3-1. Diagnostic Files File smcmode.exe -h -r -m x Purpose Determines if your parallel printer port uses a port controller device manufactured by SMC. gives you more information about the options. resets the status register. sets your printer port to mode x where: Mode 0: Standard bidirectional mode. Mode 1: EPP and SPP mode. Mode 2: ECP mode. Mode 3: ECP and EPP mode. Mode 4: Non bidirectional mode. nscmode.exe portchk.exe Determines if your parallel printer port uses a port controller device manufactured by National Semiconductor. Determines if your parallel printer port is bidirectional. For more information about the smcmode.exe program, see Section 3.7, Special Considerations When Resetting the XDS510PP. Installing the Debugger With Windows 95 3-7 Step 4: Setting Up the Debugger Environment 3.6 Step 4: Setting Up the Debugger Environment You can define environment variables that set certain debugger parameters you normally use. An environment variable is a system symbol that you define and assign to a string. When you use environment variables, default values are set, making each individual invocation of the debugger simpler because these parameters are automatically specified. The debugger uses three environment variables: D_DIR, D_SRC, and D_OPTIONS. By default, the installation program sets up these environment variables in your autoexec.bat file: SET PATH=C:\EMU470;%PATH% SET D_DIR=C:\EMU470 If you choose not to have the environment variables set up automatically, you can modify your autoexec.bat file to exclude the SET commands above. The remainder of this section describes these environment variables and other variables that you can define. Identifying the directory that contains the executable files (PATH statement) You must include the emulator directory in your PATH statement. This allows you to specify the debugger executable without specifying the name of the directory that contains the executable file. - If you modify your autoexec.bat file to change the path information, add the following to the end of the PATH statement: ;C:\EMU470 If you set the PATH statement from the command line, use this format: SET PATH=C:\EMU470;%PATH% (Be careful not to precede the equal sign with a space.) The addition of ;%PATH% ensures that this PATH statement does not undo the PATH statements in any other batch files (including the autoexec.bat file). Identifying alternate directories for the debugger (D_DIR) The debugger uses the D_DIR environment variable to name alternative directories that contain auxiliary files (emurst, emuinit.cmd, etc.) that the debugger needs. The command for assigning the environment variable is as follows: SET D_DIR=C:\EMU470 (Be careful not to precede the equal sign with a space.) 3-8 Step 4: Setting Up the Debugger Environment Identifying directories that contain source files (D_SRC) The debugger uses the D_SRC environment variable to name directories that contain program source files. The command for assigning the environment variable is as follows: SET D_SRC=pathname1; pathname2 . . . (Be careful not to precede the equal sign with a space.) The pathnames are directories that contain program source files. You can separate pathnames with a semicolon or with blanks. Setting default debugger options (D_OPTIONS) You might find it useful to set default debugger options using the D_OPTIONS environment variable. When you use the D_OPTIONS environment variable, the debugger uses the options and/or input filenames that you name with D_OPTIONS every time you run the debugger. The command for assigning the environment variable is a follows: SET D_OPTIONS=[object filename] [debugger options] (Be careful not to precede the equal sign with a space.) This tells the debugger to load the specified object file and use the specified options each time you invoke the debugger. The options that you can identify with D_OPTIONS are listed on page 3-10. Installing the Debugger With Windows 95 3-9 Step 4: Setting Up the Debugger Environment These are the options that you can identify with D_OPTIONS: Option -b[b] -bl -bw -c -f filename -font size -i pathname -me -min -n processor name Brief Description Select the screen size. Select screen length. Select screen width. Clear the .bss section. Identify a new board configuration file. Select font point size. Identify additional directories. Select little-endian format. Select the minimal debugging mode. Identify the processor for debugging (this processor name must match the processor name as stated in the configuration file). Identify the port address. Enter the profiling environment. Load the symbol table only. Identify a new initialization file. Load without the symbol table. -p port address -profile -s -t filename -v Note: You can override D_OPTIONS by invoking the debugger or emurst with the -x option. For more information about options, see the invocation instructions in the TMS470R1x C Source Debugger User's Guide. 3-10 Step 5: Resetting the Emulator 3.7 Step 5: Resetting the Emulator You must reset the XDS510 or XDS510PP before invoking the debugger. A successful reset can occur only after you have powered up the target board. You can reset the emulator by adding one of the following commands to the autoexec.bat file: XDS510: emurst [-x] [-p port address] XDS510PP: emurstpp [-x] The -x option tells the emurst/emurstpp utility to ignore any options specified with the D_OPTIONS environment variable. The -p option port address identifies the port address. When you want to reset your XDS510 or XDS510PP without rebooting your system, use the icons provided in the program group. - To reset the XDS510 from Windows, click on the EMURST icon in the TMS470R1x Emulator program group. - To reset the XDS510PP from Windows, click on the EMURSTPP icon in the TMS470R1x Emulator program group. Note: If a debugger is running, emurst/emurstpp will not reset the emulator. The debugger displays the following message: RESET DISALLOWED : DEBUGGER RUNNING If an error message appears after the emulator is reset, see Section 3.10, Installation Error Messages. Installing the Debugger With Windows 95 3-11 Step 5: Resetting the Emulator Special Considerations When Resetting the XDS510PP You must reset your XDS510PP with the emurstpp command before invoking the debugger. After resetting the XDS510PP with the emurstpp command, you will see one of two messages. - If you see the following message, the reset was successful: EMURST FOR THE XDS510PP VERSION 1.0 XDS510PP IS RESET, HARDWARE VERSION 1 If you see the following message, the reset was unsuccessful: EMURST FOR THE XDS510PP VERSION 1.0 COMMUNICATIONS ERROR, OR POD HAS NO POWER The smcmode command If emurstpp does not reset your XDS510PP, it is possible that the printer port device in your computer and the SMC chip in the XDS510PP are confused during power cycles. Enter the following command: smcmode -r If your computer has an SMC device, this command resets and initializes the device for proper operation. The smcmode command works only if your computer uses an SMC printer port controller chip. To determine if your computer uses an SMC printer port controller chip, enter the following command with no parameters: smcmode This command tells you if an SMC device is installed and lists the device's configuration. 3-12 Step 6: Describing Your Target System to the Debugger 3.8 Step 6: Describing Your Target System to the Debugger In order for the debugger to understand how you have configured your target system, you must supply a file for the debugger to read. You can either use the default configuration file, board.dat, or create your own file. - If you are using an emulation scan path that contains only one '470 and no other devices, you can use the board.dat file that comes with the '470 emulator kit. This file describes the single '470 in the scan path and gives the '470 the name tms470. Since the debugger automatically looks for a file called board.dat in the current directory and in the directories specified with the D_DIR environment variable, you don't need to create your own board configuration file. If you want to use a different name for the target device or you want the debugger to recognize a different target configuration, you must follow these steps: 1) Create the board configuration file. 2) Use composer to translate the board configuration file to binary so that the debugger can read it. 3) Specify the target processor name as stated in the configuration file. This name is used with the -n option when invoking the debugger. These steps are described in the TMS470R1x C Source Debugger User's Guide. - Installing the Debugger With Windows 95 3-13 Step 7: Verifying the Installation 3.9 Step 7: Verifying the Installation To ensure that you have correctly installed the emulator and debugger software, enter this command at the system prompt: emu470 -p port address -n tms470 You should see a display similar to this one: emu470 (tms470) Load Break Watch Memory Color LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB MoDe Analysis Run=F5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, #- #- #- #- #- #- #- #- #- #- #- #- #- #- #- Step=F8 Next=F10 DISASSEMBLY 000000000 55555555 000000004 55555555 000000003 55555555 00000000c 55555555 000000010 55555555 000000014 55555555 000000013 55555555 00000001c 55555555 000000020 55555555 000000024 55555555 000000023 55555555 00000002c 55555555 000000030 55555555 000000034 55555555 000000033 55555555 COMMAND ARM7TDMI Silicone Revision 0.1.7 XDS510 Emulator Revision 1 CPU PC aaaaaaaa SP aaaaaaaa LR aaaaaaaa CPSR aaaaaaaa R0 aaaaaaaa R1 aaaaaaaa R2 aaaaaaaa R3 aaaaaaaa R4 aaaaaaaa R5 aaaaaaaa R6 aaaaaaaa R7 aaaaaaaa R8 aaaaaaaa R9 aaaaaaaa R10 aaaaaaaa WATCH STATUS_REGISTER 3: C-bit 1 4: V-bit 0 5: I-bit 1 6: F-bit 0 7: T-bit 1 8: MODE 0x0000000a 5 55555555 5 55555555 5 55555555 5 55555555 5 55555555 5 55555555 Memory map defined as: RAM tms470> 0- 80000, 512K - If you see a display similar to this one, you have correctly installed your emulator and debugger. If you see a display and the lines of code say Invalid address or the fields in the MEMORY window are shown in red, the debugger may not be able to find the emuinit.cmd file. Check for the file in the directories specified by the D_DIR environment variable or ensure that the file is in the current directory. Reenter the command above. If you don't see a display, your debugger or board may not be installed properly. Go back through the installation instructions and be sure that you have followed each step correctly; then reenter the command above. - 3-14 Installation Error Messages 3.10 Installation Error Messages While invoking the debugger, you may see one of the following messages: CANNOT INITIALIZE THE TARGET SYSTEM ! ! - Check I/O configuration - Check cabling and target power CANNOT DETECT TARGET POWER ! ! - Check I/O configuration - Check cabling and target power One or several of the following conditions may be the cause: - Is the target power on? Is the XDS510/XDS510PP board installed snugly? Is the device installed snugly? Is the cable connecting your emulator and target system loose? Is your target board getting the correct voltage? Is your emulator scan path interrupted? One or more devices on the emulator scan path may have been removed. Check the connections; either they are not connected, or they are connected improperly. Did you use the -n option? Was it used with an incorrect device name? You must supply a valid device name with the -n option. After you powered up the target board, did you execute the emurst/ emurstpp command? This command must be executed after you powered up the target board. Installing the Debugger With Windows 95 3-15 Installation Error Messages - Did you use the -p option? Is your port address correct (XDS510 only)? J J Check to be sure the -p option used with the D_OPTIONS environment variable matches the I/O address defined by your switch settings. For information about the switch settings, see the XDS510 installation instructions in the XDS51x Emulator Installation Guide. Check to see if you have a conflict in address space with another bus setting. If you have a conflict, change the switches on your board to one of the alternative settings. Modify the -p option of the D_OPTIONS environment variable to reflect the change in your switch settings. - Is the board.dat file in the current directory or in a directory specified by D_DIR? After you have checked all of the above, repeat the verification instructions on page 3-14. 3-16 Chapter 4 Installing the Debugger on a SPARCstation This chapter provides instructions for installing the TMS470R1x C source debugger on a SPARCstation running OpenWindowst under SunOSt version 4.1.x. After completing the installation, see the TMS470R1x C Source Debugger User's Guide. To install the emulator controller, see the XDS51x Emulator Installation Guide. Topic 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 Page System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Step 1: Installing the XDS510WS Emulator Controller . . . . . . . . . . . . 4-4 Step 2: Installing the Debugger Software . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Step 3: Ensuring That the Emulator Supports the Debugger . . . . . . 4-6 Step 4: Describing Your Target System to the Debugger . . . . . . . . . . 4-7 Step 5: Setting Up the Debugger Environment . . . . . . . . . . . . . . . . . . . 4-8 Step 6: Verifying the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11 Using the Debugger With the X Window System . . . . . . . . . . . . . . . . 4-12 Installing the Debugger on a SPARCstation 4-1 System Requirements 4.1 System Requirements To install the '470 C source debugger and TMS470R1x emulator, you need the items in the following hardware and software checklists. Hardware checklist System Display CD-ROM drive XDS510 emulator controller SPARCstation or 100%-compatible system Color monitor CD-ROM drive XDS510WSTM emulator controller Software checklist Operating system SunOS version 4.1.x or SunOS version 5.x (also known as SolarisTM 2.x) using an X Window SystemTM-based window manager, such as OpenWindows version 3.x. If you are running SunOS 4.1.x, 5.0, or 5.1, you must have root privileges to mount and unmount the CD-ROM. If you don't, get help from your system administrator. TMS470R1x assembler and linker Optional: TMS470R1x C compiler Root privileges Software tools Required files included with the debugger package emu470 is the debugger executable file. r470510ws.out is the executable portion of the debugger that runs on the emulator. emurst resets the emulator and downloads r470510ws.out to the emulator. board.dat describes your target board to your debugger in terms of what devices are in the emulation scan path. The board.dat file included in the debugger package is for a target board with one TMS470R1x named tms470. 4-2 System Requirements board.cfg is a text file used to describe your target system to the debugger in terms of what devices are on the emulation scan path. The board.cfg file included in the debugger package is for a target board with one TMS470R1x named tms470. The composer utility allows you to convert your text board configuration file (board.cfg) into a format the debugger can read (board.dat ). For the emulator to initialize properly, you must create a new board.dat file with this release of the composer or use the samples that are provided for you. Optional files included with the debugger package emuinit.cmd is a general-purpose batch file that contains debugger commands. The version of this file that is shipped with the debugger defines a '470 memory map. 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, see the TMS470R1x C Source Debugger User's Guide. Installing the Debugger on a SPARCstation 4-3 Step 1: Installing the XDS510WS Emulator Controller / Step 2: Installing the Debugger Software Step 1: Installing the XDS510WS Emulator Controller 4.2 Step 1: Installing the XDS510WS Emulator Controller Before installing the '470 debugger software, you must install an XDS510WS emulator controller. Follow the instructions in the XDS51x Emulator Installation Guide to install the XDS510WS emulator controller. 4.3 Step 2: Installing the Debugger Software This section explains how to install the debugger software on your hard disk system. The software package is shipped on CD-ROM. To install the emulator software, you must mount the CD-ROM, copy the files, and unmount the CD-ROM. Note: If you are running SunOS 4.1.x, 5.0, or 5.1, you must have root privileges to mount or unmount the CD-ROM. If you don't, get help from your system administrator. Mounting the CD-ROM The steps to mount the CD-ROM vary according to your operating system version: - If you have a SunOS 4.1.x, load the CD-ROM into the drive. As root, enter the following from a command shell: mount -rt hsfs /dev/sr0 /cdrom exit cd /cdrom/sparc If you have SunOS 5.0 or 5.1, load the CD-ROM into the drive. As root, enter the following from a command shell: mount -rF hsfs /dev/sr0 /cdrom exit cd /cdrom/cdrom0/sparc 4-4 Step 2: Installing the Debugger Software - If you have SunOS 5.2 or higher: J J If your CD-ROM drive is already attached, load the CD-ROM into the drive and enter the following from a command shell: cd /cdrom/cdrom0/sparc If you do not have a CD-ROM drive attached, you must shut down your system to the PROM level, attach the CD-ROM drive, and enter the following: boot -r After you log into your system, load the CD-ROM into the drive and enter the following from a command shell: cd /cdrom/cdrom0/sparc Copying the files After you mount the CD_ROM, you must create the directory that will contain the debugger software and copy the software to that directory. 1) Create a directory named emu470 on your hard disk. To create this directory, enter: mkdir /your_pathname/emu470 2) Copy the files from the CD-ROM to your hard-disk system: cp -r * /your_pathname/emu470 Unmounting the CD-ROM You must unmount the CD-ROM after copying the files. - If you have a SunOS 4.1.x, 5.0, or 5.1, as root, enter the following from a command shell: cd umount /cdrom eject /dev/sr0 exit - If you have SunOS 5.2 or higher, enter the following from a command shell: cd eject Installing the Debugger on a SPARCstation 4-5 Step 3: Ensuring That the Emulator Supports the Debugger 4.4 Step 3: Ensuring That the Emulator Supports the Debugger The ROM code for the XDS510WS does not contain the information necessary to communicate with the target; that code must be downloaded from the host. The emurst program downloads the necessary code for proper emulation. To run this program, enter the emurst command in the following format: emurst [-x] [-p port address] r470510ws.out The -x option tells the emurst utility to ignore any options specified with the D_OPTIONS environment variable. The -p option identifies the SCSI port address. r470510ws.out contains the information neccessary to communicate with the target. You can be sure that emurst succeeded when only the first and second LEDs from the left are on. For more information about XDS510WS LEDs, see the XDS51x Emulator Installation Guide. 4-6 Step 4: Describing Your Target System to the Debugger 4.5 Step 4: Describing Your Target System to the Debugger In order for the debugger to understand how you have configured your target system, you must supply a file for the debugger to read. You can either use the default configuration file, board.dat, or create your own file. - If you are using an emulation scan path that contains only one '470 and no other devices, you can use the board.dat file that comes with the '470 emulator kit. This file describes the single '470 in the scan path and gives the '470 the name tms470. Since the debugger automatically looks for a file called board.dat in the current directory and in the directories specified with the D_DIR environment variable, you don't need to create your own board configuration file. If you want to use a different name for the target device or you want the debugger to recognize a different target configuration, you must follow these steps: 1) Create the board configuration file. 2) Use composer to translate the board configuration file to binary so that the debugger can read it. 3) Specify the target processor name as stated in the configuration file. This name is used with the -n option when invoking the debugger. These steps are described in the TMS470R1x C Source Debugger User's Guide. - Installing the Debugger on a SPARCstation 4-7 Step 5: Setting Up the Debugger Environment 4.6 Step 5: Setting Up the Debugger Environment To ensure that your debugger works correctly, you must: - Modify the path shell variable to identify the emu470 directory. Set up the environment variables that you want to use. Invoke the new or modified .cshrc file. Modifying the path shell variable You must include the debugger directory in your shell path. To do this, you need to modify your shell configuration file in your home directory (for example, the .cshrc file for a C shell). Include the pathname to your emu470 directory in your path. The following statement is an example of what a typical path-variable definition looks like: set path = (. /bin /usr/ucb /usr/contrib/bin /usr/bin \ /usr/openwin/bin) The following is an example of a modified path variable. The part of the path that is boldface is an example of a pathname that identifies the emu470 directory: set path = (. /bin /usr/ucb /usr/contrib/bin /usr/bin \ /usr/openwin/bin /user/fred/emu470) 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. You can set up the environment variables in your shell configuration file. The debugger uses four environment variables, named D_DIR, D_SRC, D_OPTIONS, and DISPLAY: - Set up the D_DIR environment variable to identify the emu470 directory by defining the D_DIR environment variable: setenv D_DIR "/user/fred/emu470" (Be sure to enclose the directory name within quotes.) This directory contains auxiliary files (such as emuinit.cmd) that the debugger needs. Set up the D_SRC environment variable to identify any directories that contain program source files that you'll want to access from the debugger. The general format for doing this is: setenv D_SRC "pathname1;pathname2..." (Be sure to enclose the path names within one set of quotes.) For example, if your programs were in a directory named /user/fred/ emu470/samples, the D_SRC setup would be: setenv D_SRC "/user/fred/emu470/samples" 4-8 - Step 5: Setting Up the Debugger Environment - You can use several options when you invoke the debugger. If you use the same options repeatedly, it's convenient to specify them with D_OPTIONS. The general format for doing this is: setenv D_OPTIONS "[object filename] [debugger options]" (Be sure to enclose the options and filenames within one set of quotes.) This tells the debugger to load the specified object file and use the specified options each time you invoke the debugger. These are the options that you can identify with D_OPTIONS: Option -b[b] -bl -bw -c -f filename -font size -i pathname -me -min -n processor name Brief Description Select the screen size. Select screen length. Select screen width. Clear the .bss section. Identify a new board configuration file. Select font point size. Identify additional directories. Select little-endian format. Select the minimal debugging mode. Identify the processor for debugging (this processor name must match the processor name as stated in the configuration file). Identify the port address. Enter the profiling environment. Load the symbol table only. Identify a new initialization file. Load without the symbol table. -p port address -profile -s -t filename -v Note: Overriding D_OPTIONS You can override D_OPTIONS by invoking the debugger or emurst with the -x option. For more information about options, see the invocation section in the TMS470R1x C Source Debugger User's Guide. Installing the Debugger on a SPARCstation 4-9 Step 5: Setting Up the Debugger Environment - If you are using the X Window System, you can use the DISPLAY environment variable to display the debugger on a different machine from the one the debugger is running on. The general format for doing this is: setenv DISPLAY machine name For example, if you are running the debugger on a machine called opie and you want the debugger display to appear on a machine called barney, the DISPLAY setup would be: setenv DISPLAY barney:0 You can also display the debugger on a different machine by using the -d option when invoking the debugger. emu470 -d barney:0 For more information about using the debugger under the X Window system, see Section 4.8, Using the Debugger With the X Window System. Invoking the new or modified .cshrc file When you modify your shell configuration file, you must ensure that the changes are made to your current session. For example, if you are using a C shell, use this command to reread the .cshrc file: source ~/.cshrc 4-10 Step 6: Verifying the Installation 4.7 Step 6: Verifying the Installation To ensure that you have correctly installed the emulator and debugger software, enter this command at the system prompt: emu470 -p port address -n tms470 You should see a display similar to this one: emu470 (tms470) Load Break Watch Memory Color LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB MoDe Analysis Run=F5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, #- #- #- #- #- #- #- #- #- #- #- #- #- #- #- Step=F8 Next=F10 DISASSEMBLY 000000000 55555555 000000004 55555555 000000003 55555555 00000000c 55555555 000000010 55555555 000000014 55555555 000000013 55555555 00000001c 55555555 000000020 55555555 000000024 55555555 000000023 55555555 00000002c 55555555 000000030 55555555 000000034 55555555 000000033 55555555 COMMAND ARM7TDMI Silicone Revision 0.1.7 XDS510 Emulator Revision 1 CPU PC aaaaaaaa SP aaaaaaaa LR aaaaaaaa CPSR aaaaaaaa R0 aaaaaaaa R1 aaaaaaaa R2 aaaaaaaa R3 aaaaaaaa R4 aaaaaaaa R5 aaaaaaaa R6 aaaaaaaa R7 aaaaaaaa R8 aaaaaaaa R9 aaaaaaaa R10 aaaaaaaa WATCH STATUS_REGISTER 3: C-bit 1 4: V-bit 0 5: I-bit 1 6: F-bit 0 7: T-bit 1 8: MODE 0x0000000a 5 55555555 5 55555555 5 55555555 5 55555555 5 55555555 5 55555555 Memory map defined as: RAM tms470> 0- 80000, 512K - If you see a display similar to this one, you have correctly installed your emulator and debugger. If you do not see a display, then your debugger, board, or XDS510WS may not be installed properly. Go back through the installation instructions and be sure that you have followed each step correctly; then reenter the command above. If you continue to experience problems, see Appendix A, Workstation Troubleshooting. Installing the Debugger on a SPARCstation 4-11 Using the Debugger With the X Window System 4.8 Using the Debugger With the X Window System If you're using the X Window System to run the '470 debugger, you need to know about the keyboard's special keys, the debugger fonts, and using the debugger on a monochrome monitor. Using the keyboard's special keys The debugger uses some special keys that you can map differently from your particular keyboard. Some keyboards, such as the Sun Type 5 keyboard, have these special symbols on separate keys. Other keyboards, such as the Sun Type 4 keyboard, do not have the special keys, but the functions are available. The special keys that the debugger uses are shown in the following table with their corresponding keysym. A keysym is a label that interprets a keystroke; it allows you to modify the action of a key on the keyboard. Debugger Key Needed F1 Keysym for That Function F1 to F10 Prior Next Home End Insert Right Left Up Down to F10 PAGE UP PAGE DOWN HOME END INSERT Use the X utility xev to check the keysyms associated with your keyboard. If you need to change the keysym definitions, use the xmodmap utility. For example, you could create a file that contains the following commands and use that file with xmodmap to map a Sun Type 4 keyboard to the keys listed above: key code keysym keysym keysym keysym keysym keysym keysym keysym keysym keysym R13 Down F35 Left Right F27 Up F29 Insert = = = = = = = = = End Down Next Left Right Home Up Prior Insert Refer to your X Window System documentation for more information about using xev and xmodmap. 4-12 Using the Debugger With the X Window System Changing the debugger font You can change the font of the debugger screen by using the xrdb utility and modifying the .Xdefaults file in your root directory. For example, to change the '470 debugger fonts to Courier, add the following line to the .Xdefaults file: emu470*font:courier For more information about using xrdb to change the font, refer to your X Window System documentation. Color mappings on monochrome screens Although a color monitor is recommended, you can use a monochrome monitor. The following table shows the color mappings for monochrome screens: Color black blue green cyan red magenta yellow white Appearance on Monochrome Screen black black white white black black white white Installing the Debugger on a SPARCstation 4-13 4-14 Chapter 5 Installing the Debugger on an HP Workstation This chapter provides instructions for installing the TMS470R1x C source debugger on an HP 9000 Series 700TM PA-RISCTM computer with HP-UXTM 9.0x. After completing the installation, turn to the TMS470R1x C Source Debugger User's Guide. To install the emulator controller, see the XDS51x Emulator Installation Guide. Topic 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 Page System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 Step 1: Installing the XDS510WS Emulator Controller . . . . . . . . . . . . 5-4 Step 2: Installing the Debugger Software . . . . . . . . . . . . . . . . . . . . . . . . 5-4 Step 3: Ensuring That the Emulator Supports the Debugger . . . . . . 5-5 Step 4: Describing Your Target System to the Debugger . . . . . . . . . . 5-6 Step 5: Setting Up the Debugger Environment . . . . . . . . . . . . . . . . . . . 5-7 Step 6: Verifying the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 Using the Debugger With the X Window System . . . . . . . . . . . . . . . . 5-11 5-1 System Requirements 5.1 System Requirements To install the '470 C source debugger and TMS470R1x emulator, you need the items in the following hardware and software checklists. Hardware checklist System Display CD-ROM drive XDS510 emulator controller HP 9000 Series 700 PA-RISC computer Color monitor CD-ROM drive XDS510WS emulator controller 5-2 System Requirements Software checklist Operating system Root privileges Software tools Required files included with the debugger package HP-UX version 9.0x or higher You must have root privileges to mount and unmount the CD-ROM. If you don't, get help from your system administrator. TMS470R1x assembler and linker Optional: TMS470R1x C compiler emu470 is the debugger executable file. r470510ws.out is the executable portion of the debugger that runs on the emulator. emurst resets the emulator and downloads r470510ws.out to the emulator. board.dat describes your target board to your debugger in terms of what devices are on the emulation scan path. The board.dat file included in the debugger package is for a target board with one TMS470R1x named tms470. board.cfg is a text file used to describe your target system to the debugger in terms of what devices are on the emulation scan path. The board.cfg file included in the debugger package is for a target board with one TMS470R1x named tms470. The composer utility allows you to convert your text board configuration file (board.cfg) into a format the debugger can read (board.dat). For the emulator to initialize properly, you must create a new board.dat file with this release of the composer or use the samples that are provided for you. Optional files included with the debugger package emuinit.cmd is a general-purpose batch file that contains debugger commands. The version of this file that's shipped with the debugger defines a '470 memory map. 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, see the TMS470R1x C Source Debugger User's Guide. Installing the Debugger on an HP Workstation 5-3 Step 1: Installing the XDS510WS Emulator Controller / Step 2: Installing the Debugger Software Step 1: Installing the XDS510WS Emulator Controller 5.2 Step 1: Installing the XDS510WS Emulator Controller Before installing the '470 debugger software, you must install an XDS510WS emulator controller. Follow the instructions in the XDS51x Emulator Installation Guide to install the XDS510WS emulator controller. 5.3 Step 2: Installing the Debugger Software This section explains how to install the debugger software on your hard-disk system. The software package is shipped on a CD-ROM. To install the software, you must mount the CD-ROM, copy the files, and unmount the CDROM. Note: You must have root privileges to mount or unmount the CD-ROM. If you don't, get help from your system administrator. Mounting the CD-ROM As root, mount the CD-ROM using the UNIX mount command or the SAM (system administration manager): - To use the UNIX mount command, enter: mount -rt cdfs /dev/dsk/your_cdrom_device /cdrom exit Make the hp directory on the CD-ROM the current directory. For example, if the CD-ROM is mounted at /cdrom, enter: cd /cdrom/hp - To use SAM to mount the CD-ROM, see System Administration Tasks, the HP documentation about SAM, for instructions. 5-4 Step 2: Installing the Debugger Software / Step 3: Ensuring That the Emulator Supports the Debugger Copying the files After you have mounted the CD-ROM, you must create the directory that will contain the debugger software and copy the software to that directory. 1) Create a directory named emu470 on your hard disk. To create this directory, enter: mkdir /your_pathname/emu470 2) Copy the files from the CD-ROM to your hard-disk system: cp -r * /your_pathname/emu470 Unmounting the CD-ROM You must unmount the CD-ROM after copying the files. As root, enter: cd umount /cdrom exit 5.4 Step 3: Ensuring That the Emulator Supports the Debugger The ROM code for the XDS510WS does not contain the information necessary to communicate with the target; that code must be downloaded from the host. The emurst program downloads the necessary code for proper emulation. To run this program, enter the emurst command in the following format: emurst [-x] [-p port address] pathname-filename The -x option tells the emurst utility to ignore any options specified with the D_OPTIONS environment variable. The -p option identifies the SCSI port address. r470510ws.out contains the information necessary to communicate with the target. You can be sure that emurst succeeded when only the first and second LEDs from the left are on. For more information about XDS510WS LEDs, see the XDS51x Emulator Installation Guide. Installing the Debugger on an HP Workstation 5-5 Step 4: Describing Your Target System to the Debugger 5.5 Step 4: Describing Your Target System to the Debugger In order for the debugger to understand how you have configured your target system, you must supply a file for the debugger to read. You can either use the default configuration file, board.dat, or create your own file. - If you are using an emulation scan path that contains only one '470 and no other devices, you can use the board.dat file that comes with the '470 emulator kit. This file describes the single '470 in the scan path and gives the '470 the name tms470. Since the debugger automatically looks for a file called board.dat in the current directory and in the directories specified with the D_DIR environment variable, you don't need to create your own board configuration file. If you want to use a different name for the target device or you want the debugger to recognize a different target configuration, you must follow these steps: 1) Create the board configuration file. 2) Use composer to translate the board configuration file to binary so that the debugger can read it. 3) Specify the target processor name as stated in the configuration file. This name is used with the -n option when invoking the debugger. These steps are described in the TMS470R1x C Source Debugger User's Guide. - 5-6 Step 5: Setting Up the Debugger Environment 5.6 Step 5: Setting Up the Debugger Environment To ensure that your debugger works correctly, you must: - Modify the path shell variable to identify the emu470 directory. Set up the environment variables that you want to use. Invoke the new or modified .cshrc file. Modifying the path shell variable You must include the debugger directory in your shell path. To do this, you need to modify your shell configuration file in your home directory (for example, the .cshrc file for a C shell). Include the pathname to your emu470 directory in your path. The following statement is an example of what a typical path-variable definition looks like: set path = (. /bin /usr/ucb /usr/contrib/bin /usr/bin \ /usr/openwin/bin) The following is an example of a modified path variable. The part of the path that is boldface is an example of a pathname that identifies the emu470 directory: set path (. /bin /usr/ucb /usr/contrib/bin /usr/bin \ /usr/openwin/bin /user/fred/emu470) 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. You can set up the environment variables in your shell configuration file. The debugger uses four environment variables, named D_DIR, D_SRC, D_OPTIONS, and DISPLAY: - Set up the D_DIR environment variable to identify the emu470 directory by defining the D_DIR environment variable: setenv D_DIR "/user/fred/emu470" (Be sure to enclose the directory name within quotes.) This directory contains auxiliary files (such as emuinit.cmd) that the debugger needs. Set up the D_SRC environment variable to identify any directories that contain program source files that you'll want to look at while you're debugging source code. The general format for doing this is: setenv D_SRC "pathname1;pathname2;..." (Be sure to enclose the path names within one set of quotes.) For example, if your programs were in a directory named /user/fred/ emu470/samples, the D_SRC setup would be: setenv D_SRC "/user/fred/emu470/samples" Installing the Debugger on an HP Workstation 5-7 - Step 5: Setting Up the Debugger Environment - You can use several options when you invoke the debugger. If you use the same options repeatedly, it's convenient to specify them with D_OPTIONS. The general format for doing this is: setenv D_OPTIONS "[object filename] [debugger options]" (Be sure to enclose the options and filenames within one set of quotes.) This tells the debugger to load the specified object file and use the specified options each time you invoke the debugger. These are the options that you can identify with D_OPTIONS: Option -b[b] -bl -bw -c -f filename -font size -i pathname -me -min -n processor name Brief Description Select the screen size. Select screen length. Select screen width. Clear the .bss section. Identify a new board configuration file. Select font point size. Identify additional directories. Select little-endian format. Select the minimal debugging mode. Identify the processor for debugging (this processor name must match the processor name as stated in the configuration file). Identify the port address. Enter the profiling environment. Load the symbol table only. Identify a new initialization file. Load without the symbol table. -p port address -profile -s -t filename -v Note: Overriding D_OPTIONS You can override D_OPTIONS by invoking the debugger or emurst with the -x option. For more information about options, see the invocation instructions in the TMS470R1x C Source Debugger User's Guide. 5-8 Step 5: Setting Up the Debugger Environment - If you are using the X Window System, you can use the DISPLAY environment variable to display the debugger on a different machine from the one the debugger is running on. The general format for doing this is: setenv DISPLAY machine name For example, if you are running the debugger on a machine called opie and you want the debugger display to appear on a machine called barney, the DISPLAY setup would be: setenv DISPLAY barney:0 You can also display the debugger on a different machine by using the -d option when invoking the debugger. emu470 -d barney:0 For more information about using the debugger under the X Window system, see Section 5.8, Using the Debugger With the X Window System. Invoking the new or modified .cshrc file When you modify your shell configuration file, you must ensure that the changes are made to your current session. For example, if you are using a C shell, use this command to reread the .cshrc file: source ~/.cshrc Installing the Debugger on an HP Workstation 5-9 Step 6: Verifying the Installation 5.7 Step 6: Verifying the Installation To ensure that you have correctly installed the emulator and debugger software, enter this command at the system prompt: emu470 -p port address -n tms470 You should see a display similar to this one: emu470 (tms470) Load Break Watch Memory Color LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB LDRPLB MoDe Analysis Run=F5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 R5 [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, [R5, #- #- #- #- #- #- #- #- #- #- #- #- #- #- #- Step=F8 Next=F10 DISASSEMBLY 000000000 55555555 000000004 55555555 000000003 55555555 00000000c 55555555 000000010 55555555 000000014 55555555 000000013 55555555 00000001c 55555555 000000020 55555555 000000024 55555555 000000023 55555555 00000002c 55555555 000000030 55555555 000000034 55555555 000000033 55555555 COMMAND ARM7TDMI Silicone Revision 0.1.7 XDS510 Emulator Revision 1 CPU PC aaaaaaaa SP aaaaaaaa LR aaaaaaaa CPSR aaaaaaaa R0 aaaaaaaa R1 aaaaaaaa R2 aaaaaaaa R3 aaaaaaaa R4 aaaaaaaa R5 aaaaaaaa R6 aaaaaaaa R7 aaaaaaaa R8 aaaaaaaa R9 aaaaaaaa R10 aaaaaaaa WATCH STATUS_REGISTER 3: C-bit 1 4: V-bit 0 5: I-bit 1 6: F-bit 0 7: T-bit 1 8: MODE 0x0000000a 5 55555555 5 55555555 5 55555555 5 55555555 5 55555555 5 55555555 Memory map defined as: RAM tms470> 0- 80000, 512K - If you see a display similar to this one, you have correctly installed your emulator and debugger. If you do not see a display, then your debugger, board, or XDS510WS may not be installed properly. Go back through the installation instructions and be sure that you have followed each step correctly; then reenter the command above. If you continue to experience problems, see Appendix A, Workstation Troubleshooting. 5-10 Using the Debugger With the X Window System 5.8 Using the Debugger With the X Window System If you're using the X Window System to run the '470 debugger, you need to know about the keyboard's special keys, the debugger fonts, and using the debugger on a monochrome monitor. Using the keyboard's special keys The debugger uses some special keys that you can map differently from your particular keyboard. Some keyboards, such as the Sun Type 5 keyboard, have these special symbols on separate keys. Other keyboards, such as the Sun Type 4 keyboard, do not have the special keys, but the functions are available. The special keys that the debugger uses are shown in the following table with their corresponding keysym. A keysym is a label that interprets a keystroke; it allows you to modify the action of a key on the keyboard. Debugger Key Needed F1 Keysym for That Function F1 to F10 Prior Next Home End Insert Right Left Up Down to F10 PAGE UP PAGE DOWN HOME END INSERT Use the X utility xev to check the keysyms associated with your keyboard. If you need to change the keysym definitions, use the xmodmap utility. For example, you could create a file that contains the following commands and use that file with xmodmap to map a Sun Type 4 keyboard to the keys listed above: key code keysym keysym keysym keysym keysym keysym keysym keysym keysym keysym R13 Down F35 Left Right F27 Up F29 Insert = = = = = = = = = End Down Next Left Right Home Up Prior Insert Refer to your X Window System documentation for more information about using xev and xmodmap. Installing the Debugger on an HP Workstation 5-11 Using the Debugger With the X Window System Changing the debugger font You can change the font of the debugger screen by using the xrdb utility and modifying the .Xdefaults file in your root directory. For example, to change the '470 debugger fonts to Courier, add the following line to the .Xdefaults file: emu470*font:courier For more information about using xrdb to change the font, refer to your X Window System documentation. Color mappings on monochrome screens Although a color monitor is recommended, you can use a monochrome monitor. The following table shows the color mappings for monochrome screens: Color black blue green cyan red magenta yellow white Appearance on Monochrome Screen black black white white black black white white 5-12 Appendix A Appendix A Workstation Troubleshooting This chapter describes some common problems you may encounter while using your emulator or debugger on your SPARCstation or HP workstation. Topic A.1 A.2 A.3 A.4 A.5 Page Problems When Booting Your Workstation . . . . . . . . . . . . . . . . . . . . . . A-2 Problems With Multiple Emulators on SunOS . . . . . . . . . . . . . . . . . . . A-2 Problems When Resetting the Emulator . . . . . . . . . . . . . . . . . . . . . . . . A-3 Problems When Invoking the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . A-5 Additional Emulator and Debugger Problems . . . . . . . . . . . . . . . . . . . A-7 A-1 Problems When Booting Your Workstation / Problems With Multiple Emulators on SunOS Problems When Booting Your Workstation A.1 Problems When Booting Your Workstation After installing your emulator, problems may occur when you attempt to boot your workstation. The following are typical problems and suggestions to help resolve these problems: - Your workstation will not boot when connected to your emulator, even if your emulator is not turned on. 1) Be sure that all of your SCSI cables are connected securely and that the SCSI bus is terminated properly. 2) Remove any unnecessary SCSI devices from the bus. 3) Make sure that the total length of the SCSI bus is less than six meters, including the section of the bus within the SPARCstation chassis. - Your workstation will boot when the emulator is turned off but will not boot when the emulator is turned on. Your emulator's SCSI ID conflicts with the SCSI ID of another device on the SCSI bus. For more information, see the XDS51x Emulator Installation Guide. A.2 Problems With Multiple Emulators on SunOS When you have multiple emulators running constantly, they may consume most of the CPU time. To overcome this situation, run the emulators at a lower priority using the UNIX nice command. See the man page entry on nice for more information. A-2 Problems When Resetting the Emulator A.3 Problems When Resetting the Emulator After you power up the emulator and the workstation, and if you have the following problems while attempting to reset the emulator, implement the applicable solutions: - When you execute the emurst command, you receive this message: emurst file [.out]: You forgot to specify the pathname-filename of the r470510ws.out file. You can specify it at this prompt or you can reeducate emurst with pathname-filename specified on the command line. - When executing the emurst command, you receive this message: >> can't initialize the target system 1) You haven't set the IPCSEMAPHORE option to allow the debugger to access the emulator. Be sure that the configuration file, EMULATOR, has the options line set correctly, without comments. Then, use the corrected configuration file to build the currently executing kernel (see the XDS510WS installation instructions in the XDS51x Emulator Installation Guide for more information). 2) There are too many current semaphores on the system. Clean up the unused semaphores by using the ipcs -st and ipcrm utilities, and try to execute emurst again. 3) You may not have permission to access the driver file you specified with the -p debugger option. Normally, you specify the -p debugger option on the command line or in the D_OPTIONS environment variable. Remember, if you haven't specifically reset the driver file number to another number, the default is 4. Have the root user execute the following command, and try to execute emurst again. chmod a+rw /dev/rsd#a 4) The driver file you specified with the -p debugger option is not correctly associated to your emulator in your configuration file. Make sure your configuration file contains a line similar to this: disk sd# at scsibus where # is the device driver number. The Workstation Troubleshooting A-3 Problems When Resetting the Emulator 5) You have not turned on the XDS510WS, or it has not completed its self test. Turn on the XDS510WS and wait for the self test to complete successfully before executing emurst. The self test has completed once the sixth LED from the left is off and the first, second, and fifth LEDs from the left are on. - When executing the emurst command, you receive this message: >> error loading file 1) The emurst utility can't find the r470510ws.out file as specified. If you didn't specify the pathname-filename with an extension as part of the name, the emurst utility appends the default extension .out to the name. 2) If you didn't provide path information (just the filename), emurst searches first in the current directory and then in all of the directories specified in the D_DIR environment variable before returning this error. Make sure the correct file is located where emurst can find it. 3) The file that you specified to emurst is not appropriate for this use. Use the r470510ws.out file that is included with the debugger software. A-4 Problems When Invoking the Debugger A.4 Problems When Invoking the Debugger If you encounter these problems when you invoke the debugger, the suggested solutions may resolve the problems: - You receive the following message when executing the emu470 command: CANNOT INITIALIZE THE TARGET !! - Check I/O configuration - Check cabling and target power 1) The emurst command didn't successfully execute before you tried to invoke the debugger. Execute emurst (see Section 4.4, Step 3: Ensuring That the Emulator Supports the Debugger, on page 4-6 for SPARCstations and Section 5.4, Step 3: Ensuring That the Emulator Supports the Debugger, on page 5-5, for HP workstations). The emurst has completed successfully if you see your command prompt after this message: EMURST for XDS510WS loading where H If you didn't provide any path information with the filename, the debugger could not find the file in the current directory or in any of the directories listed in the D_DIR environment variable. H If you didn't provide the correct path information, reexecute the debugger, specifying the correct pathname and filename for the board configuration file. Workstation Troubleshooting A-5 Problems When Invoking the Debugger 4) One of these two problems could exist: H You didn't specify -n tms470 debugger option. H The debugger couldn't find the tms470 that you specified with the -n option in your board configuration file. Re-execute the debugger with the -n debugger option, specifying the name of a '470 device from the board configuration file. 5) You may not have described your target system correctly in the board configuration file that you specified with the -f debugger option on the command line or in the D_OPTIONS environment variable. Review your board configuration file and correctly describe the target system. 6) Make sure that your emulation cable is firmly attached both to the XDS510WS and to your target system. 7) Make sure that your target system is receiving sufficient power at the required voltage to allow all devices on the board to work properly. - You receive the following message at the operating-system command line when trying to execute the emu470 command: emu470: display :0.0 doesn't know font 7x14 The default font file that the debugger uses (7x14.ff) couldn't be found by OpenWindows. OpenWindows searches for these font files in the directories specified in the FONTPATH environment variable. To correct the problem, do one of the following: J J J Add the font file 7x14.ff to a directory defined in the FONTPATH environment variable. Add to the .Xdefaults file in your home directory the line "emu470*font: GoodFontName", where GoodFontName is the name of a font that OpenWindows can find. Copy a valid font file onto 7x14.ff. A-6 Additional Emulator and Debugger Problems A.5 Additional Emulator and Debugger Problems The operating-system window displays operating-system messages. These messages differ from the error messages that you may see in the COMMAND window of the debugger. If you receive one of these operating-system messages while executing emu470 or emurst under SunOS 4.1.x, refer to the following explanations. These messages are status messages, not error messages. - |
Price & Availability of SPNU123B
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |