The control program cctc facilitates the invocation of the various components of the TriCore toolchain from a single command line. The control program is a command line tool so there are no equivalent options in EDE.
For the linker options in EDE, EDE invokes the linker
via the control program. Therefore, it uses the syntax of the control program
to pass options and files to the linker. See section 4.3
, Linker Options, for an overview of the EDE linker options and the corresponding command line linker options.
Some options are interpreted by the control program itself; other options are passed to those programs in the toolchain that accept the option.
The control program recognizes the following input files:
Normally, the control program tries to compile, assemble, link and locate all source files to absolute object files. There are however, options to suppress the assembler, link or locate stage.
Displays an overview of all command line options.
The following invocations all display a list of the available command line options:
cctc -? cctc
-
With this option you define the target processor for which you create your application. Default the control program generates an object file for the TC10GP.
Based on the target processor, the compiler includes the register file regcpu.sfr and the assembler includes the file regcpu.def.
In EDE, the target CPU has the following settings:
To define this on the command line:
cctc -Ctc10gp test.c
The control program generates an absolute object file test.elf for the TC10GP processor. The compiler includes the register file regtc10gp.sfr and the assembler includes the file regtc10gp.def.
Compiler option -C (Use SFR definitions for CPU)
Assembler option -C (Select CPU)
Section 5.5, Specifying a Target Processor, in Chapter Using the Compiler of the User's Guide.
With this option you tell the control program to treat all .c files as C++ files instead of C files. This means that the control program calls the C++ compiler prior to the C compiler and forces the linker to link C++ libraries.
cctc -c++ test.c
The file test.c is considered to be a C++ file.
Control program option -noc++ (Force C++ files to C mode)
Normally the control program generates an absolute object file of the specified output format from the file you supplied as input.
With this option you tell the control program to stop after a certain number of phases.
To generate the object file test.o:
cctc -c test.c
The control program stops after the file is assembled. It does not link nor locate the generated output.
-
With this option you force the control program to invoke the C++ muncher.
cctc -cm test.cc
The control program always invokes the C++ muncher when generating test.elf.
-
With this option you force the control program to invoke the C++ pre-linker.
cctc -cp test.cc
The control program always invokes the C++ pre-linker when generating test.elf.
-
With this option you tell the control program to generate an ELF/DWARF object file.
cctc -elf test.c
The control program generates the ELF/DWARF object file test.elf from test.c.
Linker option -Fformat (Output format)
Section 6.1, ELF/DWARF Object Format, in Chapter Object File Formats.
Instead of typing all options on the command line, you can create a option file which contains all options and file you want to specify. With this option you specify the option file to the control program.
Use an option file when the length of the command line would exceed the limits of the operating system, or just to store options and save typing.
You can specify the option -f multiple times.
"This has a single quote ' embedded"
'This has a double quote " embedded'
'This has a double quote " and \ a single quote '"' embedded"
"This is a continuation \ line" -> "This is a continuation line"
Suppose the file myoptions contains the following lines:
-nomap -elf test.c
Specify the option file to the control program:
cctc -m myoptions
This is equivalent to the following command line:
cctc -nomap -elf test.c
Default the control program uses the non-trapping floating point library (libfp.a). With this option you tell the control program to use the trapping floating point library (libfpt.a).
If you use the trapping floating point library, exceptional floating point cases are intercepted and can be handled separately by an application defined exception handler. Using this library decreases the execution speed of your application.
cctc -fptrap test.c
Link the trapping floating point library when generating the object file test.elf.
-
With this option you tell the control program to generate an IEEE-695 object file.
cctc -ieee test.c
The control program generates the IEEE-695 object file test.abs from test.c.
Linker option -Fformat (Output format)
With this option you tell the control program to generate an Intel hex object file.
cctc -ihex test.c
The control program generates the Intel hex object file test.hex from test.c.
Linker option -Fformat (Output format)
Section 6.3, Intel Hex Record Format, in Chapter Object File Formats.
With this option you tell the control program to treat all .cc files as C files instead of C++ files. This means that the control program does not call the C++ compiler and forces the linker to link C libraries.
cctc -noc++ test.cc
The C++ file test.cc is considered to be a normal C file.
Control program option -c++ (Force C files to C++ mode)
Default the control program specifies the standard C libraries and run-time library to the linker.
With this option you tell the control program not to specify the standard C libraries and run-time library to the linker.
In this case you must specify the libraries you want to link to the linker with the option -llibrary_name. The control program recognizes the option -l as an option for the linker.
cctc -nolib test.c
The control program does not specify any libraries to the linker. In normal cases this would result in unresoved externals.
To specify your own libraries (libmy.a) and avoid unresolved externals:
cctc -nolib -lmy test.c
Linker option -l (Search also in system library libx.a)
Default the control program generates a linker map file (.map). With this option you tell the control program to skip the generation of a linker map file.
cctc -nomap test.c
The control program does not generate the linker map file test.map.
Linker option -M (Generate map file)
Default, the control program generates a file with the same basename as the first specified input file. With this option you specify another name for the resulting absolute object file.
cctc test.c prog.c
The control program generates an ELF/DWARF object file (default) with the name test.elf.
To generate the file result.elf:
cctc -oresult.elf test.c prog.c
-
1. From the Project menu, select Project Options...
2. Expand the Processor entry and select Bypasses.
3. Select the bypasses you want to enable.
You can give one or more of the following arguments:
With this option the control program tells the compiler/assembler/linker to use software workarounds for some CPU functional problems.
cctc --silicon-bug=cpu5,cpu9 test.c
The compiler uses workarounds for TC113 problems CPU5 and CPU9.
See Chapter 8
, CPU Functional Problems, for more information about the individual problems and workarounds.
With this option you tell the control program to generate a Motorola S-record object file.
cctc -srec test.c
The control program generates the Motorola S-record object file test.sre from test.c.
Linker option -Fformat (Output format)
Section 6.2, Motorola S-record Format, in Chapter Object File Formats.
Default, the control program removes intermediate files like the .src file (result of the compiler phase) and the .out file (result of the linking phase).
With this option you tell the control program to keep temporary files it generates while creating the absolute object file.
cctc -tmp test.c
The control program keeps all intermediate files it generates while creating the absolute object file test.elf.
-
With this option you tell the control program to call a tool with the specified option. The control program does not use the option itself, but specifies it directly to the tool which the control program calls.
cctc -Wlk-r test.c
The control program does not use the option -r but calls the linker with the option -r (ltc -r).
-
Display version information. The control program ignores all other options or input files.
cctc -V
The control program does not call any tools but displays the following version information:
TASKING TriCore VX-toolset control program vx.yrz Build nnn Copyright years Altium BV Serial# 00000000
-
With this option you put the control program in verbose mode. With the option -v the control program performs it tasks while it prints the steps it performs to stdout. With the option -v0 the control program only prints the steps it would do without actually performing these steps.
cctc -v test.c
The control program processes the file test.c and displays the steps it performs:
+ ctc/bin/ctc -o /tmp/cc12440b.src test.c + ctc/bin/astc /tmp/cc12440b.src -o test.o + ctc/bin/ltc -r test.o -lc -lfp -lrt -L/ctc/lib/tc1 -o/tmp/cc12440c.out + ctc/bin/ltc -FELF -M -d/ctc/etc/tc.lsl /tmp/cc12440c.out -otest.elf
-
The C++ compiler may generate a compiled C++ file (.ic) that causes warnings during compilation or assembling. With this option you tell the control program to show these warnings. Default C++ warnings are suppressed.
cctc -wc++ test.cc
The control program calls the C++ compiler which generates the C file (test.ic). If this file causes warnings during compilation or assembling, these warnings are shown.
-