SPRU513Y August 2001 – June 2022 SM320F28335-EP
An environment variable is a system symbol that you define and assign a string to. The assembler uses the C2000_A_DIR environment variable to name alternate directories that contain copy/include files or macro libraries.
The assembler looks for the C2000_A_DIR environment variable and then reads and processes it. If the assembler does not find the C2000_A_DIR variable, it then searches for C2000_C_DIR. The processor-specific variables are useful when you are using Texas Instruments tools for different processors at the same time.
See the TMS320C28x Optimizing C/C++ Compiler User's Guide for details on C2000_C_DIR.
The command syntax for assigning the environment variable is as follows:
Operating System | Enter |
---|---|
UNIX (Bourne Shell) | C2000_A_DIR=" pathname1 ;pathname2 ; . . . "; export C2000_A_DIR |
Windows | set C2000_A_DIR= pathname1 ;pathname2 ; . . . |
The pathnames are directories that contain copy/include files or macro libraries. The pathnames must follow these constraints:
set C28X_A_DIR= c:\path\one\to\tools ; c:\path\two\to\tools
set C28X_A_DIR=c:\first path\to\tools;d:\second path\to\tools
In assembly source, you can use the .copy, .include, or .mlib directive 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 --include_path option, it searches the paths named by the environment variable.
For example, assume that a file called source.asm contains these statements:
.copy "copy1.asm"
.copy "copy2.asm"
Assume the following paths for the files:
UNIX: | /tools/files/copy1.asm and /dsys/copy2.asm |
Windows: | c:\tools\files\copy1.asm and c:\dsys\copy2.asm |
You could set up the search path with the commands shown below:
Operating System | Enter |
---|---|
UNIX (Bourne shell) |
|
Windows |
|
The assembler first searches for copy1.asm and copy2.asm in the current directory because source.asm is in the current directory. Then the assembler searches in the directory named with the --include_path option and finds copy1.asm. Finally, the assembler searches the directory named with C2000_A_DIR and finds copy2.asm.
The environment variable remains set until you reboot the system or reset the variable by entering one of these commands:
Operating System | Enter |
---|---|
UNIX (Bourne shell) |
|
Windows |
|