The compilation driver (ccrl) identifies the extension of the input file, and then starts the compiler, assembler, and linker. Alphabetical extensions are not case sensitive.
If the input file has the extension .s or .asm, the compilation driver assumes it is an assembly language file, and starts the assembler. |
If the input file has the extension .c, the compilation driver assumes it is a C source file, and starts the compiler. |
If the input file has the extension .cpp, .cc, or .cp, the compilation driver assumes that it is a C++ source file, and starts the compiler. |
If the input file has the extension .obj, the compilation driver assumes that it is an object file, and starts the linker. |
If the input file has an extension other than the above, the compilation driver assumes that the file is a C source file, and starts the compiler.
You can specify the language standard of C source files and C++ source files by using the -lang option.
Enter the following on the command line.
...: Pattern in preceding [ ] can be repeated
{ }: Select from items delimited by the pipe symbol ("|")
[, ...]: The preceding pattern can be repeated by delimiting each with a comma.
[: ...]: The preceding pattern can be repeated by delimiting each with a colon.
string := A: string is replaced with A.
string := A | B | C: string is replaced with any one of A, B, or C.
The following points should be noted when entering a command.
The specification formats of options depend on the command that is used. |
A file name supported by the OS can be specified. |
In addition, there are cautions on using characters in file names and path names of subcommand files used for internal processing.
Also refer to "2.4.2 Subcommand file usage".
The length that can be specified for a file name depends on the OS (up to 259 characters in Windows). |
Two or more files can be specified as input. |
The examples of operations on the command line are shown below.
See "2.5 Option" for details about each option. |
C source file "file1.c" is compiled by ccrl, and then assembly source file "file1.asm" is generated.
Next, assembly source file "file1.asm" and "file2.asm" are assembled by asrl, and then object file "file1.obj" and "file2.obj" are generated.
The assemble list files are output to the current folder.
Finally, object file "file1.obj", "file2.obj", and "file3.obj" are linked by rlink, and then link map file "sample.map" and load module file "sample.abs" are generated.
>ccrl file1.c file2.asm file3.obj -asmopt=-prn_path -lnkopt=-list -osample.abs -cpu=S2 -dev=dr5f100pj.dvf |
In the ccrl command line, use the -asmopt option to specify an option dedicated to asrl; to specify an option dedicated to rlink, use the -lnkopt option. |
C source file "file1.c" is compiled by ccrl, and then assembly source file "file1.asm" is generated.
Next, assembly source file "file1.asm" and "file2.asm" are assembled by asrl, and then object file "file1.obj" and "file2.obj" are generated.
The assemble list files are output to the current folder.
Object file "file1.obj", "file2.obj", and "file3.obj" are linked by rlink, and then link map file "sample.map" and load module file "sample.abs" are generated.
C source file "file1.c" is compiled by ccrl, and then assembly source file "file1.asm" is generated.
Assembly source file "file1.asm" and "file2.asm" are assembled by asrl, and then object file "file1.obj" and "file2.obj" are generated.
Assemble list files are also output.
>asrl file1.asm -prn_path -cpu=S2 -dev=dr5f100pj.dvf >asrl file2.asm -prn_path -cpu=S2 -dev=dr5f100pj.dvf |
Object file "file1.obj", "file2.obj", and "file3.obj" are linked by rlink, and then link map file "sample.map" and load module file "sample.abs" are generated.
The library generator (lbgrl) is started to generate a standard library.