Texas Instruments TMS470R1x manual Setenv Cdir ªpathname1 pathname2 . . .º

Page 35

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:

-For C shells:

setenv C_DIR ªpathname1 [;pathname2 . . .]º

-For Bourne or Korn shells:

C_DIR=ªpathname1 [;pathname2 . . .]º 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 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 ºoption1 [option2 . . .]º

-For Bourne or Korn shells:

C_OPTION=ºoption1 [option2 . . .]º export C_OPTION

Setting Up the Code Generation Tools With SunOS

3-7

Image 35
Contents Getting Started Guide SPNU117B TMS470R1x Code Generation Tools Getting Started Guide Important Notice Notational Conventions About This ManualSET CDIR=pathname1 pathname2 Related Documentation From Texas InstrumentsSet PATH=c\tooldir%PATH% Trademarks North America, South America, Central America If You Need AssistanceContents Setting Up the Code Generation Tools With SunOS Defines terms and acronyms used in this book Page Setting Up the Code Generation Tools With DOS or Windows System Requirements Hardware checklistSoftware checklist Install Installing the Code Generation ToolsInstalling the tools on DOS systems Installing the tools on Windows 3.1x systemsAdir Cdir Coption TMP Setting Up the Code Generation EnvironmentSet ADIR=pathname1 pathname2 \tooldirSet COPTION=±qs ±z Setting default shell options CoptionTMS470R1x Assembly Language Tools Users Guide Verifying that the environment variables are set Resetting defined environment variablesSpecifying a temporary file directory TMP Performance Considerations Where to Go From HereChapter TMS470R1x Code Generation Tools \setup.exe These variables are set up in the registry under \tooldir Set COPTION=option1 option2 Set ADIR= Set variablename=Where to Go From Here Setting Up the Code Generation Tools With SunOS Disk space Mount ±rF hsfs /dev/sr0 /cdrom exit Cd /cdrom/cdrom0/sunos Boot ±rMounting the CD-ROM Mount ±rt hsfs /dev/sr0 /cdrom exit Cd /cdrom/sunos Cd eject Copying the files Unmounting the CD-ROM Umount /cdrom eject /dev/sr0 exitSetting Up the Code Generation Environment ADIR=ºpathname1 pathname2 . . .º export Adir Yourpathname /tooldirSet path=/yourpathname /tooldir $path Setenv Adir ºpathname1 pathname2 . . .ºCDIR=ªpathname1 pathname2 . . .º export Cdir Setenv Cdir ªpathname1 pathname2 . . .ºSetenv Coption º±qs ±zº Source ~/.cshrc Reinitializing your shellSetenv TMP º/tempº TMP=º/tempº export TMPTo verify that the environment variables are set, enter Setting Up the Code Generation Tools on an HP Workstation An HP 9000 Series 700 PA-RISC computer Cd /cdrom/hp Mount ±rt cdfs /dev/dsk/yourcdromdevice /cdrom exitUmount /cdrom exit Setting up the software tools using a C shellSetting up the software tools using a Korn shell PATH=tooldir$PATHSetting Up the Code Generation Environment ADIR=ºpathname1 pathname2 … º export Adir Identifying alternate directories for the assembler AdirSetenv Adir ºpathname1 pathname2 … º Setenv Cdir ªpathname1 pathname2 . . .º Identifying alternate directories for the compiler CdirSpecifying a temporary file directory TMP Unsetenv variable name Where to Go From Here Getting Started With Code Generation Tools Example 5±2. file2.asm Getting Started With the Assembler and LinkerGetting Started With the Code Generation Tools Example 5±4. Output Map File, lnker2.map Example 5±5. Sample Linker Command File, linker2.cmd Entry Point Symbol Memory Configuration Cl470 ±o ±k function Getting Started With the C CompilerCl470 ±o ±mt funtion Cl470 ±s function ±z lnk32.cmd ±o function.out Release Notes Media Contents ±2. Media Contents for PCs Assembler enhancements Release EnhancementsGeneral enhancements Compiler enhancements Page Troubleshooting DOS Systems Troubleshooting in the Protected-Mode Environment PMINFO32.EXE program Error MessagesTable A±1. Pminfo Fields Action Make more memory available and try again Kernel Error MessagesAction Recopy the file from the source media Action Contact technical support Action Reinstall and run the tools on a 386 or later PCAction Rerun the program and/or restart your computer ExecutionTings Cause this errorMemory is available to non-Windows programs. Under OS/2 Increase the Dpmimemorylimit in the DOS box setAction Make sure that the filename was spelled correctly DOS/4G Error MessagesAction Free some memory for the DOS/4G application DOS/4G Error Messages Glossary Glossary Glossary B-3 Page Index Index MS-DOS Pminfo Setup.exe For DOS systems For Windows 3.1x systems Windows 95/NT systems Index-6 Important Notice