Texas Instruments TMS470R1x Specifying a temporary file directory TMP, Setenv Coption º±qs ±zº

Models: TMS470R1x

1 83
Download 83 pages 23.99 Kb
Page 36
Image 36

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 ±q option), enable C source interlisting (the ±s option), and link (the ±z option), set up the C_OPTION environment variable as follows:

-For C shells:

setenv C_OPTION º±qs ±zº

-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 ±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:

cl470

*.c

 

; compiles and links

cl470

±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)

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 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.

3-8

Page 36
Image 36
Texas Instruments TMS470R1x manual Specifying a temporary file directory TMP, Setenv Coption º±qs ±zº