83
Getting Started Guide 1996 Microprocessor Development Systems

Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

������ �������� ���� � ���� ���������� ������������ ����

GettingStarted Guide

1996 Microprocessor Development Systems

Page 2: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Printed in U.S.A., March 1996D413001-9741 revision C

SPRU119A

Page 3: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

TMS320 Floating-PointCode Generation ToolsGetting Started Guide

Release 4.70

SPRU119March 1996

Printed on Recycled Paper

Page 4: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Running Title—Attribute Reference

ii

IMPORTANT NOTICE

Texas Instruments (TI) reserves the right to make changes to its products or to discontinue anysemiconductor product or service without notice, and advises its customers to obtain the latestversion of relevant information to verify, before placing orders, that the information being reliedon is current.

TI warrants performance of its semiconductor products and related software to the specificationsapplicable at the time of sale in accordance with TI’s standard warranty. Testing and other qualitycontrol 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 thosemandated 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, ORWARRANTED TO BE SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICESOR 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 SCsales office.

In order to minimize risks associated with the customer’s applications, adequate design andoperating safeguards should be provided by the customer to minimize inherent or proceduralhazards.

TI assumes no liability for applications assistance, customer product design, softwareperformance, or infringement of patents or services described herein. Nor does TI warrant orrepresent 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 1996, Texas Instruments Incorporated

Page 5: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

iii

Preface

Read This First

About This Manual

The TMS320 Floating-Point Code Generation Tools Getting Started Guidetells you how to install release 4.70 of the TMS320 floating-point code genera-tion tools on your system. It also does the following:

� Tells you how to set environment variables for parameters that you useoften

� Provides you with a list of the media contents for your tools set, so you willknow what information is associated with each file you’ve installed

� Gets you started using the compiler, linker, and assembler

� Describes how you can resolve problems that you may encounter on aPC running DOS (MS-DOS or PC-DOS )

This release includes:

� Enhanced ability to compile and assemble large programs with MS-DOSusing an 80386 or 80486 personal computer and the new DOS extender

� Fixes for all known bugs

� New optimizer for superior file-level optimizations

� Loop optimization improvement

� TMS320C4x-specific instructions

� New hex conversion utility with enhanced flexibility

Page 6: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

How to Use This Manual / Notational Conventions

iv

How to Use This Manual

The goal of this book is to get you started using the development tools specifi-cally designed for the TMS320 floating-point DSPs. Following are the topicscovered in this user’s guide:

For information about … Refer to …

Installing the code generation tools, setting environment variables,or getting started using the tools

Chapter 1

Media contents and release notes Chapter 2

Troubleshooting DOS systems Appendix A

Accessing TMS320C3x peripherals through C pointers Appendix B

Notational Conventions

In this document, the following notational conventions are used:

� Commands are in a bold typeface and parameters are in an italic type-face:

� Portions that are in bold should be entered as shown.

� Portions that are in italics describe the type of information that shouldbe entered.

Here is an example of a command that you might use:

mkdir tool_dir

In this example, you should type mkdir as shown and replace tool_dir withthe name of your directory.

� Square brackets ( [ and ] ) identify an optional parameter. If you use anoptional parameter, you specify the information within the brackets; youdon’t enter the brackets themselves. Here’s an example of a commandthat has optional parameters:

set DOS4GVM= [option[#value] ] [option[#value] ] ...

This command allows you to specify one or more options and to indicatevalues with each option, if appropriate. In this example, you must includethe # symbol if you enter a value.

Page 7: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Related Documentation From Texas Instruments

v Read This First

Related Documentation From Texas Instruments

The following books describe the TMS320 floating-point DSPs and relatedsupport tools. To obtain a copy of any of these TI documents, call the TexasInstruments Literature Response Center at (800) 477–8924. When ordering,please identify the book by its title and literature number.

TMS320 Floating-Point DSP Assembly Language Tools User’s Guide (lit-erature number SPRU035) describes the assembly language tools (as-sembler, linker, and other tools used to develop assembly languagecode), assembler directives, macros, common object file format, andsymbolic debugging directives for the ’C3x and ’C4x generations of de-vices.

TMS320 Floating-Point DSP Optimizing C Compiler User’s Guide (litera-ture number SPRU034) describes the TMS320 floating-point C compiler.This C compiler accepts ANSI standard C source code and producesTMS320 assembly language source code for the ’C3x and ’C4x genera-tions of devices.

TMS320C3x C Source Debugger User’s Guide (literature numberSPRU053) tells you how to invoke the ’C3x emulator, evaluation module,and simulator versions of the C source debugger interface. This bookdiscusses various aspects of the debugger interface, including windowmanagement, command entry, code execution, data management, andbreakpoints. It also includes a tutorial that introduces basic debuggerfunctionality.

TMS320C30 Evaluation Module Technical Reference (literature numberSPRU069) describes board-level operation of the TMS320C30 EVM.

TMS320C3x User’s Guide (literature number SPRU031) describes the ’C3x32-bit floating-point microprocessor (developed for digital signal proces-sing as well as general applications), its architecture, internal registerstructure, instruction set, pipeline, specifications, and DMA and serialport operation. Software and hardware applications are included.

TMS320C4x C Source Debugger User’s Guide (literature numberSPRU054) tells you how to invoke the ’C4x emulator and simulator ver-sions of the C source debugger interface. This book discusses variousaspects of the debugger interface, including window management, com-mand entry, code execution, data management, and breakpoints. It alsoincludes a tutorial that introduces basic debugger functionality.

TMS320C4x User’s Guide (literature number SPRU063) describes the ’C4x32-bit floating-point processor, developed for digital signal processing aswell as parallel processing applications. Covered are its architecture, in-ternal register structure, instruction set, pipeline, specifications, and op-eration of its six DMA channels and six communication ports.

Page 8: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

If You Need Assistance / Trademarks

vi

If You Need Assistance. . .

If you want to. . . Do this. . .

Request more information aboutTexas Instruments Digital SignalProcessing (DSP) products

Write to:Texas Instruments IncorporatedMarket Communications Manager, MS 736P.O. Box 1443Houston, Texas 77251–1443

Order Texas Instrumentsdocumentation

Call the TI Literature Response Center:(800) 477–8924

Ask questions about productoperation or report suspectedproblems

Call the DSP hotline:(713) 274–2320FAX: (713) 274–2324

Report mistakes in this documentor any other TI documentation

Please mention the full title of thebook and the date of publicationin your correspondence.

Send your comments to:

[email protected]

or

Texas Instruments IncorporatedTechnical Publications Manager, MS 702P.O. Box 1443Houston, Texas 77251–1443

Trademarks

DOS/4G is a trademark of Tenberry Software, Inc.

HP 9000 Series 700, PA-RISC, and HP-UX are trademarks of Hewlett-Packard Company.

IBM, OS/2, OS/2 Warp, PC DOS, and PC are trademarks of International Busi-ness Machines Corp.

MS-DOS, MS-Windows, Windows NT, and Windows 95 are registered trade-marks of Microsoft Corp.

OpenWindows, SunOS, and Solaris are trademarks of Sun Microsystems, Inc.

Pentium is a trademark of Intel Corporation.

SPARCstation is licensed exclusively to Sun Microsystems, Inc.

UNIX is a registered trademark of Unix System Laboratories, Inc.

Page 9: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Contents

vii

Contents

1 Getting Started With the Code Generation Tools 1-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Describes the code generation tools and provides definitions for terms used in this guide.

1.1 Understanding the Terms and Acronyms 1-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Terminology 1-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.2 Installing and Using the Code Generation Tools on a SPARCstation 1-4. . . . . . . . . . . . . . . System requirements 1-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a tools directory 1-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mounting the CD-ROM 1-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting up the software tools 1-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unmounting the CD-ROM 1-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.3 Installing and Using the Code Generation Tools on an HP Workstation 1-6. . . . . . . . . . . . . System requirements 1-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a tools directory 1-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mounting the CD-ROM 1-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting up the software tools 1-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unmounting the CD-ROM 1-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.4 Installing and Using the Code Generation Tools on a PC With MS-DOS 1-8. . . . . . . . . . . . System requirements 1-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing the software tools 1-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Performance considerations 1-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.5 Installing and Using the Code Generation Tools on a PC WithWindows NT or Windows 95 1-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System requirements 1-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing the software tools 1-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.6 Installing and Using the Code Generation Tools on a PC With OS/2 1-11. . . . . . . . . . . . . . System requirements 1-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing the software tools 1-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.7 Using Environment Variables 1-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting environment variables in your system initialization file 1-12. . . . . . . . . . . . . . . . . . . . Naming directories for the assembler to search: A_DIR 1-12. . . . . . . . . . . . . . . . . . . . . . . . . Naming directories for the compiler to search: C_DIR 1-14. . . . . . . . . . . . . . . . . . . . . . . . . . Setting shell default options: C_OPTION 1-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using virtual memory: DOS4GVM (MS-DOS only) 1-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Removing the DOS/4GW Professional banner: DOS4G (MS-DOS only) 1-17. . . . . . . . . . Specifying a temporary-file directory: TMP 1-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.8 Assembler and Linker Walkthrough 1-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.9 C Compiler Walkthrough 1-24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 10: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Contents

viii

2 Release Notes 2-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Provides information on tools and new features revised since the last release, including allenhancements made to the TMS320 floating-point DSP assembly language tools and optimiz-ing C compiler.

2.1 Media Contents 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Release Enhancements 2-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Undocumented Features 2-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Options 2-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The .sfloat assembler directive 2-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The DATA_SECTION pragma directive 2-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TMS320C32 support for 8-bit and 16-bit heaps 2-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The ti_sprintf runtime support function 2-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.4 Errors in the 1995 TMS320 Floating-Point DSP Optimizing C CompilerUser’s Guide 2-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.5 Errors in the 1995 TMS320 Floating-Point DSP Assembly Language ToolsUser’s Guide 2-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.6 Useful Tips 2-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A Troubleshooting DOS Systems A-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Describes how to determine the configuration of your system; lists kernel and DOS/4G errormessages and explains how you can resolve them.

A.1 Troubleshooting in the Protected-Mode Environment A-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . The PMINFO.EXE program A-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The RMINFO.EXE program A-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A.2 Kernel Error Messages A-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.3 DOS/4GW Professional Error Messages A-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

B Tables of Peripheral Registers, Structure-Member Names, and Bit-Field Names B-1. . . . . . Lists the data structure member names that are used to access each of the peripheral registersand bit fields through C peripheral pointers. This appendix is provided as an update to theparallel runtime-support table.

Page 11: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Running Title—Attribute Reference

ix Contents

Tables

2–1 Media Contents for PC Systems 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2 Media Contents for SPARCstations and HP Workstations 2-3. . . . . . . . . . . . . . . . . . . . . . . . . . A–1 PMINFO Fields A-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A–2 RMINFO Fields A-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B–1 Bus-Control Registers B-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B–2 DMA-Control Registers B-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 12: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Running Title—Attribute Reference

x

Examples

1–1 filea.asm 1-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2 fileb.asm 1-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–3 fileb.lst, the Listing File Created by asm30 fileb.asm 1-20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–4 Output Map File, linkerb.map 1-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–5 Sample Linker Command File, linkerb.cmd 1-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6 Linker Map File Using Linker Command File linkerb.cmd 1-23. . . . . . . . . . . . . . . . . . . . . . . . . . 1–7 Sample C File for the C Compiler Walkthrough, function.c 1-24. . . . . . . . . . . . . . . . . . . . . . . . . 1–8 Diagnostic Messages Produced by the Compiler 1-25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1 Pragma Directive Example 2-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B–1 Bus Control B-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B–2 DMA Control B-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 13: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Running Title—Attribute Reference

1-1 Chapter Title—Attribute Reference

Getting Started Withthe Code Generation Tools

This package contains release 4.70 of the TMS320 floating-point DSP codegeneration tools, a follow-up to release 4.50 and 4.60 of the tools. Release4.70 produces object code that is 100% compatible with object code producedby release 4.50 and 4.60. You can install the code generation tools on the fol-lowing systems:

� PC (80386 or later) running DOS (MS-DOS or PC-DOS), OS/2 (version2.x or OS/2 Warp ), Windows NT , or Windows 95 with at least 4Mbytes of RAM (16 Mbytes of RAM is recommended to maximize perfor-mance)

� SPARCstation running SunOS version 4.1.x or 5.x (SunOS 5.x is alsoknown as Solaris 2.x)

� HP 9000 series 700 PA-RISC computer running HP-UX 9.0x

Topic Page

1.1 Understanding the Terms and Acronyms 1-2. . . . . . . . . . . . . . . . . . . . . . . .

1.2 Installing and Using the Code Generation Tools on aSPARCstation 1-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.3 Installing and Using the Code Generation Tools on an HP Workstation 1-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.4 Installing and Using the Code Generation Tools on aPC With MS-DOS 1-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.5 Installing and Using the Code Generation Tools on aPC With Windows NT or Windows 95 1.5. . . . . . . . . . . . . . . . . . . . . . . . . . .

1.6 Installing and Using the Code Generation Tools on aPC With OS/2 1-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.7 Using Environment Variables 1-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.8 Assembler and Linker Walkthrough 1-19. . . . . . . . . . . . . . . . . . . . . . . . . . .

1.9 C Compiler Walkthrough 1-24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 1

Page 14: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Understanding the Terms and Acronyms

1-2

1.1 Understanding the Terms and Acronyms

The assembly language tools are composed of the following:

� Archiver� Assembler� Cross-reference lister� Hex conversion utility� Linker

The C compiler tools include:

� Compiler shell program� Code generator� Interlist utility� Library-build utility� Optimizer� Parser� Miscellaneous libraries

Terminology

DOS/16M: Executable filename for a tool that is embedded in the TMS320floating-point DSP code generation tools. You may occasionally see thisterm in an error message. If so, see Appendix A, Troubleshooting DOSSystems.

DOS/4G�: The base version for DOS/4GW Professional. You may occa-sionally see this term in an error message. If so, see Appendix A, Trou-bleshooting DOS Systems.

DOS/4GW Professional: A memory extender embedded in the object files.Error messages from DOS/4GW Professional are included in Appen-dix A of this manual to assist you in debugging. The executableDOS/4GW Professional file is not shipped separately but is embeddedwithin the other executables. When an error message suggests rebuild-ing, you should reload the tools instead. If you do not understand an errormessage, contact TMS320 technical support for assistance.

environment variables: System symbols that you define and assign to astring. They are usually included in various batch files, such asAUTOEXEC.BAT. For more information, see Section 1.7.

protected-mode programs: 32-bit extended MS-DOS programs. Theseprograms require an extended memory manager and run only on ’386,’486, and Pentium-based PCs. Protected-mode programs can utilize allof the computer’s available RAM.

Page 15: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Understanding the Terms and Acronyms

1-3 Getting Started With the Code Generation Tools

real mode : 16-bit native MS-DOS mode. This mode limits the availablememory to 640K bytes. Calls to DOS may involve switching from pro-tected to real mode. The real mode tools are not supported in this re-lease.

swap file: The file where virtual memory is allocated.

virtual memory : The ability for a program to use more memory than a com-puter actually has available as RAM. This is accomplished by using aswap file on disk to augment RAM. When RAM is insufficient, the systemswaps out part of the program to a disk file until the part is needed again.The combination of the swap file and available RAM is virtual memory.The TMS320 floating-point tools use the DOS/4GW Professionalmemory extender to provide virtual memory management. This memoryextender is not provided as an executable but is embedded in several ofthe TMS320 object files.

Page 16: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Installing and Using the Code Generation Tools on a SPARCstation

1-4

1.2 Installing and Using the Code Generation Tools on a SPARCstation

Release 4.70 of the floating-point code generation tools is compatible withSunOS versions 4.1.x (or higher) and SunOS 5.x, also known as Solaris 2.x.

This release is dynamically linked to take advantage of shared libraries.

System requirements

To install the TMS320 floating-point code generation tools on a SPARCstation,you’ll need the following:

� A SPARCstation or compatible system with SPARCstation 2 class orhigher performance

� A CD-ROM drive

� OpenWindows version 3.0 (or higher) running under SunOS version 4.1.x(or higher). If you are using SunOS 5.x (also known as Solaris 2.x), youmust have the Binary Compatibility Package (BCP) installed; if you don’t,get your system administrator’s help.

� 4M bytes of disk space for the software tools

� Root privileges to mount and unmount the CD-ROM if you haveSunOS 4.1.x, SunOS 5.0, or SunOS 5.1

Creating a tools directory

If you don’t already have a tools directory, create one. Enter:

% mkdir tool_dir

Mounting the CD-ROM

The steps to mount the CD-ROM vary according to your operating-system ver-sion:

� If you have SunOS 4.1.x, as root, load the CD-ROM into the drive and en-ter 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, as root, load the CD-ROM into the drive andenter the following from a command shell:

# mount –rF hsfs /dev/sr0 /cdrom # exit % cd /cdrom/cdrom0/sparc

Page 17: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Installing and Using the Code Generation Tools on a SPARCstation

1-5 Getting Started With the Code Generation Tools

� If you have Sun OS 5.2 or higher:

� If your CD-ROM drive is already attached, load the CD-ROM into thedrive 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 yoursystem to the PROM level and attach the CD-ROM drive. As root, en-ter the following:

# boot –r

After you log into your system, load the CD-ROM into the drive andenter the following from a command shell:

% cd /cdrom/cdrom0/sparc

Setting up the software tools

Be sure you are not logged on as root. Enter:

% cp –r * tool_dir % setenv C_DIR ” tool_dir ” % setenv A_DIR ” tool_dir ” % set path=( tool_dir $path)

You can move the setenv and set path commands into your .login or .cshrcfile to avoid entering these commands each time you invoke a new shell.

Unmounting the CD-ROM

You must unmount the CD-ROM after copying the files.

� If you have SunOS 4.1.x or SunOS 5.0 or 5.1, as root, enter the followingfrom a command shell:

# cd # umount /cdrom # eject /dev/sr0 # exit

� If you have SunOS 5.2 or higher, enter the following from a commandshell:

# cd # eject

Page 18: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Installing and Using the Code Generation Tools on an HP Workstation

1-6

1.3 Installing and Using the Code Generation Tools on an HP Workstation

You can install release 4.70 of the TMS320 floating-point code generationtools on an HP 9000 Series 700 PA-RISC computer with HP-UX 9.0x.

System requirements

To install the TMS320 floating-point code generation tools on a HP worksta-tion, you’ll need the following:

� An HP 9000 Series 700 PA-RISC computer� HP-UX 9.0x operating system� 4 Mbytes of disk space for the software tools� A CD-ROM drive� Root privileges to mount and unmount the CD-ROM

Creating a tools directory

If you don’t already have a tools directory, create one. Enter:

% mkdir tool_dir

Mounting the CD-ROM

As root, you can mount the CD-ROM using the UNIX mount command or theSAM (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/hp700

� To use SAM to mount the CD-ROM, see System Administration Tasks, theHP documentation about SAM, for instructions.

Page 19: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Installing and Using the Code Generation Tools on an HP Workstation

1-7 Getting Started With the Code Generation Tools

Setting up the software tools

You can use any type of shell that you wish to install the tools. These instruc-tions illustrate how to install the tools using a C shell.

% cp –r * tool_dir % setenv C_DIR ” tool_dir ” % setenv A_DIR ” tool_dir ” % set path=( tool_dir $path)

You can move the setenv and set path commands into your .login or .cshrcfile to avoid entering these commands each time you invoke a new shell.

Unmounting the CD-ROM

You must unmount the CD-ROM after copying the files. As root, enter:

# cd # umount /cdrom # exit

Page 20: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Installing and Using the Code Generation Tools on a PC With MS-DOS

1-8

1.4 Installing and Using the Code Generation Tools on a PC With MS-DOS

Release 4.70 of the TMS320 floating-point code generation tools supports ex-tended memory on MS-DOS. Extended memory lets you compile or assemblelarge files that could not be built previously under MS-DOS. Extended memoryis enabled by the DOS/4GW Professional memory extender from TenberrySoftware, Inc. (formerly Rational Systems, Inc.), which is embedded in theTMS320 floating-point code generation tools.

Release 4.70 of the floating-point code generation tools has been tested withMS-DOS 6.21, MS-Windows� 3.1, Windows NT 3.51, and Windows 95.

System requirements

Release 4.70 of the floating-point code generation tools requires an 80386-,80486-, or Pentium-based PC. The tools are not compatible with the 80286.

Note: Memory Needed

The code generation tools, when installed on a PC, require at least 4M bytesof memory, but you can expect some performance problems when using only4M bytes. 16M bytes is recommended. If the tools run very slowly or hang,this may be due to memory problems.

Each machine configuration is unique. You may want to free as muchmemory as possible before installing the tools, especially if you have lessthan 16 Mbytes.

Installing the software tools

The code generation tools package is shipped on 1.44-Mbyte disks. To installthe tools on an MS-DOS system, perform the following steps:

1) Make backups of the product disks.

2) Create a directory to contain the code generation tools. Enter the follow-ing:

md c:\ tool_dir

3) Copy the files from each diskette onto the hard disk. Put each productdisks into drive A and enter the following:

copy a:\dos32\*.* c:\ tool_dir

Page 21: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Installing and Using the Code Generation Tools on a PC With MS-DOS

1-9 Getting Started With the Code Generation Tools

4) Add the path of the code generation tools package to your DOS path. EditAUTOEXEC.BAT and find the line that includes PATH=. At the end of theline, type:

; c:\ tool_dir

For example, you may find a path statement that looks like this:

;path=c:\dos;c:\windows

After editing the line, this example path statement looks like this:

path=c:\dos;c:\windows;c:\tool_dir

5) Save the file, exit the editor, and reboot your PC.

6) You can set environment variables in your AUTOEXEC.BAT file. See Sec-tion 1.7, Using Environment Variables, (page 1-12) for more information.

Performance considerations

Performance has been enhanced in release 4.70 of the floating-point codegeneration tools. However, you may notice a speed degradation when you usethe code generation tools. Much of this speed degradation is due to the switchrate from protected to real mode necessitated by DOS calls. Higher-speedprocessors and later-generation processors in the 80386, 80486, and Pentiumseries minimize the time needed for this switch.

Virtual memory management (VMM) may also degrade system performance.It is recommended that VMM be enabled only for programs that cannot be builtwith VMM disabled.

If you encounter error messages when you use the code generation tools ona PC with MS-DOS, run PMINFO and RMINFO to determine the configurationof your system before you contact technical support. For more informationabout PMINFO and RMINFO, see Appendix A, Troubleshooting DOS Sys-tems.

Page 22: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Installing and Using the Code Generation Tools on a PC With Windows NT or Windows 95

1-10

1.5 Installing and Using the Code Generation Tools on a PC With Windows NT or Windows 95

Release 4.70 of the TMS320 floating-point DSP code generation tools sup-ports Windows NT 3.5 and Windows 95.

System requirements

Release 4.70 of the TMS320 floating-point DSP code generation toolsrequires an 80386-, 80486-, or Pentium-based PC. The tools are not compat-ible with the 80286.

Note: Memory Needed

The code generation tools, when installed on a PC under Windows NT orWindows 95, require at least 8M bytes of memory, but you can expect someperformance problems when using only 8M bytes. 16M bytes is recom-mended. If the tools run very slowly or hang, this may be due to memory prob-lems.

Installing the software tools

The code generation tools package is shipped on 1.44M byte disks. An NT di-rectory contains the 32-bit Windows executables on the product disks. Toinstall the tools on a Windows NT or Windows 95 system, perform the followingsteps:

1) Make backups of the product disks.

2) Start a DOS window.

3) Create a directory to contain the code generation tools. Enter the follow-ing:

md c:\ tool_dir

4) Copy the NT directory files from each diskette onto the hard disk. Put eachproduct disk into drive A and enter the following:

copy a:\nt\*.* c:\ tool_dir

5) You may want to set environment variables in your CONFIG.SYS orAUTOEXEC.BAT file. Refer to Section 1.7, page 1-12, for more informa-tion.

Page 23: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Installing and Using the Code Generation Tools on a PC With OS/2

1-11 Getting Started With the Code Generation Tools

1.6 Installing and Using the Code Generation Tools on a PC With OS/2

Release 4.70 of the TMS320 floating-point DSP code generation tools sup-ports OS/2 v2.x and OS/2 Warp releases. The code generation tools can beinvoked from an OS/2 command session (cmd.exe).

System requirements

Release 4.70 of the TMS320 floating-point DSP code generation toolsrequires an 80386-, 80486-, or Pentium-based PC. The tools are not compat-ible with the 80286.

Note: Memory Needed

The code generation tools, when installed on a PC, require at least 4M bytesof memory, but you can expect some performance problems when using only4M bytes. 16M bytes is recommended. If the tools run very slowly or hang,this may be due to memory problems.

Installing the software tools

The code generation tools package is shipped on 1.44M byte disks. An OS2V2directory contains the OS/2 executables on the product disks. To install thetools on an OS/2 system, perform the following steps:

1) Make backups of the product disks.

2) Start an OS/2 command session.

3) Create a directory to contain the code generation tools. Enter the follow-ing:

md c:\ tool_dir

4) Copy the OS2V2 directory from each diskette onto your hard disk. Puteach of the product disks in drive A and enter the following:

copy a:\os2v2\*.* c:\ tool_dir

5) Add the path of the code generation tools package to your path. Edit CON-FIG.SYS and find the line that includes PATH=. At the end of the line, type:

;c:\ tool_dir

Save the file, exit the editor, and reboot your PC.

6) You may want to set environment variables in your CONFIG.SYS file.Refer to Section 1.7, page 1-12, for more information.

Page 24: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Using Environment Variables

1-12

1.7 Using Environment Variables

Before or after you install the tools, you can define environment variables thatset certain code generation tool parameters you will normally use. An environ-ment variable is a system symbol that you define and assign to a string. Whenyou use environment variables, default values are set, making each individualinvocation of the tools simpler because these parameters are automaticallyspecified. When you invoke a tool, you can use command-line options to over-ride many of the defaults that are set with environment variables.

Setting environment variables in your system initialization file

To set environment variables in your system initialization file, enter the samecommands that you would enter on the command line in the file. The name ofthe system initialization file for your operating system is shown here:

Operating System Enter

DOS AUTOEXEC.BAT

OS/2, Windows NT,Windows 95

AUTOEXEC.BAT

UNIX with C shell .cshrc

The commands you use to set the environment variables in your system initial-ization file or on the command line are described in the following sections.

Naming directories for the assembler to search: A_DIR

The assembler uses the A_DIR environment variable to name alternate direc-tories that contain copy/include files or macro libraries. The command forassigning the environment variable is as follows:

Operating System Enter

PC set A_DIR= pathname ; another pathname ...

UNIX setenv A_DIR ” pathname ; another pathname ... ”

Page 25: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Using Environment Variables

1-13 Getting Started With the Code Generation Tools

The pathnames are directories that contain copy/include files or macro librar-ies. You can separate the pathnames with a semicolon or a blank. Once youset A_DIR, you can use the .copy, .include, or .mlib directive in assemblysource without specifying path information. If the assembler doesn’t find thefile in the directory that contains the current source file or in directories namedby the –i option, it searches the paths named by the A_DIR environment vari-able.

For more information on the –i option, see the –i Shell Option subsection in theTMS320 Floating-Point DSP Assembly Language Tools User’s Guide or theCompiler Options subsection in the TMS320 Floating-Point DSP OptimizingC Compiler User’s Guide.

For example, assume that a file called source.asm contains these statements:

copy ”copy1.asm”copy ”copy2.asm”

Assume that the files are stored in the following directories:

PC c:\tool_dir\files\copy1.asmc:\dsys\copy2.asm

UNIX /tool_dir/files/copy1.asm/dsys/copy2.asm

You could set up the search path with the commands shown in the followingtable:

Operating System Enter

PC set A_DIR=c:\dsysasm30 –ic:\tool_dir\files source.asm

UNIX setenv A_DIR /dsysasm30 –i/tool_dir/files source.asm

The assembler first searches for copy1.asm and copy2.asm in the currentdirectory because source.asm is in the current directory. Then, the assemblersearches in the directory named with the –i option and finds copy1.asm.Finally, the assembler searches the directory named with A_DIR and findscopy2.asm.

Note that the environment variable remains set until you reboot the system orreset the variable by entering one of these commands:

Operating System Enter

PC set A_DIR=

UNIX unsetenv A_DIR

Page 26: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Using Environment Variables

1-14

Naming directories for the compiler to search: C_DIR

The compiler uses the C_DIR environment variable to name alternatedirectories that contain #include files and libraries. For example, to specify adirectory for #include files and libraries, set C_DIR with one of thesecommands:

Operating System Enter

PC set C_DIR=c:\tool_dir\files

UNIX setenv C_DIR ”/tool_dir/files”

Once you set C_DIR, then you can include alt.h, found in the files directory, inthis way:

#include ”alt.h” or #include <alt.h>

and invoke the compiler without the –i option:

cl30 source.c

As a result, the compiler uses the path in the C_DIR environment variable tofind the #include file.

The pathnames specified with C_DIR are directories that contain #includefiles. You can separate pathnames with a semicolon or with blanks. In Csource, you can use the #include directive without specifying path information;instead, you can specify the path information with C_DIR.

The environment variable remains set until you reboot the system or reset thevariable by entering one of these commands:

Operating System Enter

PC set C_DIR=

UNIX unsetenv C_DIR

Page 27: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Using Environment Variables

1-15 Getting Started With the Code Generation Tools

Setting shell default options: C_OPTION

You may find it useful to set the compiler, assembler, and linker shell defaultoptions using the C_OPTION environment variable; if you do this, these de-fault options and/or input filenames are used every time you run the shell.

Setting up default options with the C_OPTION environment variable isespecially useful when you want to run the shell consecutive times with thesame set of options and/or input files. After the shell reads the entire commandline and the input filenames, it reads the C_OPTION environment variable andprocesses it.

Options specified in the environment variable are specified in the same wayand have the same meaning as they do on the command line. For example,if you want to always run quietly (the –q option), enable C source interlisting(the –s option), and link (the –z option), set up the C_OPTION environmentvariable as follows:

Operating System Enter

PC set C_OPTION=–qs –z

UNIX setenv C_OPTION ”–qs –z”

In the examples above, each time you run the shell, it runs the linker. Any op-tions following –z on the command line or in C_OPTION are passed to the link-er. This enables you to use the C_OPTION environment variable to specify de-fault compiler and linker options and then specify additional compiler and link-er options on the shell command line. If you have set –z in the environmentvariable and want to compile only, use the –c option of the shell. These addi-tional examples assume C_OPTION is set as shown above:

cl30 *.c ; compiles and linkscl30 –c *.c ; only compilescl30 *.c –z lnk32.cmd ; compiles and links using a

; command filecl30 –c *.c –z lnk32.cmd ; only compiles (–c overrides –z)

For more information on linker options, see the Linker Options section in theTMS320 Floating-Point DSP Assembly Language Tools User’s Guide.

Page 28: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Using Environment Variables

1-16

Using virtual memory: DOS4GVM (MS-DOS only)

Virtual memory management (VMM) allows protected-mode programs to usemore RAM than your computer actually has. The DOS4GVM environmentvariable is used to control VMM. You can set the DOS4GVM environment vari-able using the following format:

set DOS4GVM= [option[#value] ] [option[#value] ] ...

You must use the # symbol with options that take values; the DOS commandshell will not accept an equal sign in place of the # symbol.

Setting DOS4GVM to 1 causes the default values to be used for all options.

set DOS4GVM=1

The DOS4GVM options, with their default values, are:

MINMEM The minimum amount of memory managed by VMM inK bytes. The default is 1024K bytes.

MAXMEM The maximum amount of memory managed by VMM inK bytes. The default is all available memory, up to 64Mbytes.

SWAPMIN The minimum or initial size of the swap file in K bytes. Thedefault is 0. You may want to change this setting if youwant VMM to verify, at start up, that there is a certainamount of disk space available for a swap file.

SWAPINC The size by which the swap file grows in K bytes. Thedefault size is 4096K bytes. If you set this to 0, VMM willcreate a swap file equal in size to your VIRTUALSIZE set-ting.

SWAPNAME The swap file name and path. The default name is.\DOS4GVM.SWP. By default, the file is in working direc-tory. Specify the complete path name if you want to keepthe swap file in another directory or drive.

DELETESWAP Indicates whether the swap file is deleted when yourprogram exits. Program startup is quicker if the file is notdeleted. Use NODELETESWAP to set this behavior. Thedefault is DELETESWAP.

VIRTUALSIZE The size of the virtual memory space in K bytes. The de-fault is 16384K bytes.

Page 29: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Using Environment Variables

1-17 Getting Started With the Code Generation Tools

You can change the defaults in two ways:

1) Specify parameter values as arguments to the DOS4GVM environmentvariable, as shown in the example below. Note that you must have at least8192K bytes of free memory to use this example:

set DOS4GVM=deleteswap maxmem#8192 swapname#c:\swap.tmp

2) Create a configuration file with the filetype extension .VMC, and call thatfile as an argument to the DOS4GVM environment variable, as shownbelow:

set DOS4GVM=@C:\NEW4G.VMC

A .VMC file contains VMM parameters and settings as shown in the ex-ample below. You can include comments. Comments on lines by them-selves are preceded by an exclamation point (!). Comments that follow op-tion settings are preceded by white space. Do not insert blank lines: pro-cessing stops at the first blank line.

!Sample .VMC file!This file shows the default parameter valuesminmem=512 At least 512 bytes of RAM requiredmaxmem=4096 Uses no more than 4MB of RAMvirtualsize=16384 Swap file + allocated memory is 16MB

See Appendix A, Troubleshooting DOS Systems, for information on problemsand solutions when using DOS/4GW Professional.

Removing the DOS/4GW Professional banner: DOS4G (MS-DOS only)

When you invoke a tool, you will see something like this:

DOS/4GW Professional Protected Mode Run–time Version 1.97Copyright (c) Rational Systems, Inc. 1990–1995DSP Floating Point COFF Assembler Version 4.70Copyright (c) 1995 Texas Instruments Incorporated

This DOS/4GW Professional banner appears each time a tool starts becauseDOS/4GW Professional is embedded in each tool. You can suppress this ban-ner with the DOS4G environment variable by adding the following line to theAUTOEXEC.BAT file:

set DOS4G=quiet

Page 30: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Using Environment Variables

1-18

Specifying a temporary-file directory: TMP

The shell program creates intermediate files as it processes your program. Forexample, the parser phase of the shell creates a temporary file used as inputby the code generator phase. By default, the shell puts intermediate files in thecurrent directory. However, you can name a specific directory for temporaryfiles by using the TMP environment variable.

This feature allows use of a RAM disk or other file systems. It also allowssource files to be compiled from a remote directory without writing any files intothe directory where the source resides; this is useful for protected directories.

To set the TMP environment variable, enter one of these commands:

Operating Systems Enter

PC set TMP=c:\temp

UNIX setenv TMP ”/temp”

Page 31: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Assembler and Linker Walkthrough

1-19 Getting Started With the Code Generation Tools

1.8 Assembler and Linker Walkthrough

Two tools you may use often are the assembler and the linker. This section pro-vides a quick walkthrough so that you can get started without reading the entireTMS320 Floating-Point DSP Assembly Language Tools User’s Guide. Theseexamples show the most common methods for invoking the assembler andlinker. There are also examples in the tools directory that you can run or printfor an idea of the syntax and the steps necessary.

1) Create two short source files containing the code in the two following ex-amples to use for the walkthrough; call them filea.asm and fileb.asm. SeeExample 1–1 and Example 1–2.

Example 1–1.filea.asm

.file ”filea.asm”

.ref addvec

.global __stack

.global start

__stack .usect ”.stack”, 0

.textstack_a .word __stackvector .float 10.0, 20.0, 30.0, 40.0vector_a .word vectorstart:

ldp @stack_aldi @stack_a, spldi @vector_a, ar0call addvecbu $

Example 1–2.fileb.asm

.file ”fileb.asm” .def addvec

.text

addvec: ldf 0,r0

rpts 3 addf *ar0++,r0 rets

2) Enter the following command to assemble filea.asm:

asm30 filea

Page 32: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Assembler and Linker Walkthrough

1-20

The asm30 command invokes the assembler. The file filea.asm is the in-put source file. (If the input file extension is .asm, you don’t have to specifythe extension; the assembler uses .asm as the default.) This examplecreates an object file called filea.obj. The assembler creates an object fileif it does not encounter any errors in assembly. You can specify a name forthe object file, but if you do not, the assembler will use the input filenamewith an extension of .obj.

Note: The –v30 Option is the Assembler Default

The asm30 command invokes the TMS320 floating-point assembler. By de-fault, the assembler generates code as if the –v30 option had been used.Use the –v40 assembler option to generate code for the ’C4x. Use the –v32option to generate code for the ’C32. Use the –v44 option to generate codefor the ’C44.

3) Now assemble fileb.asm; enter:

asm30 fileb.asm –l

This time, the assembler creates an object file called fileb.obj. The–l (lowercase L) option tells the assembler to create a listing file. The list-ing file for this example is called fileb.lst. While it is not required that youcreate a listing file, doing so may give you some information and assureyou that the assembly has resulted in the desired object code. The listingfile for this example is shown in Example 1–3.

Example 1–3.fileb.lst, the Listing File Created by asm30 fileb.asm

TMS320C3x/4x COFF Assembler Version 4.70 Fri Feb 16 11:01:34 1996Copyright (c) 1987–1996 Texas Instruments Incorporated

fileb.asm PAGE 1

1 .file ”fileb.asm”2 .def addvec3 00000000 .text4 00000000 07608000 addvec: ldf 0,r05 00000001 13fb0003 rpts 36 00000002 01c02001 addf *ar0++,r07 00000003 78800000 rets

No Errors, No Warnings

4) Link filea.obj and fileb.obj; enter:

lnk30 filea fileb –m linkerb.map –o prog.out

Page 33: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Assembler and Linker Walkthrough

1-21 Getting Started With the Code Generation Tools

The lnk30 command invokes the linker. The input object files are filea.objand fileb.obj. If the input file extension is .obj, you need not specify theextension; the linker uses .obj as the default. The linker combines filea.objand fileb.obj to create an executable object module called prog.out. The–o option supplies the name of the output module. Example 1–4 showsthe map file resulting from this operation (produced only if you use the –moption).

Example 1–4.Output Map File, linkerb.map

***************************************************** TMS320C3x/4x COFF Linker Version 4.70***************************************************** Fri Feb 16 11:03:11 1996

OUTPUT FILE NAME: <prog.out>ENTRY POINT SYMBOL: 0

SECTION ALLOCATION MAP

output attributes/section page origin length input sections–––––––– –––– –––––––––– –––––––––– –––––––––––––––– .text 0 00000000 0000000f

00000000 0000000b filea.obj (.text) 0000000b 00000004 fileb.obj (.text)

.data 0 00000000 00000000 UNINITIALIZED 00000000 00000000 filea.obj (.data) 00000000 00000000 fileb.obj (.data)

.bss 0 00000000 00000000 UNINITIALIZED 00000000 00000000 filea.obj (.bss) 00000000 00000000 fileb.obj (.bss)

.stack 0 0000000f 00000400 UNINITIALIZED 0000000f 00000000 filea.obj (.stack)

GLOBAL SYMBOLS

address name address name–––––––– –––– –––––––– ––––00000000 .bss 00000000 edata00000000 .data 00000000 .data00000000 .text 00000000 end00000400 __STACK_SIZE 00000000 .bss0000000f __stack 00000000 .text0000000b addvec 00000006 start00000000 edata 0000000b addvec00000000 end 0000000f etext0000000f etext 0000000f __stack00000006 start 00000400 __STACK_SIZE

[10 symbols]

Page 34: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Assembler and Linker Walkthrough

1-22

You can link the two files, filea and fileb, with or without a command file.Using a command file allows you to configure your memory using theMEMORY and SECTIONS directives. The linker options and filenamescan be contained in the linker command file, or they can be entered on thecommand line, and the linker command file then consists of part of the linkinformation. If no linker command file is provided, the sections are allo-cated at address 0x0 as in the previous map file.

Example 1–5.Sample Linker Command File, linkerb.cmd

–stack 0x010

MEMORY{ RAM0: org = 0x809000 len = 0x400 /* C3x specific */}

SECTIONS{ .text: {} > RAM0}

Typing in the following command line using the linker command file shownin Example 1–5 results in the map file shown in Example 1–6.

lnk30 filea fileb linkerb.cmd –m linkerb.map –o prog.out

Page 35: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Assembler and Linker Walkthrough

1-23 Getting Started With the Code Generation Tools

Example 1–6.Linker Map File Using Linker Command File linkerb.cmd

*****************************************************TMS320C3x/4x COFF Linker Version 4.70*****************************************************Fri Feb 16 11:07:25 1996

OUTPUT FILE NAME: <prog.out>ENTRY POINT SYMBOL: 0

SECTION ALLOCATION MAP

output attributes/section page origin length input sections–––––––– –––– –––––––––– –––––––––– ––––––––––––––––.text 0 00809000 0000000f 00809000 0000000b filea.obj (.text) 0080900b 00000004 fileb.obj (.text)

.data 0 00000000 00000000 UNINITIALIZED 00000000 00000000 filea.obj (.data) 00000000 00000000 fileb.obj (.data)

.bss 0 00000000 00000000 UNINITIALIZED 00000000 00000000 filea.obj (.bss) 00000000 00000000 fileb.obj (.bss)

.stack 0 0080900f 00000010 UNINITIALIZED 0080900f 00000000 filea.obj (.stack)

GLOBAL SYMBOLS

address name address name–––––––– –––– –––––––– ––––00000000 .bss 00000000 edata00000000 .data 00000000 .data00809000 .text 00000000 end00000010 __STACK_SIZE 00000000 .bss0080900f __stack 00000010 __STACK_SIZE0080900b addvec 00809000 .text00000000 edata 00809006 start00000000 end 0080900b addvec0080900f etext 0080900f etext00809006 start 0080900f __stack

[10 symbols]

Page 36: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

C Compiler Walkthrough

1-24

1.9 C Compiler Walkthrough

The TMS320 floating-point C compiler operates in two passes: the first passparses the code, and the second pass produces a single assembly languagesource file that must be assembled and linked. The simplest way to compile,assemble, and link a C program is to use the shell program, which is includedwith the compiler. This section provides a quick walkthrough so that you canget started without reading the entire TMS320 Floating-Point DSP OptimizingC Compiler User’s Guide.

1) Create a sample file called function.c that contains the code shown inExample 1–7.

Example 1–7.Sample C File for the C Compiler Walkthrough, function.c

/**********************************************************//* function.c *//* (Sample file for walkthrough) *//**********************************************************/

int abs_func(int i);

void main(void){ int x = –3; x = abs_func(x);}

int abs_func(int i){ int temp = i; if (temp < 0) temp *= –1; return temp;}

2) To invoke the shell program to compile and assemble function.c; enter:

cl30 function

The shell program prints the information shown in as it compiles the pro-gram.

Page 37: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

C Compiler Walkthrough

1-25 Getting Started With the Code Generation Tools

Example 1–8.Diagnostic Messages Produced by the Compiler

[function]TMS320C3x/4x ANSI C Compiler Version 4.70Copyright (c) 1987–1996 Texas Instruments Incorporated ”function.c” ==> abs_func ”function.c” ==> mainTMS320C3x/4x C Code Generator Version 4.70Copyright (c) 1987–1996 Texas Instruments Incorporated ”function.c” ==> abs_func ”function.c” ==> mainTMS320C3x/4x COFF Assembler Version 4.70Copyright (c) 1987–1996 Texas Instruments Incorporated PASS 1 PASS 2

No Errors, No Warnings

The shell program runs the two compiler passes and the assembler as fol-lows:

ac30 → C parsercg30 → Code generatorasm30 → Assembler

3) By default, the shell program deletes the assembly language file from thecompiler after it is assembled. If you want to inspect the assembly lan-guage output, use the –k option to retain the assembly language file:

cl30 function –k

4) Also by default, the shell program creates a COFF object file as output;however, if you use the –z option, the output will be an executable objectmodule. The following examples show the two ways of creating an execut-able object module:

� To create an executable object module, use the lnk30 command andlink the object file with the runtime-support library rts30.lib:

lnk30 –c function –o function.out –l rts30.lib

This example uses the –c linker option because the code came froma C program. The –l option tells the linker that the input file rts30.libis an object library. The –o option names the output module,function.out; if you don’t use the –o option, the linker names the outputmodule a.out.

� In this example, use the –z option, which tells the shell program to runthe linker. –z is followed by linker options.

cl30 function –z –o function.out –l rts30.lib

Page 38: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

C Compiler Walkthrough

1-26

This example runs the two compiler passes, the assembler, and thelinker as follows:

ac30 → C parsercg30 → Code generatorasm30 → Assemblerlnk30 → Linker

5) The TMS320 floating-point compiler package also includes an interlistutility. This program interlists the C source statements as comments in theassembly language compiler output, allowing you to inspect the assemblylanguage generated for each line of C. To run the interlist utility, invoke theshell program with the –s option. For example:

cl30 function –s –z –o function.out –l rts30.lib

The output of the interlist utility is written to the assembly language filecreated by the compiler. (The shell –s option implies –k; that is, when youuse the interlist utility, the assembly file is automatically retained.)

Page 39: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Running Title—Attribute Reference

2-1 Chapter Title—Attribute Reference

Release Notes

This chapter contains documentation of tools and features that are new orhave been changed since the last release. It details all enhancements madeto the TMS320 floating-point DSP assembly language tools and optimizing Ccompiler.

Topic Page

2.1 Media Contents 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.2 Release Enhancements 2-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.3 Undocumented Features 2-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.4 Errors in the 1995 TMS320 Floating-Point DSP OptimizingC Compiler User’s Guide 2-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.5 Errors in the 1995 TMS320 Floating-Point DSP AssemblyLanguage Tools User’s Guide 2-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.6 Useful Tips 2-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 2

Page 40: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Media Contents

2-2

2.1 Media Contents

This section lists the media contents of the TMS320 floating-point code gen-eration tools for all supported platforms.

The file names and function names are the same for all PC systems. Table 2–1lists the media contents for PC systems

� The 32-bit files for DOS are contained in the DOS32 directory.

� The files for OS/2 are contained in the OS2V2 directory.

� The 32-bit files for Windows NT or Windows 95 are contained in the NTdirectory.

Table 2–1.Media Contents for PC Systems

File Description

readme.1st ’C3x/’C4x online release bulletin

c30.cmd ’C30 sample linker command file

c40.cmd ’C40 sample linker command file

ac30.exe ’C3x/’C4x ANSI C parser

ar30.exe ’C3x/’C4x archiver

asm30.exe ’C3x/’C4x assembler

cg30.exe ’C3x/’C4x code generator

cl30.exe ’C3x/’C4x compiler shell program

clist.exe ’C3x/’C4x C source interlist utility

hex30.exe ’C3x/’C4x hex conversion utility

lnk30.exe ’C3x/’C4x COFF linker

mk30.exe ’C3x/’C4x library make utility

opt30.exe ’C3x/’C4x optimizer

rts30.lib ’C3x runtime support library

rts40.lib ’C4x runtime support library

rts.src ’C3x/’C4x runtime support library source

Page 41: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Media Contents

2-3 Release Notes

Table 2–1.Media Contents for PC Systems (Continued)

File Description

prts30.src ’C3x peripheral control library source

prts40.src ’C4x parallel runtime support library source

mathasm.src ’C3x/’C4x assembly math routines library source

*.h Header files for RTS library:

assert.c ctype.h errno.h float.hlimits.h math.h safesp.h setjmp.hstdarg.h stddef.h stdlib.h string.htime.h values.h

The file names and function names are the same for all UNIX workstations.Table 2–2 lists the media contents for SPARCstations and HP workstations.

� The files for SPARC systems are contained in the sparc directory.

� The files for HP 9000 series 700 PA-RISC workstations are contained inthe hp700 directory.

Table 2–2.Media Contents for SPARCstations and HP Workstations

File Description

README.1ST ’C3x/’C4x online release bulletin

c30.cmd ’C30 sample linker command file

c40.cmd ’C40 sample linker command file

ac30 ’C3x/’C4x ANSI C parser

ar30 ’C3x/’C4x archiver

asm30 ’C3x/’C4x assembler

cg30 ’C3x/’C4x code generator

cl30 ’C3x/’C4x compiler shell program

clist ’C3x/’C4x C source interlist utility

hex30 ’C3x/’C4x hex conversion utility

lnk30 ’C3x/’C4x COFF linker

Page 42: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Media Contents

2-4

Table 2–2.Media Contents for SPARCstations and HP Workstations (Continued)

File Description

mk30 ’C3x/’C4x library make utility

opt30 ’C3x/’C4x optimizer

rts30.lib ’C3x runtime support library

rts40.lib ’C4x runtime support library

rts.src ’C3x/’C4x runtime support library source

prts30.src ’C3x peripheral control library source

prts40.src ’C4x parallel runtime support library source

mathasm.src ’C3x/’C4x assembly math routines library source

*.h Header files for RTS library:

assert.c ctype.h errno.h float.hlimits.h math.h safesp.h setjmp.hstdarg.h stddef.h stdlib.h string.htime.h values.h

Page 43: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Release Enhancements

2-5 Release Notes

2.2 Release Enhancements

This section contains release enhancements for version 4.70 of the TMS320floating-point DSP code generation tools.

� Version 4.70 fixes all known bugs with version 4.60. The list of all fixedbugs is in the README.1ST file on the software media.

� The assembler adds the –v44 option so that the new TMS320C44 IDLE2instruction can be supported.

� The new LOPOWER, MAXSPEED, and IDLE2 instructions are supportedfor the –v30, –v31, and –v32 options.

� The compiler shell adds the –@ option to read shell options and com-mands from a command file. The commands can be on one line or on sev-eral lines.

Comments in the command file can begin with a semicolon (;) and end atthe end of the line or can begin with a “/*” and end with a “*/”. Options inaddition to those in the command file can be specified on the commandline or with the C_OPTION environment variable.

� The compiler shell adds the –pm option to perform program level compila-tion. When you specify the –pm option on the command line, all input Cfiles are compiled into a single assembler or object file. By default, thename of the resulting assembler and object files is the same as the nameof the first input C file. For example:

cl30 –pm one.c two.c three.c

results in a single object file named one.obj. The default naming behaviorcan be overridden with the –px option below.

� The compiler shell adds the –px name option to override the default namefor a program level object or assembly file created with the –pm option. Forexample:

cl30 –pm one.c two.c three.c –px prog1

results in an object file named prog1.obj.

� The compiler shell adds the –op3 option. When the compiler is invokedwith the –o3 option, the –op3 option signals the compiler that other filesdo not change variables defined in these C files, but other files may callfunctions that are defined in these files. This disables some o3 optimiza-tions.

Page 44: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Release Enhancements

2-6

� The compiler shell adds the –pwn option that sets the warning level to 0,1, or 2.

–pw or–pw0

disables all warning messages

–pw1 enables serious warning messages

–pw2 enables all warning messages

Page 45: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Undocumented Features

2-7 Release Notes

2.3 Undocumented Features

This section lists features that were undocumented in the 1995 TMS320 Float-ing-Point Assembly Language Tools User’s Guide and the 1995 TMS320Floating-Point Optimizing C Compiler User’s Guide.

Options

The following options are not listed in the TMS320 Floating-Point DSP Assem-bly Language Tools User’s Guide or the TMS320 Floating-Point DSP Optimiz-ing C Compiler User’s Guide:

Assembler

–mb Supports the big memory model

–mi Generates code that avoids RPTS loops

–mx Generates code that avoids the TMX silicon bugs

–v32 Generates code for the TMS320C32

–v44 Generates code for the TMS320C44

C Shell

–@file Causes the compiler to read options from the specified file.

–mt Generates code that supports the Tartan ADA function callingconventions

–op3 Signals the optimizer that no variable declared in this moduleis altered by another module but functions in this module maybe called by other modules. This disables some of the –o3 opti-mizations.

–pm Compiles all input modules into a single output module. Theoutput module can be either assembly (.asm) or object (.obj)files. By default, the name of the output file is the name of thefirst input file.

–pr Writes error messages to filename.err

–pw Sets the warning message level.

� –pw or –pw0 disables all warning messages

� –pw1 enables serious warning messages

� –pw2 enables all warning messages

–pxname overrides the default name of the output file for the –pm option

–v32 Generates code for the TMS320C32

–v44 Generates code for the TMS320C44

Page 46: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Undocumented Features

2-8

Code Generator

–t Generates code that supports the Tartan ADA function callingconventions. Same as the –mt shell option.

–c Fast floating-point to integer conversions

Library Make Utility

–mt Generates code that supports the Tartan ADA function callingconventions

Linker

–b Tells the linker to not merge any duplicate symbol table entriesthat may exist from multiple files. This has the effect of makingthe linker run faster at the expense of a larger COFF output file.

–w Tells the linker to generate a warning message if an output sec-tion that is not explicitly specified with the SECTIONS directiveis allocated.

Optimizer

–h0 Same as the shell option –ol0. See page 2-13 for details.

–h1 Same as the shell option –ol1. See page 2-13 for details.

–h2 Same as the shell option –ol1. See page 2-13 for details.

–isize Same as the shell option –oisize.

–n0 Same as the shell option –on0.

–n1 Same as the shell option –on1.

–n2 Same as the shell option –on2.

–p0 Same as the shell option –op0.

–p1 Same as the shell option –op1.

–p2 Same as the shell option –op2.

–u Same as the shell option –ou.

–z Signals the optimizer to optimize for code size.

Parser

–r Write error messages to filename.err

Page 47: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Undocumented Features

2-9 Release Notes

The .sfloat assembler directive

The .sfloat assembler directive is not listed in the TMS320 Floating-Point DSPAssembly Language Tools User’s Guide. The syntax for this directive is:

.sfloat value

The .sfloat directive is available only with the –v32 assembler option. The.sfloat directive places the floating-point representation of one or morefloating-point constants into successive words in the current section. Each val-ue must be either a floating-point constant or a symbol that has been equatedto a floating-point constant. The format is actually the normal single-precisionformat right shifted by 16 bits so that:

� Bits 31 through 16 are zero� Bits 15 through 8 are the 8-bit exponent� Bit 7 is the sign bit� Bits 6 through 0 are the 7-bit mantissa

15 8 7 6 0

exponent s mantissa

The .sfloat directive can be used to place floating point values into 16-bit exter-nal memory. When the values are loaded into the CPU registers (LDF), thenumber will be loaded in the upper 16-bits with the lower 16-bits set to 0.

See page 4-2 of the 1995 TMS320C32 Addendum to the TMS320C3x User’sGuide for more information.

The DATA_SECTION pragma directive

The TMS320 floating-point C compiler supports the following pragma:

#pragma DATA_SECTION ( symbol, ” section name”)

The DATA_SECTION pragma is useful if you have data objects that you wouldlike to link into an area separate from the .bss.

Using the DATA_SECTION pragma, you could specify that data should go inanother section, and then you could link that section into a different locationin RAM with the linker.

The DATA_SECTION pragma will allocate space for the symbol in a sectionnamed section name. The section name should be a maximum of eight char-acters. The symbol must have file scope. That is, it cannot be defined or de-clared inside of a function body.

Page 48: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Undocumented Features

2-10

The pragma itself must be specified outside of a function body and must occurwithout any declaration, definition or reference to the symbol. If you do not fol-low these rules, the system will silently ignore the pragma and you will get awarning message.

Example 2–1. Pragma Directive Example

/**************************************************//* file1.c *//**************************************************//* Allocate space in section ”.test” for int test *//**************************************************/#pragma DATA_SECTION(test, ”.test”)int test;extern int test;

extern int incr(void); void main(void) { int i; i = incr();}

/**************************************************//* file2.c *//**************************************************/#pragma DATA_SECTION(test, ”.test”)extern int test; int incr(void) { return test++; }

Page 49: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Undocumented Features

2-11 Release Notes

TMS320C32 support for 8-bit and 16-bit heaps

The ’C3x runtime support library adds 8-bit and 16-bit versions of the dynamicmemory management functions. These functions are analogous to the 32-bitversions described in Chapter 5, Runtime Support Functions, of the 1995TMS320 Floating-Point DSP Optimizing C Compiler User’s Guide. The onlydifference is that the 8-bit and 16-bit version allocate space from the .sysm8and .sysm16 uninitialized sections rather than the .sysmem section.

void *calloc8(size_t _num, size_t _size);void free8(void *_ptr);void *malloc8(size_t _size);void *bmalloc8(size_t _size);void minit8(void);void *realloc8(void *_ptr, size_t _size);

void *calloc16(size_t _num, size_t _size);void free16(void *_ptr);void *malloc16(size_t _size);void *bmalloc16(size_t _size);void minit16(void);void *realloc16(void *_ptr, size_t _size);

The sizes of the .sysm8 and .sysm16 sections can be set by using the –heap8and –heap16 linker options, respectively. If the memory management func-tions are used but the –heap8 and –heap16 options are not used, the defaultsize of each heap is 1K words. If the memory management functions are notused, the linker will not allocate the .sysm8 and .sysm16 sections. The –heap8and –heap16 options cause the linker to set the constant heap size values inthe _SIZEMEM8_SIZE and _SIZEMEM16_SIZE symbols, respectively. Thestdlib.h header file should be included in any file that uses these new functions.

Page 50: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Undocumented Features

2-12

The ti_sprintf runtime support function

The TMS320 floating-point C compiler supplies the following special versionof the ANSI standard sprintf runtime support function:

Special Version of sprintfti_sprintf

Syntax #include <stdlib.h>

int ti_sprintf ( char *s, const char *format, ...);

Defined in tsprintf.c in rts.src

Description The ti_sprintf function is a minimal version of sprintf() that supports only thosefunctions required by time(). Specifically, ti_sprintf supports only the followingconversions:

% [ 0 ] [ digits ] ( s | d )

0 if present, indicates that the field will be padded with 0s instead ofblanks.

digits if present, indicate the minimum width of the field in characters. If theargument that corresponds to the conversion is smaller than thiswidth, the argument will be right justified in the field and the fieldpadded with 0s or blanks (depending on whether 0 is used as above).

s | d specifies the argument’s type. An s indicates that the argument is oftype char *; a d indicates that the argument is of type int.

You can alter the ti_sprintf function by extracting the function from rts.src, mak-ing changes to the code, and recompiling the runtime-support library. Theti_sprintf function is fully commented to make alterations easier. To extractti_sprintf.c from the rts.src library, enter the following command at the com-mand line:

ar30 –x rts.src tsprintf.c

Page 51: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Errors in the 1995 TMS320 Floating-Point DSP Optimizing C Compiler User’s Guide

2-13 Release Notes

2.4 Errors in the 1995 TMS320 Floating-Point DSP Optimizing C CompilerUser’s Guide

� The –oe C shell option listed on page 2-9 is not a valid option and shouldbe ignored.

� The description of the –ol C shell option on page 2-21 is incorrect. Replacethe description with the following:

–oln (lowercase L) controls file-level optimizations. When you invokethe optimizer at level 3 (–o3), it makes use of known propertiesof the standard library functions. If the file you are compilingredefines any of standard functions, the compiler may produceincorrect code. Use the –ol option to notify the optimizer if any ofthe following situations exist:

� –ol0 : If you use this option, the optimizer will not assume theknown properties of the standard library functions when do-ing optimizations. Use this option if the file you are compilingalters a standard library function (that is, use if you define afunction with the same name as a standard library functionor if you alter the source code of a standard library function).

� –ol1 : Use this option if the file you are compiling containsdefinitions for unaltered standard library functions (that is,use this to compile the standard library).

� –ol2 : With this option, the optimizer will use known proper-ties of the standard library functions. This is the default be-havior of the optimizer. Use this option to restore the defaultbehavior of the optimizer if you have used one of the othertwo options in a command file, an environment variable, etc.

� On page 3-9, the statement about the .const section is incorrect. Variablesinitialized with the C const qualifier are not initialized in the .const section.

All constants that initialize global variables (with or without the const quali-fier) will be placed in the .cinit section. All constants contained in expres-sions or that initialize local variables (with or without the const qualifier) willeither be placed in the CONST table or will be loaded with immediate ad-dressing.

Values initialized with the const qualifier are not placed in the .const sec-tion because the values must be accessed with direct addressing. With thesmall memory model, it would be necessary to require that the .bss and the.const sections be on the same data page if the values were placed in the.const section.

Page 52: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Errors in the 1995 TMS320 Floating-Point DSP Optimizing C Compiler User’s Guide

2-14

The CONST table and the .const section are not the same. The CONSTtable contains the following:

� Integer constant expressions wider than 16 bits

� Floating-point constant expressions with exponents larger than 4 bitsor mantissas larger than 11 bits

� Integer local variable initializers wider than 16 bits

� Floating-point local variable initializers with exponents larger than 4bits or mantissas larger than 11 bits

� Addresses of global variables

� Addresses of string constants

The .const section contains the following:

� Tables for switch statements

� String constants that do not initialize global variables

� The CONST table when using big model

� The statement about the .const section on page 4-10 is incorrect. Thesmall memory model of 64K words is only for the .bss section and not forthe sum total of the .bss and .const sections.

� The Accessing Variables Not Defined in the .bss Section description onpages 4-25 and 4-26 is incomplete. This method of accessing from C avariable that is not defined in .bss is only need if the small memory modelis used and the variables are not allocated on the same data page as the.bss sections generated by the compiler. If the big memory model is usedthis method is not needed. The big memory model will cause the compilerto load the data page pointer prior to each direct memory access to vari-ables.

In addition to Example 4–3 on page 4-26, the following can be used in C:

extern float sine;float *sine_p = &sine;f = sine_p[4];

Or the following can be used in the assembly program:

.global _sine_sine .usect ”sine_tab”, 4

Or the following can be used in the assembly program:

.global _sine .bss _sine, 4

In the last case, use the C method only if the .bss section generated by theassembler is not allocated (by the linker) on the same data page as the.bss output section generated by the compiler.

Page 53: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Errors in the 1995 TMS320 Floating-Point DSP Optimizing C Compiler User’s Guide

2-15 Release Notes

� In subsection 4.6.1 on pages 4-29 and 4-30, the entry code to an assemblylanguage function is incorrect. The corrected code is shown below:

PUSH FPLDI SP,FPADDI2,SPPUSH STPUSH R3PUSHF R3PUSH R4PUSHF R4PUSH AR4

POP AR4POPF R4POP R4POPF R3POP R3POP STSUBI 2,SPPOP FPRETI

� The example on page 5-59 is incorrect. The example should be as follows:

#include<stdarg.h>

int printf(char* fmt, ...){int i;char* s;

va_list ap;va_start(ap, fmt);

/* ... */i = va_arg(ap, int);s = va_arg(ap, char *);i = va_arg(ap, long);

va_end(ap);}

Page 54: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Errors in the 1995 TMS320 Floating-Point DSP Assembly Language Tools User’s Guide

2-16

2.5 Errors in the 1995 TMS320 Floating-Point DSP Assembly LanguageTools User’s Guide

� On page 4-26, the syntax of the .data directive should be .data rather than.data [address].

� On page 4-65, the syntax of the .text directive should be .text rather than.text [value].

� The description of the block keyword on pages 8-26 and 8-28 is incorrect.The “block 10000h” keyword in the SECTION directive of the linker com-mand file tells the linker to

� Make sure that the output section either does not cross a 0x10000page if it is smaller than 0x10000 in length, or

� If it is larger than a 0x10000 page, make sure that it is aligned to starton a 0x10000 page.

It does not tell the linker to make sure the the output section is not longerthan 0x10000.

� The following file header flags should be listed in Table A–2:

Mnemonic Flag Description

F_VERS0 0000h TMS320C30/C31 object code

F_VERS1 0010h TMS320C40/C44 object code

F_VERS2 0020h TMS320C32 object code

� In Table A–3, two of the fields are incorrectly swapped. This is the way thatthey should read:

Byte Number Type Description

16–19 Long integer Entry Point

20–23 Long integer Beginning address of executable code

Page 55: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Useful Tips

2-17 Release Notes

2.6 Useful Tips

� The –mf compiler option ensures that pointer access to an external vari-able never uses direct addressing. If you do not use the –mf option, thecompiler may use direct addressing if a local variable pointer is assignedthe address of the external variable. Use of the option will not make all ad-dressing to all external variables indirect.

� When the compiler generates code for the ’C4x, it assumes that the SETCOND bit in the ST register is set to 0. The compiler will not work correctlyif the SET COND is set to 1.

� When you use the –x option with asm30 or the –ax option with cl30, aCOPY section with cross reference information is included in the COFFfile. Although the COPY section is not supposed to be loaded, TI loaderswith core debugger versions older than 3.33 will attempt to load the sec-tion. You can use the –mv option on the debugger command line to findthe debugger core version.

The ’C3x simulator version 2.20 and the ’C4x simulator version 1.30/1.31loaders have this problem. The following loaders do not have the problem:

� ’C4x XDS510/XDS510WS debugger version 2.40� ’C3x XDS510/XDS510WS debugger version 5.00

A work-around to this problem is to specify in the SECTIONS directive ofthe linker command file that the .xref section be allocated at a specificmemory location that will not disturb the program. The other option is not touse the –x option if you intend to use one of the affected loaders.

� DOS restricts the length of the command line to a total of 128 characters.The 128-character restriction also exists for the command lines that cl30creates for calling the other tools (ac30, opt30, cg30, etc.). When thesecommand lines are generated, the entire path is included for the execut-able (for example c:\tools\rel460\ac30.exe). This means that more optionscan be included if you run the tools from the directory where they exist orif you shorten the length of the path to the executable files.

Another solution is to use the –@ shell option. This option causes the com-piler to read shell options and commands from a command file (seepage 2-5).

Page 56: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Useful Tips

2-18

� You cannot nest GROUP (group output sections) and UNION directivesin a linker command file. You can, however, group input sections within aUNION directive (A GROUP directive groups output sections). This ac-complishes the same thing since the linker continuously allocates outputsections. For example:

MEMORY{ EXT0 : org = 0x001000, len = 0x0800 RAM0 : org = 0x809800, len = 0x0400 }

SECTIONS{ UNION run = RAM0 { .text1: load = EXT0 { file1.obj(.text) file2.obj(.text) } .text2: load = EXT0 { file3.obj(.text) file4.obj(.text) } } }

� If you have multiple sections that need to start at the same run address andthey require alignment by different amounts, you can use overlays. Thisis one way to simulate what would happen if you could nest GROUP direc-tives in UNION directives. The one thing to be aware of is that some load-ers may use the page information to place code into different banks ofmemory. All of the TI loaders (EVM, emulator, and simulator) do not usethe page information in the COFF file.

MEMORY{ PAGE 0 : RAM0 : org = 0x001000, len = 0x0800 PAGE 1 : RAM0 : org = 0x809800, len = 0x0400 PAGE 2 : RAM0 : org = 0x809800, len = 0x0400}

SECTIONS{ .text1 : load = RAM0 PAGE 0, run = RAM0 PAGE 1 align 128 .text2 : load = RAM0 PAGE 0, run = RAM0 PAGE 1 align 64 .text3 : load = RAM0 PAGE 0, run = RAM0 PAGE 2 align 512 .text4 : load = RAM0 PAGE 0, run = RAM0 PAGE 2 align 8}

Page 57: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Useful Tips

2-19 Release Notes

� An alternative to using mk30 to build a library is to use use cl30 to compileall of the .c and .h files and then use ar30 to archive all of the .obj files toan object archive:

SPARC:

cd ~/float/rts ar30 –x ~/float/rts.src cl30 –o3 –ol0 –op0 –i. * ar30 –a rts.lib *.obj

DOS:

cd c:\float\rts ar30 –x c:\float\rts.src cl30 –o3 –ol0 –op0 –i. *.* ar30 –a rts.lib *.obj

� The branch instructions (BR, BRD, CALL, RPTB, RPTBD, LAJ, Bcond,BcondAF, BcondAT, BcondD, CALLcond, DBcond, DBcondD, LAJcond,LATcond, RETIcond, RETIcondD, RETScond, etc) have either 16- or24-bit displacement fields (+/– 32K or +/– 8M words, respectively). In mostcases, the compiler uses the conditional branches with 16-bit offsets. Oneway to fix this is to use a function pointer to call the function. This will usethe register addressing mode rather than the PC-displacement addres-sing mode.

� Using the .sect directive to define a user definable initialized section in Ccode does not always work correctly. This method is often used when youwant to give a portion of code different run and load addresses. The com-piler may generate .text information, then it may generate .const or .cinitinformation, and then go back to generating more .text information. Thismeans that a portion of the code that was intended for the user section maybe placed in the .text section.

The .label directive can be used with any initialized section like .text, .data,or other user definable initialized sections (.sect directive) to place a labelat the load address. It does not make sense to have a run address for the.cinit section since the data is copied to .bss at boot time or load time andthen never referenced again. Uninitialized sections like .bss, .stack or.sysmem only have runtime addresses. Therefore, it does not make senseto have a separate load address.

Page 58: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Useful Tips

2-20

A general method of placing C code at a separate load address is illus-trated in the following code segments. The example consists of four Cfiles, move.c, move1.c, move2.c, and exit.c, and an assembly languagefile, boot.asm. The C file exit.c and the assembly language file boot.asmare not reproduced here as they are included in the runtime support library.The linker command file move.cmd controls the linking process. The fivefiles are compiled, assembled, and linked with the following commandline:

cl30 –g move.c move1.c move2.c exit.c boot.asm –z move.cmd

The file move.c contains the function main_run() that we want to relocateat runtime. The asm statement is used to embed TMS320 floating-pointassembly language statements. The .sects statement create named sec-tions called .load and .end. The .label statement creates a special labelthat refers to the load address of the labels __load_addr and __load_endthat mark the beginning and ending of the code to be relocated at run time.

******************************** move.c ***************************************

asm(” .sect \”.load\” ”);asm(” .global __load_addr ”);asm(” .global __run_addr ”); asm(” .label __load_addr ”); asm(”__run_addr .text ”);

extern int test(int in);

int main_run(int in){ int out = test(in); return out;}

asm(” .sect \”.end\” ”); asm(” .global __load_end ”); asm(” .label __load_end ”);

Page 59: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Useful Tips

2-21 Release Notes

The file move1.c contains the C code that moves the function main_run()from its load address to its run address.

*********************** move1.c ***********************

extern int _load_addr;extern int _load_end;extern int _run_addr;extern int main_run(int in);

main(){ int (*ptr_main)(int n) = main_run; int *load_addr = &_load_addr; int *load_end = &_load_end; int *run_addr = &_run_addr; int len = load_end – load_addr; int i; for(i=0; i<len; i++) *run_addr++ = *load_addr++; i = (*ptr_main)(100);}

The file move2.c contains a function call to the function test(). Note that thecode that relocates the function must run before the function can be called.

*********************** move2.c ***********************

int test(int in){ return in;}

The file move.cmd contains a linker command file for the preceding exam-ple. The most important part of this command file for the purpose of theexample is the SECTIONS directive that allocates move.obj andmove2.obj to load into external memory and run in RAM block 1. Note thatthe linker command file allocates the space, but it is the file move1.c thatcontains the code that actually moves functions main_run() and test() fromtheir load addresses to their run addresses.

Page 60: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Useful Tips

2-22

******************************** move.cmd *************************************

–c /* USE C ROM MODEL */–stack 0x100 /* STACK */–heap 0x100 /* HEAP */–lrts30.lib /* RUN–TIME SUPPORT LIBRARY */–m c3x.map /* GENERATE MAP FILE */–o c3x.out /* NAME OUTPUT FILE */–x /* REREAD LIBRARIES */–w /* WARN */ /* SPECIFY THE SYSTEM MEMORY MAP */

MEMORY{ ROM: org = 0x0 len = 0x1000 /* INTERNAL 4K ROM */ EXT0: org = 0x1000 len = 0x7ff000 /* EXTERNAL MEMORY */ XBUS: org = 0x800000 len = 0x2000 /* EXPANSION BUS */ IOBUS: org = 0x804000 len = 0x2000 /* I/O BUS */ RAM0: org = 0x809800 len = 0x400 /* RAM BLOCK 0 */ RAM1: org = 0x809c00 len = 0x400 /* RAM BLOCK 1 */ EXT1: org = 0x80a000 len = 0x1000 /* EXTERNAL MEMORY */}

/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */

SECTIONS{ .boot: > EXT0 { boot.obj (.text) move1.obj (.text) exit.obj (.text) } .text: load = EXT0, run = RAM1 { move.obj (.load) * (.text) move.obj (.end) } .cinit: > RAM1 /* INITIALIZATION TABLES */ .const: > RAM1 /* CONSTANTS */ .stack: > RAM1 /* SYSTEM STACK */ .sysmem: > RAM1 /* DYNAMIC MEMORY – DELETE IF NOT USED */ .bss: > RAM1, block 0x10000 /* VARIABLES */}

Page 61: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

A-1 Chapter Title—Attribute Reference

Appendix A

Troubleshooting DOS Systems

Getting 32-bit programs to execute properly under MS-DOS can be frustrating.Your computer’s configuration and memory management can cause problemsthat may be difficult to find because many programs are interacting.

DOS/4GW Professional is a memory manager that is embedded into theTMS320 floating-point DSP code generation tools, so you may occasionallysee DOS/4GW Professional error messages while you are using the tools. TheDOS/4GW Professional memory manager is not shipped as a separateexecutable, nor is any documentation provided on this tool, except for the listof error messages.

Section A.2, Kernel Error Messages, and Section A.3, DOS/4GW ProfessionalError Messages, are excerpted from the DOS/4GW Professional User’sManual (reproduced here with the permission of Tenberry Software, Inc.). In-cluded are lists of error messages with descriptions of the circumstances inwhich the error is most likely to occur and suggestions for remedying the prob-lem. (Portions of the excerpt have been modified to provide you with specificinformation about using TI tools.)

Topic Page

A.1 Troubleshooting in the Protected-Mode Environment A-2. . . . . . . . . . . .

A.2 Kernel Error Messages A-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

A.3 DOS/4GW Professional Error Messages A-13. . . . . . . . . . . . . . . . . . . . . . .

Appendix A

Page 62: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Troubleshooting in the Protected-Mode Environment

A-2

A.1 Troubleshooting in the Protected-Mode Environment

A list of error messages is reproduced in Sections A.2 and A.3 because theymay occur when executing any tools, since all of the tools have beenassembled along with the DOS/4GW Professional memory extender. Whenreading this material, keep these considerations in mind:

� When an Action directs you to technical support, determine the configura-tion of your system by using the PMINFO (on page A-3) and RMINFO (onpage A-6) programs before contacting technical support:

To obtain TMS320 floating-point DSP technical support, contact the DSPhotline:

DSP HOTLINE: (713) 274–2320Fax: (713) 274–2324Electronic Mail: [email protected].

� Some error messages are not included in this appendix because they arerarely seen when using DOS/4GW Professional with the TMS320 floating-point DSP tools. In fact, many of the messages that are documented hereare seldom seen when using DOS/4GW Professional with the TMS320floating-point DSP tools. Nevertheless, you may find this text to be usefulin debugging your programs.

Should you encounter any error message not listed here, or should problemspersist, contact technical support as directed above.

Page 63: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Troubleshooting in the Protected-Mode Environment

A-3 Troubleshooting DOS Systems

The PMINFO.EXE program

Purpose: Run PMINFO.EXE to determine the performance of protected/real-mode switching and extended memory.

Notes: The time-based measurements made by PMINFO may varyslightly from run to run.

If this error message appears:

DOS/16M error: [17] system software does not follow VCPIor DPMI specifications

check for a statement in your CONFIG.SYS containingNOEMS. If such a statement exists, remove it and reboot yourcomputer.

If the computer is not equipped with extended memory or ifnone is available for DOS/4GW Professional, the extendedmemory measurements will not display.

Other things to consider if you are having problems withDOS/4GW Professional:

� Remove the EMM386 FRAME=NONE option if you use it.

� Configure EMM386 with both the NOEMS and NOVCPIoptions.

� Convert the DEVICEHIGH statements in yourCONFIG.SYS to DEVICE statements, and remove the LH(Load High) commands from your AUTOEXEC.BAT.

� Run in an MS-Windows DOS shell.

� Run with HIMEM.SYS alone (No EMM386).

Other DOS/4GW Professional error messages are in SectionsA.2 and A.3.

Page 64: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Troubleshooting in the Protected-Mode Environment

A-4

Example: The following example shows the output of the PMINFO pro-gram on an 80486 AT-compatible machine running at 33 MHz.

–================================= PMINFO =======================================–

Protected Mode and Extended Memory Performance Measurement –– 5.00 Copyright (c) Rational Systems, Inc. 1987 – 1993 DOS memory Extended memory CPU performance equivalent to 33.0 MHz 80486–––––––––– ––––––––––––––– 640 17854 K bytes configured (according to BIOS). 640 31744 K bytes physically present (SETUP). 550 17585 K bytes available for DOS/16M programs.21.6 (0.0) 19.1 (0.5) MB/sec word transfer rate (wait states).35.4 (0.5) 34.4 (0.5) MB/sec 32–bit transfer rate (wait states). Overall cpu and memory performance (non–floating point) for typicalDOS programs is 7.78 � 0.62 times an 8MHz IBM PC/AT. Protected/Real switch rate = 18078/sec (55 �sec/switch, 33 up + 21 down),DOS/16M switch mode 11 (VCPI).

PMINFO provides the information shown in Table A–1.

Page 65: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Troubleshooting in the Protected-Mode Environment

A-5 Troubleshooting DOS Systems

Table A–1.PMINFO Fields

Measurement Purpose

CPU performance Shows the CPU processor equivalent and the speed of the CPU (in MHz).

According to BIOS Shows the configured memory in DOS and extended memory as provided by theBIOS (interrupts 12h and 15h, function 88h).

SETUP Shows the configuration obtained directly from the CMOS RAM as set by the com-puter’s setup program. It is displayed only if the numbers are different from thosein the BIOS line. They will be different if the BIOS has reserved memory for itselfor if another program has allocated memory and is intercepting the BIOS configu-ration requests to report less memory available than is physically configured.

DOS/16M programs If displayed, shows the low and high addresses available to DOS/4GW Profes-sional in extended memory.

Transfer rates PMINFO tries to determine the memory architecture. Some architectures will per-form well under some circumstances and poorly under others; PMINFO shows thebest and worst cases. The architectures detected are cache, interleaved, page-mode (or static column), and direct.

Measurements are made by using 32-bit accesses and are reported as the num-ber of megabytes per second that can be transferred. The number of wait statesis reported in parentheses. The wait states can be a fractional number, like 0.5,if there is a wait state on writes but not on reads. Memory bandwidth (that is, howfast the CPU can access memory) accounts for 60% to 70% of the performancefor typical programs (those that are not heavily dependent on floating-point math).

Overall CPU and memoryperformance

Shows a performance metric developed by Tenberry Software, Inc. (formerlyknown as Rational Systems, Inc.), indicating the expected throughput for the com-puter relative to a standard 8-MHz IBM PC/AT (disk accesses and floating-pointoperations are both excluded).

Protected/Real switch rate Shows the speed with which the computer can switch between real and protectedmodes, both as the maximum number of round-trip switches that can occur persecond, and as the time for a single round-trip switch, broken into the real-to-protected (up) and protected-to-real (down) components.

Page 66: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Troubleshooting in the Protected-Mode Environment

A-6

The RMINFO.EXE program

Purpose: Run RMINFO.EXE to determine your system configuration andthe basis for protected/real-mode switching.

Notes: RMINFO is a DOS/16M application, as is DOS/4GW Profes-sional. If neither your application nor PMINFO will run, tryrunning RMINFO.

RMINFO starts DOS/4GW Professional, stops your machinejust short of switching from real mode to protected mode, anddisplays configuration information about your computer. Theinformation shown by RMINFO can help you determine whyDOS/4GW Professional applications won’t run on a particularmachine.

Example: The following example shows the output of the RMINFO pro-gram on an 80486 AT-compatible machine.

–============================== RMINFO =======================================–

DOS/16M Real Mode Information Program –– 5.00Copyright (c) Rational Systems, Inc. 1987 – 1993 Machine and Environment: Processor: i486, coprocessor present Machine Type: 10 (AT–compatible) A20 now: enabled A20 switch rigor: disabled XMS host found VCPI host found, page table 0 at: 24000h Switching Functions A20 switching: AT–style KBC To PM switch: VCPI To RM switch: VCPI Nominal switch mode: 11 Switch control flags: 0000 Memory Interfaces: (VCPI remapping in effect) VCPI may provide: 17854 returnable contiguous DOS memory 492K

Page 67: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Troubleshooting in the Protected-Mode Environment

A-7 Troubleshooting DOS Systems

RMINFO provides the information in Table A–2 (depending on your systemconfiguration, not all fields will appear for any one machine).

Table A–2.RMINFO Fields

(a) Machine and Environment

Measurement Purpose

Processor Tells whether the processor is a 80286, 80386, 80486, or Pentium and if a mathcoprocessor is present.

Machine Type Tells whether the machine is an AT-compatible or a non-AT-compatible MS-DOSmachine.

A20 now Gives the current state of address line 20.

A20 switch rigor Indicates whether DOS/16M rigorously controls enabling and disabling of addressline 20 when switching modes.

DPMI host found Indicates that your system has a DPMI host. (It is not present if the system does nothave a DPMI host.)

XMS host found Tells whether your system has any software using extended memory under theXMS discipline.

VCPI host found Tells whether your system has any software using extended memory under theVCPI discipline.

page table n at Linear address of the page table where DOS/16M starts.

(b) Switching Functions

Measurement Purpose

A20 switching Tells whether DOS/16M uses PS/2-style or AT-style (using the keyboard controller)switching.

To PM switch Shows the DOS/16M method for switching to protected mode.

To RM switch Shows the DOS/16M method for switching to real mode.

Nominal switch mode Shows the switch mode used for backward compatibility.

Switch control flags Shows the switch control flags used for backward compatibility.

Page 68: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Troubleshooting in the Protected-Mode Environment

A-8

Table A–2.RMINFO Fields (Continued)

(c) Memory Interfaces Information

Measurement Purpose

VCPI remapping in effect Indicates that memory from different sources can be remapped contiguously.

DPMI may provide Shows the amount of memory that the DPMI host reports as available to DOS/16Mand whether DOS/16M can give back the memory it gets from this source. (It is notpresent if there is no DPMI host.)

VCPI may provide Shows the amount of memory that the VCPI host reports as available to DOS/16Mand whether DOS/16M can give back the memory it gets from this source. (It is notpresent if there is no VCPI host.)

XMS may provide Shows the amount of memory that the XMS manager reports as available toDOS/16M and whether DOS/16M can give back the memory it gets from thissource. (It is not present if there is no XMS host.)

Top-down may provide Shows the amount of memory that DOS/16M finds using Interrupt 15h and function88h and indicates whether DOS/16M can give back the memory it gets from thissource. (It is not present if there is no top-down host.)

Other 16M may provide Shows the amount of memory that DOS/16M finds from a resident DOS/16M kerneland whether DOS/16M can give back the memory it gets from this source. (It is notpresent if there is no other 16M host.)

Contiguous DOS memory Shows the amount of DOS memory available to DOS/16M.

Page 69: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Kernel Error Messages

A-9 Troubleshooting DOS Systems

A.2 Kernel Error Messages

This section describes error messages from the DOS/16M kernel embeddedin the TMS320 floating-point DSP code generation tools. Kernel error mes-sages can occur because of severe resource shortages, corruption of theexecutable file, corruption of memory, operating system incompatibilities, orinternal errors. All of these messages are quite rare.

DOS/16M protected mode available only with 386 or 486Description DOS46 did not detect the presence of an 80386-, 80486-, or

Pentium-based processor. You may see this error messageeven if you are using a 80386 or later PC.

Action If you are running the tools on a 80386 (or later) PC, rerun theprogram. If you are running the tools on a 80286 PC, reinstalland run the tools on an 80386 (or later) PC.

0: involuntary switch to real modeDescription The computer was in protected mode but switched to real

mode without going through DOS/16M. This error most oftenoccurs because of an unrecoverable stack segmentexception (stack overflow) but can also occur if the GlobalDescriptor Table or Interrupt Descriptor Table is corrupted.

Action Restart your computer. If the problem persists, contact tech-nical support.

2: not a DOS/16M executable <filename>Description DOS4G.EXE or a bound DOS/4G application has probably

been corrupted in some way.

Action Recopy the file from the source media.

6: not enough memory to load programDescription There is not enough memory to load DOS/4GW Professional.

Action Make more memory available and try again.

8: cannot open file <filename>Description The DOS/16M loader cannot load DOS/4G, probably

because DOS has run out of file units.

Action Set a larger FILES= entry in the CONFIG.SYS file, reboot,and try again.

Page 70: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Kernel Error Messages

A-10

9: cannot allocate tstack

Description There is not enough memory to load DOS/4GW Professional.

Action Make more memory available and try again.

10: cannot allocate memory for GDT

Description There is not enough memory to load DOS/4GW Professional.

Action Make more memory available and try again.

11: no passup stack selectors – GDT too small

Description This error indicates an internal error in DOS/4GW Profession-al or an incompatibility with other software.

Action Contact technical support.

12: no control program selectors – GDT too small

Description This error indicates an internal error in DOS/4GW Profession-al or an incompatibility with other software.

Action Contact technical support.

13: cannot allocate transfer buffer

Description There is not enough memory to load DOS/4GW Professional.

Action Make more memory available and try again.

14: premature EOF

Description DOS4G.EXE or a bound DOS/4G application has probablybeen corrupted.

Action Recopy the file from the source media.

15: protected mode available only with 386 or 486

Description DOS/4GW Professional requires an 80386 (or later) CPU. Itcannot run on an 80286 or earlier CPU.

Action Reinstall and run the tools on a 80386 (or later) PC.

Page 71: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Kernel Error Messages

A-11 Troubleshooting DOS Systems

17: system software does not follow VCPI or DPMI specifica-tionsDescription Some memory-resident program has put your 80386 or

80486 CPU into Virtual 8086 mode. This is done to providespecial memory services to DOS programs, such as EMSsimulation (EMS interface without EMS hardware) or highmemory. In this mode, it is not possible to switch into pro-tected mode unless the resident software follows a standardthat DOS/16M supports (DPMI, VCPI, and XMS are the mostcommon).

Action Contact the vendor of your memory-management software.

22: cannot free memoryDescription Memory was probably corrupted during execution of your

program.

Action Make more memory available and try again.

23: no memory for VCPI page tableDescription There is not enough memory to load DOS/4GW Professional.

Action Make more memory available and try again.

24: VCPI page table address incorrectDescription This is an internal error.

Action Contact technical support.

25: cannot initialize VCPIDescription An incompatibility with other software was detected.

DOS/16M has detected that VCPI is present, but VCPIreturns an error when DOS/16M tries to initialize the interface.

Action Find the other software that uses VCPI and disable it (stop itsexecution).

28: memory error, avail loopDescription Memory was probably corrupted during execution of your

program. Using an invalid or stale alias selector may causethis error. Incorrect manipulation of segment descriptors mayalso cause it.

Action Rerun the program and/or restart your computer.

Page 72: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Kernel Error Messages

A-12

29: memory error, out of range

Description Memory was probably corrupted during execution of yourprogram. Writing through an invalid or stale alias selector maycause this error.

Action Check your source code for references to variables that arenot declared or are no longer in scope.

32: DPMI host error (possibly insufficient memory)33: DPMI host error (need 64K XMS)34: DPMI host error (cannot lock stack)

Description Memory under DPMI is probably insufficient.

Action Under MS-Windows, make more physical memory availableby eliminating or reducing any RAM drives or disk caches.You can also edit DEFAULT.PIF so that at least 64K bytes ofXMS memory is available to non-Windows programs. UnderOS/2, increase the DPMI_MEMORY_LIMIT in the DOS boxsettings.

35: general protection fault

Description An internal error in DOS/4GW Professional was probably de-tected. Faults generated by your program should cause error2001 instead.

Action Contact technical support.

38: cannot use extended memory: HIMEM.SYS not version 2

Description An incompatibility with an old version of HIMEM.SYS wasdetected.

Action Upgrade to a more recent copy of DOS or upgrade your DOSmemory extender.

40: not enough available extended memory (XMIN)

Description An incompatibility with your memory manager or its configu-ration was detected.

Action Try configuring the memory manager to provide moreextended memory, or change memory managers.

Page 73: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

DOS/4GW Professional Error Messages

A-13 Troubleshooting DOS Systems

A.3 DOS/4GW Professional Error Messages

DOS/4GW Professional errors are more common than kernel errors when us-ing the TMS320 floating-point DSP code generation tools. They are usually re-lated to an unknown path name, corrupt files, or memory problems. Memoryproblems can include inadequate memory, poor configuration, or corruptedmemory.

1000 ”can’t hook interrupts”

Description A DPMI host has prevented DOS/4GW Professional fromloading.

Action Contact technical support.

1001 ”error in interrupt chain”

Description A DOS/4GW Professional internal error was detected.

Action Contact technical support.

1003 ”can’t lock extender kernel in memory”

Description DOS/4GW Professional couldn’t lock the kernel in physicalmemory, probably because of a memory shortage.

Action Free some memory for the DOS/4GW Professional applica-tion.

1005 ”not enough memory for dispatcher data”

Description There is not enough memory for DOS/4GW Professional tomanage user-installed interrupt handlers properly.

Action Free some memory for the DOS/4GW Professional applica-tion.

1007 ”can’t find file <program> to load”

Description DOS/4GW Professional could not open the specified pro-gram. The file probably does not exist. It is possible that DOSran out of file handles or that a network or similar utility hasprohibited read access to the program.

Action Make sure that the file name was spelled correctly.

Page 74: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

DOS/4GW Professional Error Messages

A-14

1008 ”can’t load executable format for file <filename> [<errorcode>]”

Description DOS/4GW Professional did not recognize the specified file asa valid executable file. DOS/4GW Professional can load lin-ear executables (LE and LX) and EXPs (BW).

Action Recopy the file from the source media.

3301 ”unhandled EMPTYFWD, GATE16, or unknown relocation”3302 ”unhandled ALIAS16 reference to unaliased object”3304 ”unhandled or unknown relocation”

Description If your program was built for another platform that supportsthe LINEXE format, it may contain a construct that DOS/4GWProfessional does not currently support, such as a call gate.One of these messages may also appear if your program hasa problem mixing 16- and 32-bit code. A linker error is anotherlikely cause.

Action Check for viruses and reinstall the tools from the source me-dia. If the problem persists, contact technical support.

Page 75: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Running Title—Attribute Reference

B-1 Chapter Title—Attribute Reference

Appendix A

Tables of Peripheral Registers,Structure-Member Names, and Bit-Field Names

The TMS2320C3x peripheral control library provides C data structures for ma-nipulating the TMS320C3x peripherals. The tables in this appendix list thedata structure member names that are used to access each of the peripheralregisters and bit fields through C peripheral pointers. For a detailed explana-tion of the registered and bit-field descriptions, refer to the TMS320C3x User’sGuide.

This appendix provides an update to the parallel runtime-support table.

The first entry for each register shows how to access that register as an integer.The remaining entries show how to access the register’s bit fields individually.Each table is followed by an example.

Appendix B

Page 76: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Tables of Peripheral Registers, Structure-Member Names, and Bit-Field Names

B-2

Table B–1.Bus-Control Registers

Register Assignment Bit Field Member name

STRB0 Bus Control Integer –––– –>strb0_gcontrol

Bit-field STRB Switch –>strb0_gcontrol_bit.strbsw

STRB Config –>strb0_gcontrol_bit.strbcnfg

Sign Ext/Zero Fill –>strb0_gcontrol_bit.signext

Physical Memory Width –>strb0_gcontrol_bit.memwidth

Data Size –>strb0_gcontrol_bit.datasize

BNKCMP –>strb0_gcontrol_bit.bnkcmp

WTCNT –>strb0_gcontrol_bit.wtcnt

SWW –>strb0_gcontrol_bit.sww

HIZ –>strb0_gcontrol_bit.hiz

NOHOLD –>strb0_gcontrol_bit.nohold

HOLDST –>strb0_gcontrol_bit.holdst

STRB1 Bus Control Integer –––– –>strb1_gcontrol

Bit-field Sign Ext/Zero Fill –>strb1_gcontrol_bit.signext

Physical Memory Width –>strb1_gcontrol_bit.memwidth

Data Size –>strb1_gcontrol_bit.datasize

BNKCMP –>strb1_gcontrol_bit.bnkcmp

WTCNT –>strb1_gcontrol_bit.wtcnt

SWW –>strb1_gcontrol_bit.sww

IOSTRB Bus Control Integer –––– –>strb1_gcontrol

Bit-field WTCNT –>strb1_gcontrol_bit.wtcnt

SWW –>iostrb_gcontrol_bit.sww

Example B–1. Bus Control

#include <bus32.h>BUS_REG *bus_ptr=BUS_ADDR; /* Define pointer to bus peripheral */bus_ptr–>iostrb_gcontrol = 0; /* zero wait states on IOSTRB bus */

Page 77: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Tables of Peripheral Registers, Structure-Member Names, and Bit-Field Names

B-3 Tables of Peripheral Registers, Structure-Member Names, and Bit-Field Names

Table B–2.DMA-Control Registers

Register Assignment Bit FIeld Member Name

DMA0 Global Control Integer –––– –>gcontrol

Bit-field PRIORITY MODE –>gcontrol_bit.pri_mode

DMA PRI –>gcontrol_bit.dma_pri

TCINT –>gcontrol_bit.tcint

TC –>gcontrol_bit.tc

SYNC –>gcontrol_bit.sync

DECDST –>gcontrol_bit.decdst

INCDST –>gcontrol_bit.incdst

DECSRC –>gcontrol_bit.decsrc

INCSRC –>gcontrol_bit.incsrc

STAT –>gcontrol_bit.stat

START –>gcontrol_bit.start

DMA1 Global Control Integer –––– –>gcontrol

Bit-field TCINT –>gcontrol_bit.tcint

TC –>gcontrol_bit.tc

SYNC –>gcontrol_bit.sync

DECDST –>gcontrol_bit.decdst

INCDST –>gcontrol_bit.incdst

DECSRC –>gcontrol_bit.decsrc

INCSRC –>gcontrol_bit.incsrc

STAT –>gcontrol_bit.stat

START –>gcontrol_bit.start

DMAx Source Address Integer –––– –>source

DMAx Destination Address Integer –––– –>destination

DMAx Transfer Counter Integer –––– –>transfer_counter

Example B–2. DMA Control

#include <dma32.h>DMA_REG *dma0=DMA_ADDR(0); /* Define pointer to DMA0 */dma0–>gcontrol_bit.start=STOP; /* Stop DMA by setting start bits */

Page 78: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

B-4

Page 79: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Index

Index-1

Index

–@ option 2-5

AA_DIR environment variable 1-12

assemblerwalkthrough 1-19

Bbranch instructions 2-19

bus-controlexample B-2registers B-2

CC compiler

walkthrough 1-24 to 1-26

C_DIR environment variable 1-14

C_OPTION environment variable 1-15

CD-ROMmounting

HP-UX 1-6SunOS 1-4

unmountingHP-UX 1-7SunOS 1-5

DDATA_SECTION pragma directive 2-9

DELETESWAP 1-16

DMA-controlexample B-3registers B-3

DOS/16Mdefinition 1-2

DOS/4Gdefinition 1-2error messages A-13

DOS/4GW A-1definition 1-2error messages A-1 to A-14

DOS4G environment variable 1-17DOS4GVM environment variable 1-16

Eenhancements 2-5environment variables 1-12

A_DIR 1-12C_DIR 1-14C_OPTION 1-15definition 1-2MS-DOS

DOS4G 1-17DOS4GVM 1-16

system initialization file 1-12TMP 1-18

error messagesDOS/4G A-13DOS16M kernel A-9

errorsTMS320 Floating-Point DSP Optimizing C

Compiler User’s Guide, 2-13TMS320 Floating-Point DSP Assembly Language

Tools User’s Guide, 2-16example

PMINFO A-4RMINFO A-6

Ggeneral utility functions

ti_sprintf 2-12

Page 80: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Index

Index-2

GROUP statement 2-18

Hheap support 2-11HP-UX 1-6 to 1-7

Iinstallation

HP-UX 1-6 to 1-7MS-DOS 1-8 to 1-9OS/2 1-11SunOS 1-4 to 1-5Windows 95 1-10Windows NT 1-10

interlist utility 1-26

Kkernel error messages A-9

Llibrary build utiliy 2-19linker

walkthrough 1-19

MMAXMEM 1-16media contents

MS Windows systems 2-2 to 2-4MS-DOS systems 2-2 to 2-4OS/2 systems 2-2 to 2-4PC systems 2-2UNIX systems 2-3

–mf option 2-17MINMEM 1-16MS-DOS

command line length 2-17DOS4G environment variable 1-17DOS4GVM environment variable 1-16installing the code generation tools 1-8PMINFO A-3 to A-5RMINFO A-6 to A-8

MS-DOS (continued)troubleshooting A-1virtual memory management 1-9

O–op3 option 2-5OS/2

installing the code generation tools 1-11

Pperipheral control library B-1–pm option 2-5PMINFO A-3 to A-5

example A-4pragma directive 2-9protected-mode

definition 1-2environment

troubleshooting A-2–pw option 2-6–px option 2-5

Rreal mode

definition 1-3relocating code at runtime 2-19RMINFO A-6 to A-8

example A-6

S.sect directive 2-19SET COND bit 2-17.sfloat assembler directive 2-9Solaris. See SunOSSPARCstation. See SunOSSunOS

installing the code generation tools 1-4system requirements 1-4

swap filedefinition 1-3

SWAPINC 1-16SWAPMIN 1-16

Page 81: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Index

Index-3

SWAPNAME 1-16system requirements

HP-UX 1-6MS-DOS 1-8OS/2 1-11SunOS 1-4Windows 95 1-10Windows NT 1-10

Tterminology 1-2ti_sprintf function 2-12tips 2-17TMP environment variable 1-18troubleshooting

DOS systems A-1

Uundocumented features 2-7

options 2-7

UNION statement 2-18

V–v44 option 2-5

virtual memory 1-9definition 1-3

VIRTUALSIZE 1-16

WWindows 95

installing the code generation tools 1-10

Windows NTinstalling the code generation tools 1-10

X–x option 2-17

Page 82: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

Index-4

Page 83: Getting Started Guide · Gets you started using the compiler, linker, and assembler Describes how you can resolve problems that you may encounter on a PC running DOS (MS-DOS or PC-DOS

IMPORTANT NOTICE

Texas Instruments (TI) reserves the right to make changes to its products or to discontinue any semiconductorproduct or service without notice, and advises its customers to obtain the latest version of relevant informationto 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 atthe time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques areutilized to the extent TI deems necessary to support this warranty. Specific testing of all parameters of eachdevice is not necessarily performed, except those mandated by government requirements.

Certain applications using semiconductor products may involve potential risks of death, personal injury, orsevere property or environmental damage (“Critical Applications”).

TI SEMICONDUCTOR PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED, OR WARRANTEDTO BE SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHERCRITICAL APPLICATIONS.

Inclusion of TI products in such applications is understood to be fully at the risk of the customer. Use of TIproducts in such applications requires the written approval of an appropriate TI officer. Questions concerningpotential 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 operatingsafeguards should be provided by the customer to minimize inherent or procedural hazards.

TI assumes no liability for applications assistance, customer product design, software performance, orinfringement of patents or services described herein. Nor does TI warrant or represent that any license, eitherexpress or implied, is granted under any patent right, copyright, mask work right, or other intellectual propertyright of TI covering or relating to any combination, machine, or process in which such semiconductor productsor services might be or are used.

Copyright 1996, Texas Instruments Incorporated