This section describes how to operate the RX family C/C++ compiler.
The commands will take options from left to right on the command-line. When two or more options with conflicted meanings are selected and it will take neither error nor warning, the right-side option will be enabled. This results are different according to each options. For more details, please confirm each options' descriptions.
ccrx is the startup command for the compile driver.
Compilation, assemble, and linkage can be performed using this command.
When the extension of an input file is ".s", ".src", ".S", or ".SRC", the compiler interprets the file as an assembly-language file (.src, .s) and initiates the assembler.
A file with an extension other than those above is compiled as a C/C++ source file (.c, .cpp).
Two or more input files can be specified at the same time. Cases where two or more C/C++ language source files are specified as input files at the same time are referred to as "batch compilation."
ccrx [Δ<option> …][Δ<file name>[ Δ<option> …] …] <option>: -<option>[=<suboption>[=<suboption>]][, …] |
... : Pattern in proceeding [ ] can be repeated
{ } : Select from items delimited by the pipe symbol ("|")
asrx is the startup command for the assembler.
rlink is the startup command for the optimizing linkage editor.
The optimizing linkage editor has the following functions as well as the linkage processing.
lbgrx is the startup command for the library generator.
Perform all steps below by a single command.
When the output type specification of the output option is changed to -output=sty, the file after linkage will be generated as a Motorola S type file. |
An intermediate file generated during the absolute file generation process (assembly-language file or relocatable file) is not saved. Only a file of the type specified by the output option is to be generated. |
In order to specify assemble options and linkage options that are valid for only the assembler and optimizing linkage editor in ccrx, use the -asmcmd, -lnkcmd, -asmopt, and -lnkopt options. |
Object files that are to be linked are allocated from address 0. The order of the sections is not guaranteed. In order to specify the allocation address or section allocation order, specify options for the optimizing linkage editor using the -lnkcmd and -lnkopt options. |
Perform all steps below by a single command, and initiate the linker with another command to generate tp.abs.
ccrx -isa=rxv1 -output=obj tp1.c tp2.c rlink -form=abs -output=tp.abs -subcommand=cmd.sub tp1.obj tp2.obj |
In order to change relocatable file names, their C/C++ source files have to be input in ccrx, one file each. |
When the form option in rlink is changed to -form=sty, the file after linkage will be generated as a Motorola S type file. |
Individually perform each step below by a single command.
Compile C/C++ source files (tp1.c and tp2.c) in ccrx to generate assembly-language files (tp1.src and tp2.src). |
Assemble the assembly-language files (tp1.src and tp2.src) in asrx to generate relocatable files (tp1.obj and tp2.obj). |
ccrx -isa=rxv1 -output=src tp1.c tp2.c asrx tp1.src tp2.src rlink -form=abs -output=tp.abs -subcommand=cmd.sub tp1.obj tp2.obj |
Perform all steps below by a single command.
Object files that are to be linked are allocated from address 0. The order of the sections is not guaranteed. In order to specify the allocation address or section allocation order, specify options for the optimizing linkage editor using the -lnkcmd and -lnkopt options. |
Individually perform each step below by a single command.
Assemble assembly-language files (tp1.src and tp2.src) in asrx to generate relocatable files (tp1.obj and tp2.obj). |
ccrx -isa=rxv1 -output=obj tp1.src tp2.src rlink -form=abs -output=tp.abs -subcommand=cmd.sub tp1.obj tp2.obj |