17.05.2015 Views

TMS34010 C Compiler - Al Kossow's Bitsavers

TMS34010 C Compiler - Al Kossow's Bitsavers

TMS34010 C Compiler - Al Kossow's Bitsavers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Compiler</strong> Operation - Compiling and Assembling a Program<br />

"quiet" batch file that produces no messages. In addition, gspq deletes the<br />

intermediate asm file. To invoke the batch files, enter:<br />

gspc input file or gspq input file<br />

gspc/gspq name the batch files that invoke the tools.<br />

input file<br />

names a C source file. If you don't specify a filename, the batch<br />

files will prompt you for one. Each batch file expects the input<br />

file to have an extension of .c. Do not specify an extension<br />

for the input file; doing so may harm the input file.<br />

The batch files only accept filenames as input; you cannot pass command<br />

options to the batch file. (If you want to use options, you must modify the<br />

batch files.) The batch files use the input filename to create and name the<br />

intermediate files and the output object file. The output file has the same<br />

name as the input filename, except the output file has an extension of .obj.<br />

You can specify multiple input files to the batch file; for example,<br />

gspc filel file2 file ...<br />

Example 3-2 uses the gspc batch file to compile and assemble a C source file<br />

named program. c. (You could also use gspq, but it would not produce the<br />

messages shown in Example 3-2.)<br />

Example 3-2. Method 2 - Using the Batch File<br />

gspc program<br />

---[program]---<br />

C Pre-Processor, Version 3.xx<br />

(c) Copyright 1988 Texas Instruments Incorporated<br />

C <strong>Compiler</strong>,<br />

Version 3.xx<br />

(c) Copyright 1988 Texas Instruments Incorporated<br />

"program.c" ==) main<br />

C Codegen,<br />

Version 3.xx<br />

(c) Copyright 1988 Texas Instruments Incorporated<br />

"program.c" ==) main<br />

COFF Assembler, Version 3.xx<br />

(c) Copyright 1988 Texas Instruments Incorporated<br />

PASS 1<br />

PASS 2<br />

No Errors, No Warnings<br />

Successful Compile of Module<br />

program<br />

Note that the batch files do not create listing files. If you used gspc, you can<br />

create a listing file by invoking the assembler again with the -I option (lowercase<br />

L) and using filename. asm as the input file. For example,<br />

gspc program<br />

gspa program -1<br />

(You can't do this if you use gspq, because gspq deletes the. asm file.) If<br />

you want to create a listing file each time you use gspc, modify the batch file<br />

so that it invokes the assembler with the -I option.<br />

3-12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!