
3-16
SC100 C Compiler
Using the SC100 C Compiler
3.3.1.2 Specifying a shell command file
You can create command files containing options and arguments, which the shell program will treat as if
they were included on the command line.
Defining options and arguments within command files can save you input time when you invoke the shell
program, and helps you overcome any imposed limitation on the length of the command line. Each time
you invoke the shell, you can select the command file with the set of options that suit your specific
requirements.
To specify a shell command file, specify the option
-F
followed by a filename. A command file can itself
contain the option
-F
specifying another shell command file.
Example 3-2 illustrates the use of the
-F
option to specify the command file
proj.opt
.
Example 3-2. Defining a shell command file
ccsc100 -F proj.opt
Within the command file, each separate option (with or without an argument), file, or list of files must
reside on a new line. You can specify as many lines as you wish, in any order. Comments can be included
in the file using the # character. All characters between # and the end of the line are ignored by the shell.
The command file shown in Example 3-3 contains four lines which instruct the shell to invoke the linker
with three application object files and one library file, generate a link map file, and output the executable
program to a file named
appl.eld
.
Example 3-3. Contents of a shell command file
-o appl.eld
-dm appl.map
file1.eln file2.eln file3.eln
-l mylib.elb
# output file name
# generate map file
# object files
# shared library
Note:
If no map file is specified, the shell generates a file with the same file name as the
specified
.eld
file, and the extension
.map
.
3.3.1.3 Displaying the shell Help page
You can display the shell Help page, which takes the form of a list of all the available shell options and
arguments. Select the option
-h
to display this list.
Example 3-4 shows a section of the shell Help page:
Example 3-4. Shell Help page (extract)
-c
-cfe Stop after Front-End. (Used for global optimization)
-S
Generate assembly output file. Don’t invoke assembler
-E
Preprocess only
-C
Preprocess only and keep comments
Compile and assemble only. Don’t invoke the linker