Home
Texas Instruments TMS470R1x User's Manual
Contents
1. 4 1 System Reguirements 4 1 System Requirements To install and use the code generation tools you need the items in the following hardware and software checklists Hardware checklist Host Display Disk space Required hardware Optional hardware Software checklist Operating system Root privileges CD ROMs 4 2 An HP 9000 Series 700 PA RISC computer Monochrome or color monitor color recommended 4M bytes of disk space CD ROM drive Mouse HP UX 9 0x operating system Root privileges to mount and unmount the CD ROM TMS470R1x Code Generation Tools Installing the Code Generation Tools 4 2 Installing the Code Generation Tools This section helps you install the code generation tools on your hard disk sys tem The software package is shipped on a CD ROM To install the tools on an HP workstation you must mount the CD ROM copy the files to your sys tem and unmount the CD ROM Note If you are running HP UX 9 0x you must have root privileges to mount or unmount the CD ROM If you do not have root privileges get help from your system administrator Mounting the CD ROM Copying the files As root you can mount the CD ROM using the UNIX mount command or the SAM system administration manager To use the UNIX mount command enter the following from a command shell mount rt cdfs dev dsk your cdrom device cdrom exit
2. System Reguirements 2 1 System Requirements To install and use the code generation tools you need the items listed in the following hardware and software checklists Hardware checklist Host Memory Display Required hardware Optional hardware Software checklist Operating system CD ROMs 2 2 32 bit x86 based or Pentium based PC with an ISA EISA bus Minimum of 16M bytes of RAM plus 32M bytes of hard disk space for temporary files and 4M bytes of hard disk space for the code generation tools Monochrome or color monitor color recommended CD ROM drive Microsoft compatible mouse One of these operating systems Lj Windows 95 version 4 0 or higher Lj Windows NT Workstation version 3 5 1 or 4 0 TMS470R1x Code Generation Tools 2 2 Installing the Code Generation Tools Installing the Code Generation Tools This section helps you install the code generation tools on your hard disk sys tem The code generation tools package is shipped on CD ROM To install the tools on a PC running Windows 95 or Windows NT follow these steps 1 Insert the TMS470R1x Code Generation Tools CD ROM into your CD ROM drive 2 Start Windows 3 If you are running Windows 95 select Run from the Start menu If you are running Windows NT select Run from the File menu 4 Inthe dialog box enter the following command where d is the name of your CD
3. Make the hp directory on the CD ROM the current directory For example if the CD ROM is mounted at cdrom enter the following cd cdrom hp L Touse SAM to mount the CD ROM see System Administration Tasks the HP documentation about SAM for instructions After you mount the CD ROM log out as root and log back on as yourself You must create the directory that will contain the tools software and copy the soft ware to that directory 1 Create a tools directory on your hard disk To create this directory enter mkdir your pathname tool dir 2 Copy the files from the CD ROM to your hard disk system cp r your pathname tooldir Setting Up the Code Generation Tools on an HP Workstation 4 3 Installing the Code Generation Tools Setting up the software tools using a C shell If you are using a C shell enter the following 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 cshrc file to avoid entering these commands each time you invoke a new shell Setting up the software tools using a Korn shell If you are using a Bourne or Korn shell enter the following C DIR tool dir A DIR tool dir PATH tool dir PATH You can move the environment variable instructions into your kshrc file to avoid entering these commands each time you invoke a new shell Unmounting the CD ROM 4 4 You must unmount the CD ROM after copying the fil
4. also cause it Action Rerun the program and or restart your computer Troubleshooting DOS Systems A 7 Kernel Error Messages A 8 29 memory error out of range Description Memory was probably corrupted during execution of your program Writing through an invalid or stale alias selector may cause this error Action Check your source code for references to variables that are not 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 Windows make more physical memory available by eliminating or reducing any RAM drives or disk caches You can also edit DEFAULT PIF so that at least 64K bytes of XMS memory is available to non Windows programs Under OS 2 increase the DPMI MEMORY LIMIT in the DOS box set tings 35 general protection fault Description An internal error in DOS 4G was probably detected Faults generated by your program should cause error 2001 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 was detected Action Upgrade to a more recent copy of DOS or upgrade your DOS memory extender 40 notenough available extended memory XMIN Description An incompatibility with your memory manager or its configu ration was d
5. pathname export TMP Be sure to enclose the directory name within quotes For example to set up a directory named temp for intermediate files enter L L Reinitializing your shell For C shells setenv TMP temp For Bourne or Korn shells TMP temp export TMP When you modify your shell configuration file you must ensure that the changes are made to your current session Use one of the following com mands to reread your system initialization file L L For C shells source cshre For Bourne or Korn shells source profile Resetting defined environment variables The environment variables that you define remain set until you reboot the sys tem If you want to clear an environment variable use this command L L For C shells unsetenv variable name For Bourne or Korn shells unset variable name For example to reset the A DIR environment variable enter one of these commands L L For C shells unsetenv A DIR For Bourne or Korn shells unset A DIR Setting Up the Code Generation Tools on an HP Workstation 4 9 Setting Up the Code Generation Environment Where to Go From Here Verifying that the environment variables are set To verify that the environment variables are set enter set This command lists the path and environment variables and their current values 4 4 Where to Go From Here 4 10 Your code generation tools are now installed Now you sh
6. 8 definition B 3 software checklist for DOS systems 1 2 for HP workstations 4 2 for SPARCstations 3 2 for Windows 3 1x systems 1 2 for Windows 95 NT systems 2 2 software interrupts 6 5 Solaris See SPARCstations SPARCstations requirements 3 2 setting up the environment 3 5 to 3 10 software installation 3 3 to 3 4 structure alignment 6 5 definition B 3 subsections 6 4 SunOS See SPARCstations swap file definition B 3 system initialization files cshrc for HP workstations 4 5 to 4 10 for SPARCstations 3 5 to 3 10 profile for HP workstations 4 5 to 4 10 for SPARCstations 3 5 to 3 10 system requirements See hardware checklist soft ware checklist TMP environment variable for DOS systems 1 7 for HP workstations 4 8 to 4 9 for SPARCstations 3 8 to 3 9 for Windows 3 1x systems 1 7 for Windows 95 NT systems 2 7 unmounting CD ROM for HP workstations 4 4 for SPARCstations 3 4 veneer definition B 3 virtual memory definition B 3 walkthrough assembler 5 2 to 5 4 C compiler 5 7 to 5 8 linker 5 2 to 5 4 Index Windows 3 1x systems requirements 1 2 setting up the environment 1 4 software installation 1 3 Windows 95 NT systems requirements 2 2 setting up the environment 2 4 to 2 7 software installation 2 3 Index 5 Index 6 IMPORTANT NOTICE Texas Instruments TI reserves the right to make changes to its products or to discontinue any semiconductor product or service without notice and advises its custom
7. 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 21456 0 40 19 1 0 5 MB sec word transfer rate wait states 3544 0 5 34 4 0 5 MB sec 32 bit transfer rate wait states Overall cpu and memory performance non floating point for typical DOS programs is 7 78 0 62 times an 8MHz IBM PC AT Protected Real switch rate 18078 sec 55 usec switch 33 up 21 down DOS 16M switch mode 11 VCPI Troubleshooting DOS Systems A 3 Troubleshooting in the Protected Mode Environment PMINFO provides the information shown in Table A 1 Table A 1 PMINFO Fields Measurement CPU performance According to BIOS SETUP DOS 16M programs Transfer rates Overall CPU and memory performance Protected real switch rate A 4 Purpose Shows the CPU processor eguivalent and the speed of the CPU in MHz Shows the configured memory in DOS and extended memory as provided by the BIOS interrupts 12h and 15h function 88h 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 those in the BIOS line They are different if the BIOS has reserved memory for itself or if another program has allocated memory and is intercepting the BIOS configura tion reguest
8. OPTION are passedto the linker This enables you to usethe C OPTION environment vari able to specify default compiler and linker options and then specify additional compiler and linker options on the shell command line If you have set z in the environment variable and want to compile only use the c option of the shell These additional examples assume C OPTION is set as shown above QI ec compiles and links CGILAYQ0 e se only compiles cl470 c z lnk cmd compiles and links using a command file cl470 c c z lnk cmd only compiles c overrides z For more information about shell options see the TMS470R1x Optimizing C Compiler User s Guide For more information about linker options see the TMSA70R1x Assembly Language Tools User s Guide Specifying a temporary file directory TMP The compiler shell program creates intermediate files as it processes your pro gram By default the shell puts intermediate files in the current directory How ever you can name a specific directory for temporary files by using the TMP environment variable Using the TMP environment variable allows use of a RAM disk or other file Systems It also allows you to compile source files from a remote directory with out writing any files into the directory where the source resides This is useful for protected directories Setting Up the Code Generation Environment To set the TMP environment variable use this syntax L L Fo
9. ROM drive d setup exe 5 Click on OK 6 Follow the on screen instructions If you choose not to have the environment variables set up automatically you can set them up yourself in one of the following ways Lj Ifyou are running Windows 95 you can set up the environment variables in your autoexec bat file L If you are running Windows NT you can set up the environment variables in the System applet of the Control Panel See Section 2 3 Setting Up the Code Generation Environment on page 2 4 for more information Setting Up the Code Generation Tools With Windows 95 and Windows NT 2 3 Setting Up the Code Generation Environment 2 3 Setting Up the Code Generation Environment Before or after you install the code generation tools you can define environ ment variables that set certain software tool parameters you normally use An environment variable is a special system symbol that you define and assign to a string A program uses this symbol to find or obtain certain types of in formation When you use environment variables default values are set making each individual invocation of the tools simpler because these parameters are auto matically specified When you invoke a tool you can use command line options to override many of the defaults that are set with environment vari ables The code generation tools use the following environment variables L A DIR A C DIR C OPTION L TMP By default the
10. compiler 1 Read Chapter 6 Release Notes This chapter explains the new features included in release 1 20 of the code generation tools Chapter 3 Setting Up the Code Generation Tools With SunOS This chapter helps you install release 1 20 ofthe TMS470R1x code generation tools and set up your code development environment on a SPARCstation run ning SunOS version 4 1 x or higher or Solaris version 2 5 x or higher These tools include an optimizing C compiler and a full set of assembly lan guage tools for developing and manipulating assembly language and object executable code The C compiler tools are composed of the following components Parser Optimizer L Code generator Lj Interlist utility Lj Library build utitlity The assembly language tools are composed of the following components Assembler Lj Archiver Linker Lj Absolute lister Cross reference lister L Hex conversion utility Topic Page 3 1 SystemiRequirements cessive Serene eet t esta ere 3 2 3 2 Installing the Code Generation Tools 3 3 3 3 Setting Up the Code Generation Environment 3 5 3 4 Where to Go EromiHere oa aceae aaa eee ais a terrier etel 3 10 3 1 System Reguirements 3 1 System Requirements To install and use the code generation tools you need the items in the following hardware and software checklists Hardware checklist Host Displ
11. files for DOS 4GW are not shipped as such nor is any documentation provided on this tool except for the list of error messages Section A 2 Kernel Error Messages and Section A 3 DOS 4G Error Mes sages are excerpted from the DOS 4GW User s Manual reproduced here with the permission of Tenberry Software Inc Included are lists of error mes sages with descriptions of the circumstances in which the error is most likely to occur and suggestions for remedying the problem Portions of the excerpt have been modified to provide you with specific information about using TI tools Topic Page A 1 Troubleshooting in the Protected Mode Environment A 2 A 2 Kernel Error Messages nonesa ereenn ETE A 5 A 3 DOS AG Error Messages Aae eee A 9 A 1 Troubleshooting in the Protected Mode Environment A 1 Troubleshooting in the Protected Mode Environment A 2 Getting 32 bit programs to execute properly under DOS can be frustrating Your computer s configuration and memory management can cause problems that may be difficult to find because many programs are interacting This list of error messages is reproduced in Section A 2 on page A 5 and Section A 3 on page A 9 because they may occur when you are executing any tools since all of the tools have been assembled along with the DOS 4GW memory extender When reading this material consider these items J When an Action directs you to technical support determine the co
12. for SPARCstations 3 2 for Windows 3 1x systems 1 2 for Windows 95 NT systems 2 2 HP workstations requirements 4 2 setting up the environment 4 5 to 4 10 software installation 4 3 to 4 4 installation software for DOS systems 1 3 for HP workstations 4 3 to 4 4 for SPARCstations 3 3 for Windows 3 1x systems 1 3 for Windows 95 NT systems 2 3 interlist utility definition B 2 described 5 8 enhancements 6 5 invoking assembler 5 2 to 5 4 compiler 5 7 to 5 8 linker 5 2 to 5 6 kernel error messages A 5 to A 8 linker definition B 2 linker walkthrough 5 2 to 5 4 Ink470 definition B 2 invoking 5 3 media contents 6 2 6 3 HP workstations 6 2 PCs with DOS 6 3 PCs with Windows 3 1x 6 3 PCs with Windows 95 NT 6 3 SPARCstations 6 2 MEMORY directive 5 5 memory requirements for DOS systems 1 2 for Windows 3 1x systems 1 2 for Windows 95 NT systems 2 2 Index modifying PATH statement for DOS systems 1 5 for HP workstations 4 6 for SPARCstations 3 6 for Windows 3 1x systems 1 5 for Windows 95 NT systems 2 5 mounting CD ROM for HP workstations 4 3 for SPARCstations 3 3 mouse requirements for DOS systems 1 2 for HP workstations 4 2 for SPARCstations 3 2 for Windows 3 1x systems 1 2 for Windows 95 NT systems 2 2 MS DOS PMINFO A 3 to A 10 notational conventions iii operating system for DOS systems 1 2 for HP workstations 4 2 for SPARCstations 3 2 for Windows 3 1x systems 1 2 for Windows 95 NT system
13. in the United States and other countries licensed exclusively through X Open Company Limited X Window System is a trademark of the Massachusetts Institute of Tech nology Read This First V If You Need Assistance If You Need Assistance jj World Wide Web Sites TI Online http www ti com Semiconductor Product Information Center PIC http www ti com sc docs pic home htm Microcontroller Home Page http www ti com sc micro g North America South America Central America Product Information Center PIC 972 644 5580 TI Literature Response Center U S A 800 477 8924 Software Registration Upgrades 214 638 0333 Fax 214 638 7742 U S A Factory Repair Hardware Upgrades 281 274 2285 U S Technical Training Organization 972 644 5580 Microcontroller Hotline 281 274 2370 Fax 281 274 4203 Email micro ti com Microcontroller Modem BBS 281 274 3700 8 N 1 Europe Middle East Africa European Product Information Center EPIC Hotlines Multi Language Support 33 130701169 Fax 33 1 30 70 1032 Email epic ti com Deutsch 49 8161 80 33 11 or 33 1 30 70 11 68 English 33 1 30 70 11 65 Francais 33 1 30 70 11 64 Italiano 33 1 30 70 11 67 EPIC Modem BBS 33 1 30 70 11 99 European Factory Repair 33 4 93 22 25 40 Europe Customer Training Helpline Fax 49 81 61 80 40 10 L Asia Pacific Literature Response Center 852 2 956 7288 Fax 852 2 956 2200 Japan Product Information Center 0120 81 0026 in Japa
14. installation program modifies your autoexec bat file and sets up these environment variables set PATH c Ntool dir PATH set A DIR c Mtool dir set C DIR c Ntool dir These variables are set up in the registry under HKEY CURRENT USERNEnvironment If you choose not to have the environment variables set up automatically you can set them up yourself in one of the following ways 1 If you are running Windows 95 you can modify your autoexec bat file to include the set commands above Lj If you are running Windows NT you can set up the environment variables in the System applet of the Control Panel Enter the same commands that you would enter on the command line in the System applet In addition to setting up environment variables you must modify your path statement The following subsections describe how to modify your path state ment and how to define the environment variables that the code generation tools use Setting Up the Code Generation Environment Identifying the directory that contains the executable files PATH statement You must include the tool dirdirectory in your PATH statement so that you can specify the assembler and compiler tools without specifying the name of the directory that contains the executable files Youcan change the path information in one of the following ways m f you are running Windows 95 modify your autoexec bat file to change the path information by adding the fo
15. macro librar ies You can separate the pathnames with a semicolon or a blank Once you set A DIR you can use the copy include or mlib directive in assembly source without specifying path information If the assembler does not find the file in the directory that contains the current source file or in directories named by the i option which names alternate di rectories it searches the paths named by the A DIR environment variable Setting Up the Code Generation Environment For more information on the i option see the TMS470R1x Assembly Lan guage Tools User s Guide or the TMS470R1x Optimizing C Compiler User s Guide Identifying alternate directories for the compiler to search C DIR The compiler uses the C DIR environment variable to name alternate direc tories that contain include files and function libraries To set the C DIR envi ronment variable use this syntax Li For C shells setenv C DIR pathname pathnameo g For Bourne or Korn shells C DIRz pathname pathnameo export C DIR Be sure to enclose the directory names within quotes The pathnames are directories that contain include files or libraries such as stdio h You can separate pathnames with a semicolon or with blanks In C source you can use the include directive without specifying path information Instead you can specify the path information with C DIR Setting default shell options C OPTION You may find it use
16. semicolon or with ablank In C source you can use the include directive without specifying path information Instead you can specify the path information with C DIR Setting Up the Code Generation Tools With DOS or Windows 3 1x 1 5 Setting Up the Code Generation Environment Setting default shell options C OPTION You might find it useful to set the compiler assembler and linker shell default options using the C OPTION environment variable If you do this the shell uses the default options and or input filenames that you name with C OPTION every time you run the shell Setting the default options with the C OPTION environment variable is useful when you want to run the shell consecutive times with the same set of options and or input files After the shell reads the command line and the input file names it reads the C OPTION environment variable and processes it To set the C OPTION environment variable use this syntax set C OPTION option optiono Environment variable options are specified in the same way and 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 environment variable as follows set C OPTION qs z In the following examples each time you run the compiler shell it runs the linker Any options following on the command line or in C OPTION
17. vi C compiler walkthrough 5 7 to 5 8 C_DIR environment variable for DOS systems 1 5 for HP workstations 4 7 for SPARCstations 3 7 for Windows 3 1x systems 1 5 for Windows 95 NT systems 2 6 C_OPTION environment variable for DOS systems 1 6 for HP workstations 4 7 to 4 8 for SPARCstations 3 7 to 3 8 for Windows 3 1x systems 1 6 for Windows 95 NT systems 2 6 CD ROM mounting for HP workstations 4 3 for SPARCstations 3 3 Index CD ROM continued requirements for DOS systems 1 2 for HP workstations 4 2 for SPARCstations 3 2 for Windows 3 1x systems 1 2 for Windows 95 NT systems 2 2 retrieving files from copying for HP workstations 4 4 for SPARCstations 3 4 unmounting for HP workstations 4 4 for SPARCstations 3 4 cl470 definition B 1 invoking 5 7 clink directive 6 4 code generation tools for DOS systems 1 2 for HP workstations 4 2 for SPARCstations 3 2 for Windows 3 1x systems 1 2 for Windows 95 NT systems 2 2 code generator definition B 1 COFF creating object file 5 8 definition B 1 version 1 switch 6 4 version 2 support 6 4 compiler definition B 1 conditionally linked sections 6 4 cshrc file for HP workstations 4 5 to 4 10 for SPARCstations 3 5 to 3 10 Index 1 Index directives MEMORY 5 5 SECTIONS 5 5 directories software tools for DOS systems 1 5 for HP workstations 4 3 4 6 for SPARCstations 3 4 3 6 for Windows 3 1x systems 1 5 for Windows 95 NT systems 2 5
18. you started using the compiler linker and assembler Lj Provides a list of the media contents for your tools set so you will know what information is associated with each file you have installed Details enhancements in this release and tells you where to find further information Lj Describes how you can resolve problems that you may encounter on a PC running DOS MS DOS or PC DOS Notational Conventions In this document the following notational conventions are used Program listings program examples and interactive displays are shown ina special typeface Examples use a bold version of the spe cial typeface for emphasis Interactive displays use bold to distinguish commands that you enter from items that the system displays such as prompts command output error messages etc Some interactive displays use italics to describe the type of information that should be entered Here is a sample program listing 0011 0005 00001 field JA 0012 0005 0003 field 3 4 0013 0005 0006 field 6 3 0014 0006 even Notational Conventions Related Documentation From Texas Instruments Here is an example of a command that you might enter set PATH c Xtool dir PATH To change your path statement to use the tools enter the command text as shown in bold and replace tool dir with the name of your tools direc tory In syntax descriptions the instruction command or directive is in a bold typeface font and param
19. 0 filel obj text 00001010 0000000c file2 0bj text bss 0 00000000 00000000 UNINITIALIZED 00000000 00000000 file2 0bj bss 00000000 00000000 filel obj bss GLOBAL SYMBOLS address name address name 00000000 bss 00000000 edata 00000000 data 00000000 bss 00001000 text 00000000 end 00000000 edata 00000000 data 00000000 end 00001000 text 0000101c etext 00001010 inclw 00001010 inclw 0000101c etext 7 symbols Getting Started With the C Compiler 5 2 Getting Started With the C Compiler The TMS470R1x C compiler consists of many phases including parsing opti mization and code generation The simplest way to compile is to use the shell program which is included with the compiler This section provides a guick walkthrough so that you can get started without reading the entire TMS470R1x Optimizing C Compiler User s Guide 1 Create a sample file called function c that contains the following code BRK AAA AAA A AKA AXA k k ck k ck k ck ck ck ck ck AXA AXA ke ok x kk function c Sample file for walkthrough BORK RK AAA AAA A kCK Ck k Ck k k ck k ck ck ck ck ck ck ck AXA kk ke x ke x int main int i return i lt 0 lt i i L1 3 To invoke the shell program to compile and assemble function c enter c1470 o function By default the TMS470R1x shell program compiles and assembles 32 bit instructions To compile 16 bit instructions use the mt option cl470 o mt funtion The
20. 000 E2977001 inclw ADDS r7 r7 1 5 00000004 22966001 ADDCSS r6 r6 1 6 00000008 E1AOFOOE MOV pe lf 7 8 end No Errors No Warnings 4 Now enter the following command to link file1 obj and file2 obj 1nk470 filel file2 m lnker2 map o prog out The Ink470 command invokes the linker The input object files are file1 obj and file2 obj If the input file extension is obj you do not have to specify the extension the linker uses obj as the default The linker combines file1 obj and file2 obj to create an executable object module called prog out The o option supplies the name of the output module Example 5 4 shows the map file resulting from this operation The map file is produced only if you use the m option Getting Started With the Code Generation Tools 5 3 Getting Started With the Assembler and Linker Example 5 4 Output Map File Inker2 map KKK KK KKK KK KKK KKK A X KKK KKK KKK MAA KR KKK KKK KKK KKK KKK KKK KKK TMS470 COFF Linker KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK KKK Sat Feb OUTPUT FILE NAME 8 15 24 43 1997 ENTRY POINT SYMBOL 0 Version 1 20 lt prog out gt SECTION ALLOCATION MAP output attributes section page origin length input sections text 00000000 0000001c 00000000 00000010 filel obj text 00000010 0000000c file2 0bj text const 00000000 00000000 UNINITIALIZE
21. 17 system software does not follow VCPI or DPMI specifications Description Some memory resident program has put your 386 or 486 CPU into virtual 8086 mode This is done to provide special memory services to DOS programs such as EMS simulation EMS interface without EMS hardware or high memory In this mode it is not possible to switch into protected mode unless the resident software follows a standard that DOS 16M supports DPMI VCPI and XMS are the most common Action Contact the vendor of your memory management software 22 cannot free memory Description Memory was probably corrupted during execution of your program Action Make more memory available and try again 23 no memory for VCPI page table Description There is not enough memory to load DOS 4G Action Make more memory available and try again 24 VCPI page table address incorrect Description There is an internal error Action Contact technical support 25 cannot initialize VCPI Description An incompatibility with other software was detected DOS 16M has detected that VCPI is present but VCPI returns an error when DOS 16M tries to initialize the interface Action Find the other software that uses VCPI and disable it stop its execution 28 memory error avail loop Description Memory was probably corrupted during execution of your program Using an invalid or stale alias selector may cause this error Incorrect manipulation of segment descriptors may
22. D data 00000000 00000000 UNINITIALIZED 00000000 00000000 file2 obj data 00000000 00000000 filel obj data bss 00000000 00000000 UNINITIALIZED 00000000 00000000 file2 obj bss 00000000 00000000 filel obj bss GLOBAL SYMBOLS address name address name 00000000 bss 00000000 edata 00000000 data 00000000 bss 00000000 text 00000000 end 00000000 edata 00000000 data 00000000 end 00000000 text 0000001c etext 00000010 inclw 00000010 inclw 0000001c etext 7 symbols Getting Started With the Assembler and Linker The two files file1 and file2 can be linked together with or without a com mand file However using a command file allows you to configure your memory using the MEMORY and SECTIONS directives J The MEMORY directive lets you specify a model of target memory so that you can define the types of memory your system contains and the address ranges they occupy J The SECTIONS directive describes how input sections are combined into output sections and specifies where output sections are placed in memory You can include the linker options and filenames in the linker command file or you can enter them on the command line If you do not include a linker command file the linker uses a default allocation algorithm Refer to the TMS470R1x Assembly Language Tools User s Guide for more in formation about the linker command file and the default allocation algo rithm Example 5 5 Sample Linker Command File lin
23. ED TO BE SUITABLE FOR USE IN LIFE SUPPORT APPLICATIONS DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS Inclusion of TI products in such applications is understood to be fully at the risk of the customer Use of TI products in such applications requires the written approval of an appropriate TI officer Questions concerning potential risk applications should be directed to TI through a local SC sales office In order to minimize risks associated with the customer s applications adequate design and operating safeguards should be provided by the customer to minimize inherent or procedural hazards TI assumes no liability for applications assistance customer product design software performance or infringement of patents or services described herein Nor does TI warrant or represent that any license either express or implied is granted under any patent right copyright mask work right or other intellectual property right of TI covering or relating to any combination machine or process in which such semiconductor products or services might be or are used Copyright 1997 Texas Instruments Incorporated Preface Read This First About This Manual The TMS470R1x Code Generation Tools Getting Started Guide tells you how to install release 1 20 of the TMS470R1x code generation tools on your sys tem It also provides the following information Lj Tells you how to set environment variables for parameters that you use often Gets
24. Generation Tools With Windows 95 and Windows NT 2 5 Setting Up the Code Generation Environment Identifying alternate directories for the compiler to search C DIR The compiler uses the C DIR environment variable to name alternate direc tories that contain include files and function libraries To set the C DIR envi ronment variable use this syntax set C DIR paihname pathname gt The pathnames are directories that contain include files or libraries such as stdio h You can separate the pathnames with a semicolon or with a blank In C source you can use the include directive without specifying path informa tion Instead you can specify the path information with C DIR Setting default shell options C OPTION 2 6 You may find it useful to set the compiler assembler and linker default shell options using the C OPTION environment variable If you do this the shell usesthe default options and or input filenames that you name with C OPTION every time you run the shell Setting up default options with the C OPTION environment variable is useful when you want to run the shell consecutive times with the same set of options and or input files After the shell reads the command line and the input file names it reads the C OPTION environment variable and processes it To set the C OPTION environment variable use this syntax set C OPTIONzoption option Environment variable options are specified in the same way
25. Messages A 2 Kernel Error Messages This section describes error messages from the DOS 16M kernel embedded in the TMS470R1x code generation tools Kernel error messages can occur because of severe resource shortages corruption of the executable file cor ruption of memory operating system incompatibilities or internal errors All of these messages are quite rare DOS 16M protected mode available only with 386 or 486 Description DOS4G did not detect the presence of a 386 486 or Pen tium based processor Action If you are running the tools on a 386 or later PC rerun the program If you are running the tools on a 286 PC reinstall and run the tools on a 386 PC or later 0 involuntary switch to real mode Description The computer was in protected mode but switched to real mode without going through DOS 16M This error most often occurs because of an unrecoverable stack segment exception stack overflow but can also occur if the global descriptor 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 lt filename gt 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 program Description There is not enough memory to load DOS 4G Action Make more memory available and try again 8 cannot open fi
26. TEXAS INSTRUMENTS TMS470R1x Code Generation Tools Release 1 20 Getting Started Guide 1997 Microcontroller Products 13 TEXAS INSTRUMENTS Printed in U S A March 1997 SPNU117B M414003 9741 revision B TMS470R1x Code Generation Tools Getting Started Guide Release 1 20 Literature Number SPNU117B Manufacturing Part Number M414003 9741 revision B March 1997 X PRINTED WITH TEXAS a SOYINK INSTRUM ENTS Printed on Recycled Paper IMPORTANT NOTICE Texas Instruments TI reserves the right to make changes to its products or to discontinue any semiconductor product or service without notice and advises its customers to obtain the latest version of relevant information to verify before placing orders that the information being relied on is current Tl warrants performance of its semiconductor products and related software to the specifications applicable at the time of sale in accordance with Tl s standard warranty Testing and other quality control techniques are utilized to the extent TI deems necessary to support this warranty Specific testing of all parameters of each device is not necessarily performed except those mandated by government requirements Certain applications using semiconductor products may involve potential risks of death personal injury or severe property or environmental damage Critical Applications TI SEMICONDUCTOR PRODUCTS ARE NOT DESIGNED INTENDED AUTHORIZED OR WARRANT
27. TION environment vari able to specify default compiler and linker options and then specify additional compiler and linker options on the shell command line If you have set z in the environment variable and want to compile only use the c option of the shell These additional examples assume C OPTION is set as shown above el470 c compiles and links eLL70 6 ce only compiles c1470 c z lnk cmd compiles and links using a command file cl470 c c z lnk cmd only compiles c overrides z For more information about shell options see the TMS470R1x Optimizing C Compiler User s Guide For more information on linker options see the TMS470R1x Assembly Language Tools User s Guide Specifying a temporary file directory TMP The compiler shell program creates intermediate files as it processes your program By default the shell puts intermediate files in the current directory However you can name a specific directory for temporary files by using the TMP environment variable Using the TMP environment variable allows use of a RAM disk or other file systems It also allows you to compile source files from a remote directory with out writing any files into the directory where the source resides This is useful for protected directories Setting Up the Code Generation Environment To set the TMP environment variable use this syntax L L For C shells setenv TMP pathname For Bourne or Korn shells TMP
28. an t load executable format for file filename error code gt Description DOS 4G did not recognize the specified file as a valid execut able file DOS 4G can load linear executables LE and LX and EXPs BW Action Recopy the file from the source media Troubleshooting DOS Systems A 9 DOS 4G Error Messages 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 supports the LINEXE format it may contain a construct that DOS 4G does not currently support such as a call gate One of these messages may also appear if your program has a problem mixing 16 and 32 bit code A linker error is another likely cause Action Check for viruses and reinstall the tools from the source media If the problem persists contact technical support Appendix B Glossary asm470 The name of the command that invokes the assembler for the TMS470R1x assembler A software program that creates a machine language program from a source file that contains assembly language instructions direc tives and macro definitions The assembler substitutes absolute opera tion codes for symbolic operation codes and absolute or relocatable addresses for symbolic addresses C compiler A software program that translates C source statements into assembly language source statements c
29. and 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 environment variable as follows set C OPTION qs z In the following examples each time you run the compiler shell it runs the linker Any options following z on the command line or in C OPTION are passed to the linker This enables you to use the C OPTION environment vari able to specify default compiler and linker options and then specify additional compiler and linker options on the shell command line If you have set z in the environment variable and want to compile only use the c option of the shell These additional examples assume C OPTION is set as shown above GL4TO 46 compiles and links c1470 c c only compiles cl470 c z lnk cmd compiles and links using a command file cl470 c c z lnk cmd only compiles c overrides z Setting Up the Code Generation Environment For more information about shell options see the TMS470R1x Optimizing C Compiler User s Guide For more information about linker options see the TMS470R1x Assembly Language Tools User s Guide Specifying a temporary file directory TMP The compiler shell program creates intermediate files as it processes your pro gram By default the shell puts intermediate files in the current directory How ever you can name a s
30. are passedto the linker This enables you to usethe C OPTION environment vari able to specify default compiler and linker options and then specify additional compiler and linker options on the shell command line If you have set z in the environment variable and want to compile only use the c option of the shell These additional examples assume C OPTION is set as shown above c1470 c compiles and links SLAVE Me only compiles 1470 se z lnk cmd compiles and links using a command file cl470 c c z lnk cmd only compiles c overrides z For more information about shell options see the TMS470R1x Optimizing C Compiler User s Guide For more information about linker options see the TMS470R1x Assembly Language Tools User s Guide Setting Up the Code Generation Environment Specifying a temporary file directory TMP The compiler shell program creates intermediate files as it processes your program By default the shell puts intermediate files in the current directory However you can name a specific directory for temporary files by using the TMP environment variable Using the TMP environment variable allows use of a RAM disk or other file systems It also allows source files to be compiled from a remote directory without writing any files into the directory where the source resides This is useful for protected directories To set the TMP environment variable use this syntax set TMP pathname For example t
31. athnames with a semicolon or a blank Once you set A_DIR you can use the copy include or mlib directive in assembly source without specifying path information If the assembler does not find the file in the directory that contains the current source file or in directories named by the i option which names alternate directories it searches the paths named by the A_DIR environment variable For more information on the i option see the TMS470R1x Assembly Language Tools User s Guide or the TMS470R1x Optimizing C Compiler User s Guide Setting Up the Code Generation Environment Identifying alternate directories for the compiler C DIR The compiler uses the C DIR environment variable to name alternate direc tories that contain include files and libraries To set the C DIR environment variable use this syntax Li For C shells setenv C DIR pathname pathnameo g For Bourne or Korn shells C DIRz pathname pathnameo export C DIR Be sure to enclose the directory names within quotes The pathnames are directories that contain include files or libraries such as stdio h You can separate pathnames with a semicolon or with blanks In C source you can use the include directive without specifying path information Instead you can specify the path information with C DIR Setting default shell options C OPTION You may find it useful to set the compiler assembler and linker shell default option
32. ay Disk space Required hardware Optional hardware Software checklist Operating system Root privileges CD ROMs 3 2 SPARCstation compatible system with a SPARCstation 2 class or higher performance Monochrome or color monitor color recommended 4M bytes of disk space CD ROM drive Mouse SunOS version 4 1 x or higher or SunOS version 5 x also known as Solaris 2 x using an X Window System based window manag er such as OpenWindows version 3 0 or higher If you are running SunOS 4 1 x 5 0 or 5 1 you musthave root privi leges to mount and unmount the CD ROM If you do not have root privileges get help from your system administrator TMS470R1x Code Generation Tools 3 2 Installing the Code Generation Tools Installing the Code Generation Tools This section helps you install the code generation tools on your hard disk sys tem The software package is shipped on a CD ROM To install the tools on a SPARCstation running SunOS or Solaris you must mount the CD ROM copy the files to your system and unmount the CD ROM Note If you are running SunOS 4 1 x 5 0 or 5 1 you must have root privileges to mount or unmount the CD ROM If you do not have root privileges get help from your system administrator Mounting the CD ROM The steps to mount the CD ROM vary according to your operating system version Li If you have SunOS 4 1 x as root
33. cece tenet eee eee 3 10 4 Setting Up the Code Generation Tools on an HP Workstation 4 1 Provides installation instructions for HP 9000 Series 700 PA RISC computers running HP UX 4 31 System Requirements 0 000 unaenea eee n 4 2 Hardware checklist asutis aeea t cece ee eee eee eee eee 4 2 Software checklist cc krauna oh zb bb cca a dah ra a zak NM APAPUID eng neers 4 2 4 2 Installing the Code Generation Tools 00 0 cece eee eee 4 3 Mounting the CD ROM sssssssssssse seh nh 4 3 Copying the files 0 cee ccc teen ene n 4 3 Setting up the software tools using a C shell 0 ks 4 4 Setting up the software tools using a Korn shell L 4 4 Unmounting the CD ROM sssssssesse ess nh 4 4 4 3 Setting Up the Code Generation Environment ccc eee eee eens 4 5 Identifying the directory that contains the executable files path statement 4 6 Identifying alternate directories for the assembler A DIR esse 4 6 Identifying alternate directories for the compiler C DIR eaaa a aaan 4 7 Setting default shell options C OPTION 2 cece eee eee 4 7 Specifying a temporary file directory TMP Lakis 4 8 Reinitializing your shell III 4 9 Resetting defined environment variables lt 4 9 Verifying that the environment variables are set 4 10 44 Where to Go From Here 2 00 cece eet hn 4 10 viii Content
34. code development environment on a 32 bit x86 based or Pentium PC running MS DOS PC DOS or Windows 3 1x These tools include an optimizing C compiler and a full set of assembly language tools for developing and manipulating assembly language and object executable code The C compiler tools are composed of the following components Parser Optimizer Code generator Interlist utility Library build utility O O O O L The assembly language tools are composed of the following components Assembler Archiver Linker Absolute lister Cross reference lister Hex conversion utility O O O O O L Topic Page 1219 System Requirements 5 1 a a rete e iee a a ele eee a ale 1 2 1 2 Installing the Code Generation Tools 1 3 1 3 Setting Up the Code Generation Environment 1 4 1 4 Performance Considerations 444s 1 8 1 5 Where Do We Go From Here en 1 8 System Reguirements 1 4 System Requirements To install and use the code generation tools you need the items listed in the following hardware and software checklists Hardware checklist Host Memory Display Required hardware Optional hardware Software checklist Operating system CD ROM 32 bit x86 based or Pentium based PC with an ISA EISA bus 4M 16M bytes of RAM plus 32M bytes of hard disk space f
35. de generation tools are now installed Now you should do each of the following tasks Go to Chapter 5 Getting Started With the Code Generation Tools This chapter provides you with an overview of how to invoke and use the assembler linker and compiler 1 Read Chapter 6 Release Notes This chapter explains the new features included in release 1 20 of the code generation tools Chapter 4 Setting Up the Code Generation Tools on an HP Workstation This chapter helps you install release 1 20 ofthe TMS470R1x code generation tools and set up your code development environment on an HP 9000 Series 700 PA RISC computer with HP UX 9 0x These tools include an optimiz ing C compiler and a full set of assembly language tools for developing and manipulating assembly language and object executable code The C compiler tools are composed of the following components 1 Parser Optimizer Code generator Interlist utility Library build utility The assembly language tools are composed of the following components Assembler Lj Archiver g Linker Lj Absolute lister Cross reference lister Lj Hex conversion utility Topic Page 4 1 System Requirements cece teen a 4 2 4 2 Installing the Code Generation Tools 4 3 4 3 Setting Up the Code Generation Environment 4 5 4 47 Where to Go Eromi Here 7 0 eee serere tate riter rins 4 10
36. disk space requirements for HP workstations 4 2 for SPARCstations 3 2 display requirements for DOS systems 1 2 for HP workstations 4 2 for SPARCstations 3 2 for Windows 3 1x systems 1 2 for Windows 95 NT systems 2 2 DOS systems requirements 1 2 setting up the environment 1 4 software installation 1 3 DOS 16M definition B 2 DOS 4G definition B 1 error messages A 9 to A 10 DOS 4GW definition B 2 described A 1 enhancements assembler 6 4 C compiler 6 5 to 6 6 general 6 4 environment setup for DOS systems 1 4 for HP workstations 4 5 to 4 10 for SPARCstations 3 5 to 3 10 for Window 3 1x systems 1 4 for Windows 95 NT systems 2 4 to 2 7 Index 2 environment variables A DIR 1 5 2 5 3 6 to 3 7 4 6 C_DIR 1 5 2 6 3 7 4 7 C OPTION 1 6 2 6 3 7 to 3 8 4 7 to 4 8 definition B 2 for DOS systems 1 4 for HP workstations 4 5 to 4 10 for SPARCstations 3 5 to 3 10 for Window 3 1x systems 1 4 for Windows 95 NT systems 2 4 to 2 7 resetting 1 7 2 7 3 9 4 9 TMP 1 7 2 7 3 8 to 3 9 4 8 to 4 9 verifying 1 7 2 7 3 10 4 10 error messages DOS AG A 9 to A 10 kernel A 5 to A 8 example assembler 5 2 to 5 3 compiler 5 7 to 5 8 linker 5 4 to 5 6 PMINFO A 3 filename length 6 4 global register variables 6 5 hardware checklist for DOS systems 1 2 for HP workstations 4 2 for SPARCstations 3 2 for Windows 3 1x systems 1 2 for Windows 95 NT systems 2 2 host system for DOS systems 1 2 for HP workstations 4 2
37. ence utility include header files for RTS assert h limits h stdarg h ctype h math h stddef h errno h setjmp h stdio h float h stdlib h string h time h Table 6 2 Media Contents for PCS File readme 1st abs470 exe ac470 exe ar470 exe asm470 exe cg470 exe cl470 exe clist exe hex470 exe intvecs asm Ink470 exe Ink16 cmd Ink32 cmd mk470 exe opt470 exe pminfo32 exet rts16 lib rts32 lib rts src xref470 exe h Media Contents Description Online release bulletin Absolute lister ANSI C parser Archiver Assembler Code generator Compiler shell program C source interlist utility Hex conversion utility Sample interrupt vector setup file COFF linker Sample 16 bit linker command file Sample 32 bit linker command file Library build utility C optimizer Utility to measure protected real mode switching 16 bit runtime support library 32 bit runtime support library C runtime support source library Cross reference utility include header files for RTS assert h limits h stdarg h stdlib h ctype h math h stddef h string h errno h setjmp h stdio h time h float h This file is included only in the tool kit for PCs running DOS Release Notes Release Enhancemenis 6 2 Release Enhancements Release 1 20 of the TMS470R1x code generation tools contains general enhancements as well as enhancements specific to the assembler and compiler The following sections list these enhancements General enhance
38. ers to obtain the latest version of relevant information to verify before placing orders that the information being relied on is current Tl warrants performance of its semiconductor products and related software to the specifications applicable at the time of sale in accordance with Tl s standard warranty Testing and other quality control techniques are utilized to the extent TI deems necessary to support this warranty Specific testing of all parameters of each device is not necessarily performed except those mandated by government requirements Certain applications using semiconductor products may involve potential risks of death personal injury or severe property or environmental damage Critical Applications TI SEMICONDUCTOR PRODUCTS ARE NOT DESIGNED INTENDED AUTHORIZED OR WARRANTED TO BE SUITABLE FOR USE IN LIFE SUPPORT APPLICATIONS DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS Inclusion of TI products in such applications is understood to be fully at the risk of the customer Use of TI products in such applications requires the written approval of an appropriate TI officer Questions concerning potential risk applications should be directed to TI through a local SC sales office In order to minimize risks associated with the customer s applications adequate design and operating safeguards should be provided by the customer to minimize inherent or procedural hazards TI assumes no liability for applications assista
39. es As root enter the fol lowing from a command shell cd umount cdrom exit Setting Up the Code Generation Environment 4 3 Setting Up the Code Generation Environment Before or after you install the code generation tools you can define environ ment variables that set certain software tool parameters you normally use An environment variable is a special system symbol that you define and assign to a string A program uses this symbol to find or obtain certain types of information When you use environment variables default values are set making each individual invocation of the tools simpler because these parameters are auto matically specified When you invoke a tool you can use command line op tions to override many of the defaults that are set with environment variables The code generation tools use the following environment variables L A DIR Lj C DIR C OPTION L TMP You can set up the environment variables o the command line or in your login or cshrc file for C shells or profile file for Bourne or Korn shells To set up these environment variables in your system initialization file enter the same commands that you would enter on the command line in the file In addition to setting up environment variables you must modify your path statement The following subsections describe how to modify your path state ment and how to define the environment variables that the code generation tools use Settin
40. etected Action Try configuring the memory manager to provide more ex tended memory or change memory managers DOS 4G Error Messages A 3 DOS 4G Error Messages DOS 4G errors are more common than kernel errors when using DOS 4G or DOS 4GW with the TMS470R1x code generation tools They are usually re lated to an unknown path name corrupt files or memory problems Memory problems can include inadequate memory poor configuration or corrupted memory 1000 can t hook interrupts Description A DPMI host has prevented DOS 4G from loading Action Contact technical support 1001 error in interrupt chain Description A DOS 4G internal error was detected Action Contact technical support 1003 can t lock extender kernel in memory Description DOS 4G could not lock the kernel in physical memory prob ably because of a memory shortage Action Free some memory for the DOS 4G application 1005 not enough memory for dispatcher data Description There is not enough memory for DOS 4G to manage user installed interrupt handlers properly Action Free some memory for the DOS 4G application 1007 can t find file lt program gt to load Description DOS 4G could not open the specified program The file prob ably does not exist It is possible that DOS ran out of file han dles or that a network or similar utility has prohibited read ac cess to the program Action Make sure that the filename was spelled correctly 1008 c
41. eters are auto matically specified When you invoke a tool you can use command line options to override many of the defaults that are set with environment vari ables The code generation tools use the following environment variables L A DIR A C DIR C OPTION L TMP By default the installation program modifies your autoexec bat file and sets up these environment variables set PATH c Ntool dir PATH set A DIR c Ntool dir set C DIR 2c Ntool dir If you choose not to have the environment variables set up automatically you can modify your autoexec bat file to include the set commands above In addition to setting up environment variables you must modify your path statement The following subsections describe how to modify your path state ment and how to define the environment variables that the code generation tools use Setting Up the Code Generation Environment Identifying the directory that contains the executable files PATH statement You must include the tool dirdirectory in your PATH statement so that you can specify the assembler and compiler tools without specifying the name of the directory that contains the executable files Lj If you modify your autoexec bat file to change the path information add the following to the end of the PATH statement c Ntool dir J Ifyou set the PATH statement from the command line enter the following set PATH c Ntool dir PATH The addition of PATH ensures that th
42. eters are in an italic typeface Portions of a syntax that are in bold should be entered as shown portions of a syntax that are in italics describe the type of information that should be entered Here is an example of a command that you might use mkdir tool dir In this example you would type mkdir as shown and replace too dir with the name of your directory Square brackets and identify an optional parameter If you use an op tional parameter you specify the information within the brackets you don t enter the brackets themselves Here s an example of a command that has optional parameters SET C DIRzpathname pathnamee Settingthe C DIR environment variable allows you to specify one or more pathnames for the C compiler to search Related Documentation From Texas Instruments The following books describe the TMS470R1x and related support tools To obtain a copy of any of these TI documents call the Texas Instruments Litera ture Response Center at 800 477 8924 When ordering please identify the book by its title and literature number TMS470R1x Assembly Language Tools User s Guide literature number SPNU118 describes the assembly language tools assembler linker and other tools used to develop assembly language code assembler directives macros common object file format and symbolic debugging directives for the TMS470R1x devices TMS470R1x Optimizing C Compiler User s Guide literature n
43. ful to set the compiler assembler and linker default shell options using the C OPTION environment variable If you do this the shell uses the default options and or input filenames that you name with C OPTION every time you run the shell Setting up default options with the C OPTION environment variable is useful when you want to run the shell consecutive times with the same set of options and or input files After the shell reads the command line and the input file names it reads the C OPTION environment variable and processes it To set the C OPTION environment variable use this syntax For C shells setenv C OPTION option options g For Bourne or Korn shells C_OPTION option options export C OPTION Setting Up the Code Generation Tools With SunOS 3 7 Setting Up the Code Generation Environment Be sure to enclose the options within quotes Environment variable options are specified in the same way and have the same meaning as they do on the command line For example if you want to always run quietly the g option enable C source interlisting the s option and link the z option set up the C OPTION environment variable as follows g For C shells setenv C OPTION qs z g For Bourne or Korn shells C OPTION qs z export C OPTION In the following examples each time you run the compiler shell it runs the linker Any options following on the command line or in C
44. g Up the Code Generation Tools on an HP Workstation 4 5 Setting Up the Code Generation Environment Identifying the directory that contains the executable files path statement You must include the too dir directory in your path statement so that you can specify the assembler and compiler tools without specifying the name of the directory that contains the executable files Ifyou modify your cshrc file for C shells or profile file for Bourne or Korn shells to change the path information add the following to the end of the path statement your_pathname tool_dir Lj If you set the path statement from the command line use this format m ForC shells set path your_pathname tool_dir path m For Bourne or Korn shells PATH your_pathname tool_dir PATH The addition of path or PATH ensures that this path statement does not undo the path statements in the cshrc or profile file Identifying alternate directories for the assembler A_DIR 4 6 The assembler uses the A_DIR environment variable to name alternative directories for the assembler to search To set the A_DIR environment vari able use this syntax g For C shells setenv A DIR pathname pathnameo g For Bourne or Korn shells A_DIR pathname pathnameo export A_DIR Be sure to enclose the directory names within quotes The pathnames are directories that contain copy include files or macro librar ies You can separate the p
45. irectories for the compiler to search C DIR 1 5 Setting default shell options C OPTION eme 1 6 Specifying a temporary file directory TMP LLP kaka 1 7 Resetting defined environment variables cece eee eee ees 1 7 Verifying that the environment variables are set cee eee eee aes 1 7 1 4 Performance Considerations soe eas Sede Rated Meee daa ee CES Rate ae ale 1 8 1 5 Where to Go From Here ccc cette e 1 8 Setting Up the Code Generation Tools With Windows 95 and Windows NT 2 1 Provides installation instructions for the code generation tools for PCs running Windows 95 or Windows NT 2 1 System Requirements lt en 2 2 Hardware checklist 0 0 0 cece cee ccc ete n 2 2 Software checkllsl 2 3 9 ca phe E a Ma bute ae Buda et ee oen dar IA aah eR 2 2 2 2 Installing the Code Generation Tools 2 eee 2 3 2 3 Setting Up the Code Generation Environment 2 4 Identifying the directory that contains the executable files PATH statement 2 5 Identifying alternate directories for the assembler to search A DIR 2 5 Identifying alternate directories for the compiler to search C DIR 2 6 Setting default shell options C OPTION 00 e cence eee eee 2 6 Specifying a temporary file directory TMP 2 cence eee eens 2 7 Resetting defined environment variables cece eee eee ees 2 7 Verifying
46. is PATH statement does not undo the PATH statements in any other batch files including the autoexec bat file Identifying alternate directories for the assembler to search A DIR The assembler uses the A DIR environment variable to name alternative directories for the assembler to search To set the A DIR environment vari able use this syntax set A DIRzpathname pathnameo The pathnames are directories that contain copy include files or macro libraries You can separate the pathnames with a semicolon or with a blank Once you set A DIR you can use the copy include or mlib directive in assembly source without specifying path information If the assembler does not find the file in the directory that contains the current source file or in directories named by the ioption which names alternate directories it searches the paths named by the A DIR enviroment variable For more information on the i option see the 7MS470H1x Assembly Language Tools User s Guide or the TMS470H1x Optimizing C Compiler User s Guide Identifying alternate directories for the compiler to search C DIR The compiler uses the C DIR environment variable to name alternative direc tories for the compiler to search To set the C DIR environment variable use this syntax set C DIRzpathname pathnameo The pathnames are directories that contain include files or function libraries such as stdio h You can separate the pathnames with a
47. ker2 cmd Specify the System Memory Map MEMORY 0x00000000 len D MEM org P 0x00001000 len EM org 0x00001000 Data Memory RAM 0x00001000 Program Memory ROM M M Specify the Sections Allocation Into Memory SECTIONS data gt D MEM Initialized Data text gt P_MEM Code Typing in the following command line using the linker command file shown in Example 5 5 results in the map file shown in Example 5 6 lnk470 filel file2 linker2 cmd m linker2 map o prog out Getting Started With the Code Generation Tools 5 5 Getting Started With the Assembler and Linker Example 5 6 Linker Map File linker2 map Linked Using a Linker Command File KKK KKK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK TMS470 COFF Linker Version 1 20 KKK KKK KK KK KKK KKK KKK KKK KK KKK KKK KKK KK KKK KKK KKK KKK KKK KKK Sat Feb 8 15 36 45 1997 OUTPUT FILE NAME ENTRY POINT SYMBOL lt prog out gt 0 EMORY CONFIGURATION name origin length used attributes fill D_MEM 00000000 000001000 00000000 RWIX P MEM 00001000 000001000 0000001c RWIX SECTION ALLOCATION MAP output attributes section page origin length input sections data 0 00000000 00000000 UNINITIALIZED 00000000 00000000 file2 0bj data 00000000 00000000 filel obj data text 0 00001000 0000001c 00001000 0000001
48. le lt filename gt 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 Troubleshooting DOS Systems A 5 Kernel Error Messages A 6 9 cannot allocate tstack Description There is not enough memory to load DOS 4G Action Make more memory available and try again 10 cannot allocate memory for GDT Description There is not enough memory to load DOS 4G 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 4G 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 4G or an incom patibility with other software Action Contact technical support 13 cannot allocate transfer buffer Description There is not enough memory to load DOS 4G Action Make more memory available and try again 14 premature EOF Description DOSAG EXE or a bound DOS 4G application has probably been corrupted Action Recopy the file from the source media 15 protected mode available only with 386 or 486 Description DOS 4G requires an 80386 or later CPU It cannot run on an 80286 or earlier CPU Action Reinstall and run the tools on a 386 or later PC Kernel Error Messages
49. les set up automatically you can set yp the environment variables in your autoexec bat file See Section 1 3 Setting Up the Code Generation Environment on page 1 4 for more informa tion Installing the tools on Windows 3 1x systems To install the tools on a Windows 3 1x system follow these steps 5 6 Insert the TMS470R1x Code Generation Tools CD ROM into your CD ROM drive Start Windows 3 1x From the File menu select Run In a dialog box enter the following command where d is the name of your CD ROM drive d setup exe Click on OK Follow the on screen instructions If you choose not to have the environment variables set up automatically you can set up the environment variables in your autoexec bat file See Section 1 3 Setting Up the Code Generation Environment on page 1 4 for more informa tion Setting Up the Code Generation Tools With DOS or Windows 3 1x 1 3 Setting Up the Code Generation Environment 1 3 Setting Up the Code Generation Environment Before or after you install the code generation tools you can define environ ment variables that set certain software tool parameters you normally use An environment variable is a special system symbol that you define and associate to a string A program uses this symbol to find or obtain certain types of information When you use environment variables default values are set making each individual invocation of the tools simpler because these param
50. llowing to the end of the PATH statement c Ntool dir B Ifyou are running Windows NT modify the System applet of the Con trol Panelto change the path information by adding the following to the end of the PATH statement c Ntool dir Li Ifyou setthe PATH statement from the command line enter the following set PATH c Ntool dir SPATHS The addition of PATH ensures that this PATH statement does not undo the PATH statements in any other batch files including the autoexec bat file Identifying alternate directories for the assembler to search A DIR The assembler uses the A DIR environment variable to name alternative directories for the assembler to search To set the A DIR environment vari able use this syntax set A_DIR pathname pathnameo The pathnames are directories that contain copy include files or macro librar ies You can separate the pathnames with a semicolon or with a blank Once you set A DIR you can use the copy include or mlib directive in assembly source without specifying path information If the assembler does not find the file in the directory that contains the current source file or in directories named by the i option which names alternate directories it searches the paths named by the A DIR environment variable For more information on the i option see the TMS470R1x Assembly Language Tools User s Guide or the TMS470H1x Optimizing C Compiler User s Guide Setting Up the Code
51. load the CD ROM into the drive and enter the following from a command shell mount rt hsfs dev sr0 cdrom exit cd cdrom sunos Lj Ifyou have SunOS 5 0 or 5 1 as root load the CD ROM into the drive and enter the following from a command shell mount rF hsfs dev sr0 cdrom exit cd cdrom cdrom0 sunos Lj If you have SunOS 52 or higher m If your CD ROM drive is already attached load the CD ROM into the drive and enter the following from a command shell cd cdrom cdrom0 sunos m Ifyou do nothave a CD ROM drive attached you must shut down your system to the PROM level attach the CD ROM drive and enter the following boot r After you log into your system load the CD ROM into the drive and enter the following from a command shell cd cdrom cdrom0 sunos Setting Up the Code Generation Tools With SunOS 3 3 Installing the Code Generation Tools Copying the files Be sure you are not logged on as root After you mount the CD ROM you must create the directory that will contain the tools software and copy the software to that directory 1 Create a tools directory on your hard disk To create this directory enter mkdir your pathname tool dir 2 Copy the files from the CD ROM to your hard disk system cp r your pathname tool dir Unmounting the CD ROM 3 4 You must unmount the CD ROM after copying the files J lf you have SunOS 4 1 x 5 0 or 5 1 as root enter the following from a command shell ed u
52. ments The TMS470R1x general enhancements include the following items d L All known bugs have been removed COFF version 2 is supported Section names are no longer limited to eight characters and filenames are no longer limited to 14 characters Section name length is unrestricted and filename length is restricted by the con ventions of your operating system Note Using Version 1 COFF If you depend on a third party COFF dependent tool that does not support version 2 COFF then use the v1 linker option The v1 option instructs the linker to generate version 1 COFF Ensure that your object modules do not have section names that are longer than eight characters or filenames that are longer than 14 characters The v1 option is a temporary option for this release and it will be removed in a future release Assembler enhancements The TMS470R1x assembler enhancements are as follows m 6 4 A feature of COFF version 2 is the use of subsections You can create subsections of any section to give you tighter control of the memory map Subsections are created using the sect and usect directives For informa tion on creating subsections see the Introduction to Common Object File Format chapter of the TMS470R1x Assembly Language Tools User s Guide for memory map examples using subsections see the Linker Description chapter The assembler supports conditionally linked sections You select sections for conditi
53. mount cdrom eject dev sr0 exit Li If you have SunOS 5 2 or higher enter the following from a command shell cd eject Setting Up the Code Generation Environment 3 3 Setting Up the Code Generation Environment Before or after you install the code generation tools you can define environ ment variables that set certain software tool parameters you normally use An environment variable is a special system symbol that you define and assign to a string A program uses this symbol to find or obtain certain types of information When you use environment variables default values are set making each individual invocation of the tools simpler because these parameters are auto matically specified When you invoke a tool you can use command line op tions to override many of the defaults that are set with environment variables The code generation tools use the following environment variables L A DIR Lj C DIR C OPTION L TMP You can set up the environment variables on the command line or in your login or cshrc file for C shells or profile file for Bourne or Korn shells To set up these environment variables in your system initialization file enter the same commands that you would enter on the command line in the file In addition to setting up environment variables you must modify your path statement The following subsections describe how to modify your path state ment and how to define the environment variables
54. n Fax 0120 81 0036 in Japan 03 3457 0972 or INTL 813 3457 0972 Fax 03 3457 1259 or INTL 813 3457 1259 g Documentation When making suggestions or reporting errors in documentation please include the following information that is on the title page the full title of the book the publication date and the literature number Mail Texas Instruments Incorporated Email comments books sc ti com Technical Documentation Services MS 702 P O Box 1443 Houston Texas 77251 1443 Note When calling a Literature Response Center to order documentation please specify the literature number of the book vi 1 Contents Setting Up the Code Generation Tools With DOS or Windows 3 1x 1 1 Provides installation instructions for PCs running DOS or Windows 3 1 x 1 4 System Requirements ssuluussssssesssses en 1 2 Hardware checklist 3 2 9 5 soa a i Kopa Lk nk ENED ENE Lies 1 2 Software checklist nnana Ree Ta iii aia ee d eo Ie a in ae 1 2 1 2 Installing the Code Generation Tools 2 lr 1 8 Installing the tools on DOS systems seen 1 3 Installing the tools on Windows 3 1x systems 2 0 cece ees 1 3 1 8 Setting Up the Code Generation Environment aa 1 4 Identifying the directory that contains the executable files PATH statement 1 5 Identifying alternate directories for the assembler to search A DIR 1 5 Identifying alternate d
55. n interlists optimizer comments if the optimizer is invoked and assembly statements otherwise it interlists C source and assembly state ments The ss option interlists C source and assembly statements A new option the os option interlists optimizer comments with assembly state ments To interlist C source and assembly statements with optimizer comments use the os and ss options when invoking the optimizer For more information see the Compiler Description and Optimizing Your Code chapters Global register variables are now supported For more information see the TMS470H1x C Language chapter Bit field manipulation improvements are incorporated For more informa tion see the Runtime Environment chapter The alignment of structures has changed In previous releases all struc tures were word aligned Now a structure is aligned according to the align ment of the structure s most restrictive element For more information see the Runtime Environment chapter Software interrupts are supported for C code You define the software interrupt with the SWI ALIAS pragma For more information see the TMS470R1x C Language and Runtime Environment chapters Release Notes 6 5 6 6 Appendix A Troubleshooting DOS Systems DOS 4GW is a memory manager that is embedded into the DOS version of the TMS470R1x code generation tools so you may occasionally see DOS 4GW error messages while you are using the tools The executable
56. nce customer product design software performance or infringement of patents or services described herein Nor does TI warrant or represent that any license either express or implied is granted under any patent right copyright mask work right or other intellectual property right of TI covering or relating to any combination machine or process in which such semiconductor products or services might be or are used Copyright 1996 Texas Instruments Incorporated
57. nfigura tion of your system by using the PMINFO program on page A 3 before contacting technical support See the f You Need Assistance section on page vi for information about contacting technical support Some error messages are not included in this appendix because they are rarely seen when using DOS 4GW with the TMS470R1x tools Also many of the messages that are documented here are seldom seen when using DOS 4GW with the TMS470R1x tools Troubleshooting in the Protected Mode Environment The PMINFO32 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 vary slightly from run to run If this error message appears DOS 16M error 17 system software does not follow VCPI or DPMI specifications check for a statement in your CONFIG SYS containing NOEMS If such a statement exists remove it and reboot your computer If the computer is not equipped with extended memory or if none is available for DOS 4GW the extended memory measurements do not display Other DOS 4GW error messages are in Section A 3 DOS 4G Error Messages 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 4 45 Copyright c Tenberry Software Inc 1987 1996
58. nker to observe the C language linking conventions The linker command file Ink32 cmd is shipped with the code generation tools The o option names the output module function out if you don t use the o option the linker names the output module a out The option names the runtime support library You must have a runtime support library before you can create an execut able object module the prebuilt runtime support libraries rts32 lib and rts16 lib are included with the code generation tools b Inthis example use the z shell option which tells the shell program to run the linker The z option is followed by linker options c1470 o function c z 1nk32 cmd o function out 1 rts32 lib For more information on linker commands see the Linker Description chapter of the TMS470R1x Assembly Language Tools User s Guide The TMS470R1x compiler package also includes an interlist utility This program interlists the C source statements as comments in the assembly language compiler output allowing you to inspect the assembly language generated for each line of C To run the interlist utility invoke the shell pro gram with the s option For example c1470 s function z lnk32 cmd o function out The output of the interlist utility is written to the assembly language file created by the compiler The shell s option implies k that is when you use the interlist utility the assembly file is automatically retained Cha
59. o set up a directory named temp for intermediate files on your hard drive enter set TMP c Ntemp Resetting defined environment variables The environment variables that you define remain set until you reboot the system If you want to clear an environment variable use this command set variable name For example to reset the A DIR environment variable enter set A DIR Verifying that the environment variables are set To verify that the environment variables are set open a DOS box and enter set This command lists the path and environment variables and their current values Setting Up the Code Generation Tools With DOS or Windows 3 1x 1 7 Performance Considerations Where to Go From Here 1 4 Performance Considerations You may notice a speed degradation when you use the code generation tools with DOS or Windows 3 1x This speed degradation may occur when you use DOS with the tools to get appropriate host memory support If you encounter error messages when you use the tools on a PC with DOS run PMINFO to determine your system configuration before you contact tech nical support For more information about PMINFO see Appendix A Trouble shooting DOS systems 1 5 Where to Go From Here Your code generation tools are now installed on your DOS or Windows 3 1x system Now you should do each of the following tasks Go to Chapter 5 Getting Started With the Code Generation Tools This chapter provides you with an o
60. ode generator A compiler tool that takes the file produced by the parser or the optimizer and produces an assembly language source file COFF Common object file format A binary object file format that promotes modular programming by supporting the concept of sections All COFF sections are independently relocatable in memory space you can place any section into any allocated block of target memory cl470 The name of the command that invokes the compiler shell program for the TMS470R1x The second character in the shell name is a lower case L DOS 4G The base version for DOS 4GW You may occasionally see this term in an error message If so see Appendix A Troubleshooting DOS Systems for the appropriate action B 1 Glossary B 2 DOS AGW A memory extender that is bound with the DOS version of the TMS470R1x code generation tools The executable DOS 4GW file is not shipped separately but is embedded within the other executables Error messages from DOS 4GW are included in Appendix A Troubleshooting DOS Systems to assist you in debugging If you receive one of these error messages contact technical support for assistance and remember that the tools are shipped as object files with the memory extender embedded DOS 16M The executable filename for a tool that is embedded in the TMS470R1x code generation tools You may occasionally see this term in an error message If so see Appendix A Troubleshooting DOS Systems for the a
61. onal linking with the clink assembler directive The clink directive marks the current section as aconditionally linked sec tion This section will be linked into the final output of the linker only if it is referenced by a linked section through a symbol reference By default all sections are linked Release Enhancements The section in which the entry point of a C program is defined cannot be marked as a conditionally linked section The compiler marks all function veneers as conditionally linked You must link with the a linker option which creates an absolute execut able output module to enable conditional linking The j linker option disables conditional linking For information on the clink directive see the Assembler Directives chapter of the 7MS470R1x Assembly Language Tools User s Guide for information on the j linker option see the Linker Description chapter C compiler enhancements The TMS470R1x optimizing C compiler enhancements are as follows For more information see the named chapter of the TMS470R1x Optimizing C Compiler User s Guide d You can specify command line options in a file When you specify that file on the command line with the shell option the compiler reads the file and interprets it as if it contained part of the command line For more information see the Compiler Description chapter The options that invoke the interlist utility with the shell have changed The s optio
62. op end Example 5 2 file2 asm 5 2 global inclw inclw ADDS r7 r7 1 ADDCSS r6 r6 1 MOV pc ir end 2 Enter the following command to assemble file1 asm asm470 filel The asm470 command invokes the assembler The input source file is filet asm If the input file extension is asm you do not have to specify the extension the assembler uses asm as the default This example creates an object file called file1 obj The assembler creates an object file only if there are no errors in assembly You can specify a name for the object file but if you do not the assembler uses the input file name with an extension of obj 3 Getting Started With the Assembler and Linker Now enter the following command to assemble file2 asm asm470 file2 asm 1 This time the assembler creates an object file called file2 obj The I lowercase L option tells the assembler to create a listing file the listing file for this example is called file2 Ist It is not necessary to create a listing file but it gives you information and assures you that the assembly has resulted in the desired object code The listing file for this example is shown in Example 5 3 Example 5 3 file2 Ist the Listing File Created by asm470 file2 asm I TMS470 COFF Assembler Version 1 20 Sat Feb 8 15 22 13 1997 Copyright c 1995 1996 Texas Instruments Incorporated file2 asm PAGE 1 al 2 global inclw 3 4 00000
63. or temporary files and 4M bytes of hard disk space for the code generation tools Monochrome or color monitor color recommended CD ROM drive Microsoft compatible mouse One of these operating systems J MS DOS j PC DOS Lj Windows 3 1x TMS470R1x Code Generation Tools Note Memory Needed The code generation tools when installed on a PC require at least 4M bytes of memory but you can expect some performance problems when using only 4M bytes 16M bytes is recommended You may want to free as much memory as possible before running the tools especially if you have less than 16M bytes LLLLSS S M Installing the Code Generation Tools 1 2 Installing the Code Generation Tools This section helps you install the code generation tools on your hard disk system The code generation tools package is shipped on CD ROM The installation instructions vary according to your operating system Installing the tools on DOS systems To install the tools on a DOS system follow these steps 1 2 3 4 Insert the TMS470R1x Code Generation Tools CD ROM into your CD ROM drive Change to the CD ROM drive where d is the name of your CD ROM drive d Enter the following command install Follow the on screen instructions If you choose not to have he environment variab
64. ould do each of the following tasks Go to Chapter 5 Getting Started With the Code Generation Tools This chapter provides you with an overview of how to invoke and use the assembler linker and compiler 1 Read Chapter 6 Release Notes This chapter explains the new features included in release 1 20 of the code generation tools Chapter 5 Getting Started With the Code Generation Tools This chapter helps you start using the assembler linker and compiler by providing a guick walkthrough of these tools For more information about invoking and using these tools see the TMS470R1x Assembly Language Tools User s Guide and the TMS470R1x Optimizing C Compiler User s Guide Topic Page 5 1 Getting Started With the Assembler and Linker 5 2 5 2 Getting Started With the C Compiler 5 7 5 1 Getting Started With the Assembler and Linker 5 1 Getting Started With the Assembler and Linker This section provides a guick walkthrough of the assembler and linker so that you can get started without reading the entire TMS470R1x Assembly Language Tools User s Guide Example 5 1 through Example 5 6 show the most common methods for invoking the assembler and linker 1 Create two short source files to use for the walkthrough call them file1 asm and file2 asm See Example 5 1 and Example 5 2 Example 5 1 file1 asm global inclw start MOV r6 0 MOV r7 0 loop BL inclw BCC lo
65. pecific directory for temporary files by using the TMP environment variable Using the TMP environment variable allows use of a RAM disk or other file systems It also allows you to compile source files from a remote directory with out writing any files into the directory where the source resides This is useful for protected directories To set the TMP environment variable use this syntax set TMP pathname For example to set up a directory named temp for intermediate files on your hard drive enter set TMP c Ntemp Resetting defined environment variables The environment variables that you define remain set until you reboot the sys tem If you want to clear an environment variable use this command set variable name For example to reset the A DIR environment variable enter set A DIR Verifying that the environment variables are set To verify that the environment variables are set open a DOS box and enter set This command lists the path and environment variables and their current values Setting Up the Code Generation Tools With Windows 95 and Windows NT 2 7 Where to Go From Here 2 4 Where to Go From Here 2 8 Your code generation tools are now installed on your Windows 95 or Windows NT system Now you should do each of the following tasks Turn to Chapter 5 Getting Started With the Code Generation Tools This chapter provides you with an overview of how to invoke and use the assembler linker and
66. ppropriate action environment variables System symbols that you define and assign to a string They are usually included in batch files for example cshrc interlist utility A compiler utility that inserts as comments your original C source statements into the assembly language output from the assem bler The C statements are inserted next to the equivalent assembly instructions linker A software program that combines object files to form an object mod ule that can be allocated into system memory and executed by the de vice Ink470 The name of the command that invokes the linker for the TMS470R1x optimizer A software tool that improves the execution speed and reduces the size of C programs options Command parameters that allow you to reguest additional or specific functions when you invoke a software tool Glossary pragma Preprocessor directive that provides directions to the compiler about how to treat a particular statement protected mode programs 32 bit extended DOS programs These programs reguire an extended memory manager and run on 80386 80486 and Pentium based PCs only Protected mode programs can use all available RAM on a computer up to 64M bytes real mode 16 bit native DOS mode This mode limits the available memory to 640K bytes Calls to DOS may involve switching from protected to real mode DOS real mode tools are no longer supported by the TMS470R1x code generation tools shell program A u
67. pter 6 Release Notes This chapter describes the media contents of the TMS470R1x tools kit The tools are supported on SPARCstations HP workstations and PCs with DOS Windows 3 1x Windows 95 or Windows NT This chapter also contains documentation of tools and features that are new or have been changed since the last release Topic Page 6 1 Media Contents alel aa ee ate are etree ee ole aaa ere lene te ded 6 2 62 Release Enhancements saos oee aaa eee E revere 6 4 6 1 Media Contents 6 1 Media Contents The CD ROM included in the TMS470R1x tools kit for SPARCstations and HP workstations contains the files listed in Table 6 1 The CD ROM included in the TMS470R1x tools kit for PCs contains the files listed in Table 6 2 Table 6 1 Media Contents for SPARCstations and HP Workstations File README 1st abs470 ac470 ar470 asm470 cg470 cl470 clist hex470 intvecs asm Ink470 Ink16 cmd Ink32 cmd mk470 opt470 rts16 lib rts32 lib rts src xref470 h 6 2 Description Online release bulletin Absolute lister ANSI C parser Archiver Assembler Code generator Compiler shell program C source interlist utility Hex conversion utility Sample interrupt vector setup file COFF linker Sample 16 bit linker command file Sample 32 bit linker command file Library build utility C optimizer 16 bit runtime support library 32 bit rutime support library C runtime support source library Cross refer
68. r C shells setenv TMP pathname For Bourne or Korn shells TMP pathname export TMP Be sure to enclose the directory name within guotes For example to set up a directory named temp for intermediate files enter L L Reinitializing your shell For C shells setenv TMP temp For Bourne or Korn shells TMP temp export TMP When you modify your shell configuration file you must ensure that the changes are made to your current session Use one of the following com mands to reread your system initialization file L L For C shells source cshrc For Bourne or Korn shells source profile Resetting defined environment variables The environment variables that you define remain set until you reboot the sys tem If you want to clear an environment variable use this command L L For C shells unsetenv variable name For Bourne or Korn shells unset variable name For example to reset the A DIR environment variable enter one of these commands L L For C shells unsetenv A DIR For Bourne or Korn shells unset A DIR Setting Up the Code Generation Tools With SunOS 3 9 Setting Up the Code Generation Environment Where to Go From Here Verifying that the environment variables are set To verify that the environment variables are set enter set This command lists the path and environment variables and their current values 3 4 Where to Go From Here Your co
69. s Getting Started With the Code Generation Tools 4 5 1 Provides an overview of how to invoke and use the assembler linker and compiler 5 1 Getting Started With the Assembler and Linker 0 0 00 cee eee ences 5 2 5 2 Getting Started With the C Compiler 0 00 cece eee eee 5 7 Release Notes 2035 i Rie VIRI eee ie saaa ee i a at 6 1 Describes the media contents and the enhancements for this release 6 1 Media Contents 0 ccc ccc has 6 2 6 2 Release Enhancements LLS kaka kaka aka aaa t ee ett eee eee 6 4 General enhancements n n nnna aaa Een Cher eee new dada Baca K 6 4 Assembler enhancements 0 0e cece cee eee eee ens 6 4 C compiler enhancements eeuna eee eee en 6 5 Troubleshooting DOS Systems 4 lt eee A 1 Lists kernel and DOS 4G error messages and explains how you can resolve them A 1 Troubleshooting in the Protected Mode Environment A 2 The PMINFOS2 EXE program 23 6 frog ts ter enu eee Pe ERE nee pa oba zde A 3 A 2 Kernel Error Messages cee cece eee eee eens A 5 A 3 DOS 4G Error Messages ereis a te E E E eee eens A 9 ele ln ceca ee a tee SN ae ie lue o nd ee ete B 1 Defines terms and acronyms used in this book Contents ix Chapter 1 Setting Up the Code Generation Tools With DOS or Windows 3 1x This chapter helps you install release 1 20 ofthe TMS470R1x code generation tools and set up your
70. s 2 2 optimizer definition B 2 options definition B 2 PATH statement for DOS systems 1 5 for HP workstations 4 6 for SPARCstations 3 6 for Windows 3 1x systems 1 5 for Windows 95 NT systems 2 5 performance considerations for DOS or Windows 3 1x systems 1 8 permissions for HP workstations 4 2 for SPARCstations 3 2 PMINFO A 3 to A 10 example A 3 pragma definition B 3 Index 3 Index profile file for HP workstations 4 5 to 4 10 for SPARCstations 3 5 to 3 10 protected mode environment troubleshooting A 2 programs definition B 3 real mode definition B 3 reinitializing cshrc file 3 9 4 9 profile file 3 9 4 9 shell 3 9 4 9 related documentation iv requirements See hardware checklist software checklist resetting environment variables for DOS systems 1 7 for HP workstations 4 9 for SPARCstations 3 9 for Windows 3 1x systems 1 7 for Windows 95 NT systems 2 7 retrieving files from CD ROM for HP workstations 4 4 for SPARCstations 3 4 root privileges for HP workstations 4 2 for SPARCstations 3 2 runtime support library 5 8 sectionnames 6 4 SECTIONS directive 5 5 setting up the environment for DOS systems 1 4 for HP workstations 4 5 to 4 10 for SPARCstations 3 5 to 3 10 for Window 3 1x systems 1 4 for Windows 95 NT systems 2 4 to 2 7 setup exe for DOS systems 1 3 for Windows 3 1x systems 1 3 for Windows 95 NT systems 2 3 Index 4 shell reinitializing 3 9 4 9 shell program COFF file 5
71. s to report less memory available than is physically configured If displayed shows the low and high addresses available to DOS 4GW in extended memory PMINFO tries to determine the memory architecture Some architectures perform well under some circumstances and poorly under others PMINFO shows the best 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 states is 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 how fast the CPU can access memory accounts for 60 to 70 of the performance for typical programs those that are not heavily dependent on floating point math Shows a performance metric developed by Tenberry Software Inc formerly known 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 point operations are both excluded Shows the speed with which the computer can switch between real and protected modes both as the maximum number of round trip switches that can occur per second and as the time for a single round trip switch broken into the real to protected up and protected to real down components Kernel Error
72. s using the C OPTION environment variable If you do this the shell uses the default options and or input filenames that you name with C OPTION every time you run the shell Setting up default options with the C OPTION environment variable is useful when you want to run the shell consecutive times with the same set of options and or input files After the shell reads the command line and the input file names it reads the C OPTION environment variable and processes it The set the C OPTION environment variable use this syntax J For C shells setenv C OPTION option options g For Bourne or Korn shells C OPTION option optiono export C OPTION Be sure to enclose the options within quotes Setting Up the Code Generation Tools on an HP Workstation 4 7 Setting Up the Code Generation Environment Environment variable options are specified in the same way and have the same meaning as they do on the command line For example if you want to always run quietly the g option enable C source interlisting the s option and link the option set up the C OPTION environment variable as follows g For C shells setenv C OPTION qs z g For Bourne or Korn shells C OPTION qs z export C OPTION In the following examples each time you run the compiler shell it runs the linker Any options following on the command line or in C OPTION are passedto the linker This enables you to usethe C OP
73. shell program prints the following information as it compiles the pro gram function TMS470 ANSI C Compiler Version 1 20 Copyright c 1995 1997 Texas Instruments Incorporated function c main TMS470 ANSI C Optimizer Version 1 20 Copyright c 1995 1997 Texas Instruments Incorporated function c main TMS470 ANSI C Codegen Version 1 20 Copyright c 1995 1997 Texas Instruments Incorporated function c gt main TMS470 COFF Assembler Version 1 20 Copyright c 1995 1997 Texas Instruments Incorporated PASS 1 PASS 2 No Errors No Warnings By default the shell deletes the assembly language file from the current directory after the file is assembled If you want to inspect the assembly language output use the k option to retain the assembly language file c1470 o k function Getting Started With the Code Generation Tools 5 7 Getting Started With the C Compiler 5 8 3 Also by default the shell creates a COFF object file as output however if you use the z option the output is an executable object module The following examples show two ways of creating an executable object module a The example in step 2 creates an object file called function obj To create an executable object module run the linker separately by invoking Ink470 as in the following example lnk470 c function obj 1nk32 cmd o function out 1 rts32 lib The c linker option tells the li
74. that the code generation tools use Setting Up the Code Generation Tools With SunOS 3 5 Setting Up the Code Generation Environment Identifying the directory that contains the executable files path statement You must include the too dir directory in your path statement so that you can specify the assembler and compiler tools without specifying the name of the directory that contains the executable files Ifyou modify your cshrc file for C shells or profile file for Bourne or Korn shells to change the path information add the following to the end of the path statement your pathnameltool dir Lj If you set the path statement from the command line use this format m ForC shells set path your_pathname tool_dir path m For Bourne or Korn shells PATH your_pathname tool_dir PATH The addition of path or PATH ensures that this path statement does not undo the path statements in the cshrc or profile file Identifying alternate directories for the assembler to search A_DIR 3 6 The assembler uses the A_DIR environment variable to name alternative directories for the assembler to search To set the A_DIR environment vari able use this syntax Li For C shells setenv A DIR pathname pathnameo J For Bourne or Korn shells A DiIRz pathname pathnameo export A DIR Be sure to enclose the directory names within quotes The pathnames are directories that contain copy include files or
75. that the environment variables are Set cece eee eee eae 2 7 2 4 Where to Go From Here isco dese nese re REDDERE Meee Sas ee EI as LEE 2 8 vii Contents 3 Setting Up the Code Generation Tools With SunOS 3 1 Provides installation instructions for the code generation tools for SPARCstations running SunOS 3 14 System Requirements 0000 cece eet nn 3 2 Hardware checklist lt ee en ee A 3 2 Software checklist 3 2 3 2 Installing the Code Generation Tools 00 c cece eee teeta 3 3 Mounting the CD ROM 0c cece eee eee teen eee teens 3 3 Copying the files Ren 3 4 Unmounting the CD ROM ssssssses eee nh 3 4 39 3 Setting Up the Code Generation Environment ccc ee eee eee 3 5 Identifying the directory that contains the executable files path statement 3 6 Identifying alternate directories for the assembler to search A_DIR 3 6 Identifying alternate directories for the compiler to search C DIR 3 7 Setting default shell options C OPTION 02 ec ee as 3 7 Specifying a temporary file directory TMP LL Lakis 3 8 Reinitializing your shell III 3 9 Resetting defined environment variables cece eee eee ees 3 9 Verifying that the environment variables are set 3 10 3 4 Where to Go From Here 0 00
76. tility that lets you compile assemble and optionally link in one step The shell runs one or more source modules through the com piler including the parser optimizer and code generator the assem bler and the linker structure A collection of one or more variables grouped together under a single name swap file The file where virtual memory Secondary memory is allocated on the hard disk veneer A sequence of instructions that serves as an alternate entry point into a routine if a state change is required virtual memory The ability of a program to use more memory than a computer actually has available as RAM This is accomplished by using a swap file on disk to augment RAM When RAM is not sufficient part of the program is swapped out to a disk file until it is needed again The combination of the swap file and available RAM is the virtual memory The TMS470R1x tools use the DOS 4GW memory extender to provide virtual memory management VMM This memory extender is not pro vided as an executable file but is embedded in several of the tools shipped by TI Contact technical support for more information Glossary B 3 B 4 shell option 6 5 A DIR environment variable for DOS systems 1 5 for HP workstations 4 6 for SPARCstations 3 6 to 3 7 for Windows 3 1x systems 1 5 for Windows 95 NT systems 2 5 asm470 definition B 1 invoking 5 2 assembler definition B 1 assembler walkthrough 5 2 to 5 4 assistance from TI
77. umber SPNU119 describes the TMS470R1x C compiler This C compiler accepts ANSI standard C source code and produces assembly language source code for the TMS470R1x devices Trademarks Related Documentation From Texas Instruments Trademarks TMS470R1x C Source Debugger User s Guide literature number SPNU124 describes the TMS470R1x emulator and simulator versions of the C source debugger interface This book discusses various aspects of the debugger interface including window management command entry code execution data management and breakpoints It also includes a tutorial that introduces basic debugger functionality TMS470R1x User s Guide literature number SPNU134 describes the TMS470R1x RISC microcontroller its architecture including registers ICEBreaker module interfaces memory coprocessor and debugger 16 bit and 32 bit instruction sets and electrical specifications DOS 4G is a trademark of Tenberry Software Inc HP UX HP 9000 Series 700 and PA RISC are trademarks of Hewlett Packard Company IBM PC and PC DOS are trademarks of International Business Machines Corp MS DOS Windows and Windows NT are registered trademarks of Microsoft Corp OpenWindows SunOS and Solaris are trademarks of Sun Microsystems Inc Pentium is a trademark of Intel Corporation SPARCstation is trademark of SPARC International Inc but licensed exclu sively to Sun Microsystems Inc UNIX is a registered trademark
78. verview of how to invoke and use the assembler linker and compiler Read Chapter 6 Release Notes This chapter explains the new features included in release 1 20 of the code generation tools Use Appendix A Troubleshooting DOS Systems as necessary This appendix lists kernel and DOS 4G error messages and explains how you can resolve the messages Chapter 2 Setting Up the Code Generation Tools With Windows 95 and Windows NT This chapter helps you install release 1 20 ofthe TMS470R1x code generation tools and set up your code development environment on a 32 bit x86 based or Pentium PC running Windows 95 or Windows NT These tools include an optimizing C compiler and a full set of assembly language tools for developing and manipulating assembly language and object executable code The C compiler tools are composed of the following components Parser Optimizer L Code generator Interlist utility L1 Library build utitlity The assembly language tools are composed of the following components Assembler Lj Archiver g Linker Lj Absolute lister Cross reference lister L Hex conversion utility Topic Page 2 1 System Requirements 000 cece cece cette eee e eens 2 2 2 2 Installing the Code Generation Tools 2 3 2 3 Setting Up the Code Generation Environment 2 4 2 4 Where to Go EromilHere oeste vie corte crores 2 8 2 1
Download Pdf Manuals
Related Search
Related Contents
14” DELUXE 2 SPEED HYBRID BANDSAW INTEGRATED ISOLATED POWER RS485 TRANSCEIVER MODULE nl - Stata Samsung GT-P7310 Benutzerhandbuch Avaya Integrated Management Release 3.0 Administration Tools User's Manual BB-8_App_Enabled_Droid_User_Manual_2015 Manhattan PopCharge Auto Copyright © All rights reserved.
Failed to retrieve file