This section lists all assembler options.
Most command line options have an equivalent option in EDE but some options are only available on the command line. If there is no equivalent option in EDE, you can specify a command line option in EDE as follows:
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Miscellaneous.
3. Enter one or more command line options in the Additional options field.
Be aware that some command line options are not useful in EDE or just do not have any effect. For example, the option -V displays version header information and has no effect in EDE.
Options have both short and long names. Short option names always begin with a single minus (-) character, long option names always begin with two minus (--) characters. You can abbreviate long option names as long as it forms a unique name. You can mix short and long option names on the command line.
Options can have flags or suboptions. To switch a flag 'on', use a lowercase letter or a +longflag. To switch a flag off, use an uppercase letter or a -longflag. Separate longflags with commas. The following two invocations are equivalent:
astc -Lmx test.src astc --list-format=+macro,+macro-expansion test.src
When you do not specify an option, a default value may become active.
-
Displays an overview of all command line options.
The following invocations all display a list of the available command line options:
astc -? astc --help astc
-
1. From the Project menu, select Project Options...
2. Expand the Processor entry and select Processor Definition.
3. In the Target processor list select the target processor.
With this option you define the target processor for which you create your application.
Based on the target processor the assembler automatically detects whether a MMU or FPU-unit is present and whether the architecture is a TriCore2. This means you do not have to specify the assembler options --mmu-present, --fpu-present and --is-tricore2 explicitly when one of the supported derivatives is selected.
The assembler automatically includes the register file regcpu.def, unless you specify assembler option --no-tasking-sfr.
In EDE, the target CPU has the following settings:
To define this on the command line:
astc -Ctc11ib test.src astc --cpu=tc11ib test.src
The assembler assembles test.src for the TC11IB processor and includes the register file regtc11ib.def. Furthermore the assembler allows MMU instructions to be used.
To avoid conflicts, make sure you specify
the same target processor as you did for the compiler.
Assembler option --no-tasking-sfr (Do not include .def file)
Compiler option -C (Use SFR definitions for CPU)
Control program option -C (Use SFR definitions for CPU)
Section 6.5, Specifying a Target Processor, in Chapter Using the Assembler of the User's Guide.
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Miscellaneous.
3. Disable the option Assemble case sensitive.
With this option you tell the assembler not to distinguish between upper and lower case characters. Default the assembler considers upper and lower case characters as different characters.
Disabling the option Assemble
case sensitive in EDE is the same as specifying the option -c on the
command line.
Assembly source files that are generated by the compiler must always be assembled case sensitive. When you are writing your own assembly code, you may want to specify the case insensitve mode.
To assemble case insensitive:
astc -c test.src astc --case-insensitive test.src
The assembler considers upper and lower case characters as being the same. So, for example, the label LabelName is the same label as labelname.
Linker option --case-sensitive (Link case insensitive)
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Preprocessing.
3. Enter a macro name and/or definition in the Define user macros field.
With this option you can define a macro and specify it to the assembler preprocessor. If you only specify a macro name (no macro definition), the macro expands as '1'.
You can specify as many macros as you like. In EDE, use commas to separate multiple macro definitions. On the command line you can use the option -D multiple times. If the command line exceeds the limit of the operating system, you can define the macros in an option file which you then must specify to the assembler with the option -ffile.
Defining macros with this option (instead of in the assembly source) is, for example, useful in combination with conditional assembly as shown in the example below.
This option has the same effect as defining symbols via
the .DEFINE,
.SET, and
.EQU directives.
(similar to #define in the C language). With the .MACRO directive you can define more complex macros.
Consider the following C program with conditional code to compile a demo program and a real program:
.IF DEMO == 1 ... ; instructions for demo application .ELSE ... ; instructions for the real application .ENDIF
You can now use a macro definition to set the DEMO flag:
astc -DDEMO test.src astc -DDEMO=1 test.src
astc --define=DEMO test.src astc --define=DEMO=1 test.src
Note that all four invocations have the same effect.
Assembler option -f (Specify an option file)
Section 4.9.5, Conditional Assembly, in Chapter TriCore Assembly Language of the User's Guide.
1. In the Help menu, enable the option Show Help on Tool Errors.
2. In the Build tab of the Output window, double-click on an error or warning message.
Optionally, you can use one of the following display formats (format):
With this option the assembler displays a description and explanation of the specified error message(s) on stdout (usually the screen). The assembler does not assemble any files.
If you want the output in a file, you have to use output redirection.
To display an explanation of message number 240, enter:
astc --diag=240
This results in the following message and explanation:
W240: additional input files will be ignored The assembler supports only a single input file. All other input files are ignored.
To write an explanation of all errors and warnings in HTML format to file aserrors.html, enter:
astc --diag=html:all > aserrors.html
Section 6.8
, Assembler Error Messages, in Chapter Using the Assembler of the User's Guide.
-
With this option the assembler redirects error messages to a file.
If you do not specify a filename, the error file will be named after the input file with extension .ers.
To write errors to errors.ers instead of stderr, enter:
astc --error-file=errors.ers test.src
Assembler option --warnings-as-errors (Treat warnings as error)
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Miscellaneous.
3. Add the option -f to the Addtional options field.
In EDE you can save your options in a file and restore them to call
the assembler with those options:
1. From the Project menu, select Save Options... or Load Options...
Be aware that when you specify the option -f in the Additional options field, the options are added to the assembler options you have set in the Project Options dialog. Only in extraordinary cases you may want to use them in combination.
Instead of typing all options on the command line, you can create an option file which contains all options and files you want to specify. With this option you specify the option file to the assembler.
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:
-Ctc10gp test.src
Specify the option file to the assembler:
astc -f myoptions
This is equivalent to the following command line:
astc -Ctc10gp test.src
-
1. From the Project menu, select Project Options...
2. Expand the Processor entry and select Processor Definition.
3. In the Target processor list select a (user defined TriCore) option.
4. Enable the option FPU present (on user defined CPU).
5. Expand the Assembler entry and select Miscellaneous.
6. Enable the option Allow hardware floating point instructions.
With this option you can use single precision floating point instructions in the assembly code. When you select this option, the define __FPU__ is set to 1. Default the define __FPU__ is set to 0.
To allow the use of floating point unit (FPU) instructions in the assembly code, enter:
astc --fpu-present test.src
Assembler option -C (Select CPU)
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Debug Information.
3. Enable one or more debug options.
You cannot use Assembly
source line information and Pass HLL debug information simultaneously.
You can set the following flags:
With this option you tell the assembler to generate debug information. If you do not use this option or if you specify -g without any flags, the default is -gs.
You cannot specify -gah. Either the assembler generates assembly source line information, or it passes HLL debug information.
When you specify -gs, the assembler selects which flags to use. If high level language information is available in the source file, the assembler passes this information (same as -gAhL). If not, the assembler generates assembly source line information and local symbols debug information (same as -gaHl).
To disable symbolic debug information, turn all flags off:
astc -gAHLS test.src astc --debug-info=-asm,-hll,-local,-smart test.src
To enable smart debugging, enter:
astc -gs test.src astc --debug-info=+smart test.src
-
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Preprocessing.
3. Enter the name of the file in the Include this file before source field.
With this option you include one extra file at the beginning of the assembly source file, before other includes. This is the same as specifying .INCLUDE 'file' at the beginning of your assembly sources.
astc -Hmyinc.inc test1.src
The file myinc.inc is included at the beginning of test1.src before it is assembled.
Assembler option -I (Add directory to include file search path)
Section 6.6, How the Assembler Searches Include Files, in Chapter Using the Assembler of the User's Guide.
1. From the Project menu, select Directories...
2. Enter one or more search paths in the Include Files Path field.
With this option you can specify the path where your include files are located. A relative path will be relative to the current directory.
The order in which the assembler searches for include files is:
1. The pathname in the assembly file and the directory of the assembly source.
2. The path that is specified with this option.
3. The path that is specified in the environment variable ASTCINC when the product was installed.
4. The default directory c:\ctc\include.
Suppose that your assembly source file test.src contains the following line:
.INCLUDE 'myinc.inc'
You can call the assembler as follows:
astc -Ic:\proj\include test.src
First the assembler looks in the directory where test.src is located for the file myinc.inc. If it does not find the file, it looks in the directory c:\proj\include for the file myinc.inc (this option).
Section 6.6
, How the Assembler Searches Include Files, in Chapter Using the Assembler of the User's Guide.
Section 1.3.2, Configuring the Command Line Environment, in Chapter Software Installation of the User's Guide.
Assembler option -H (Include file at the start of the input files)
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Miscellaneous.
3. Select the default label mode: Local or Global.
With this option you tell the assembler how to treat symbols that you have not specified explicitly as global or local.
Default the assembler treats all symbols as local symbols unless you have defined them explicitly as global.
astc -ig test.src astc --symbol-scope=global test.src
The assembler treats all symbols as global symbols unless they are defined as local symbols in the assembly source file.
-
1. From the Project menu, select Project Options...
2. Expand the Processor entry and select Processor Definition.
3. In the Target processor list select (user defined TriCore-2).
With this option you can use TriCore 2 instructions in the assembly code. When you select this option, the define __TC2__ is set to 1.
To allow the use of TriCore 2 instructions in the assembly code, enter:
astc --is-tricore2 test.src
Assembler option -C (Select CPU)
EDE always removes the .o file when errors occur during assembly.
If an error occurs during assembly, the resulting .o file may be incomplete or incorrect. With this option you keep the generated object file (.o) when an error occurs.
By default the assembler removes the generated object file (.o) when an error occurs. This is useful when you use the make utility mktc. If the erroneous files are not removed, the make utility may process corrupt files on a subsequent invocation.
Use this option when you still want to use the generated object. For example when you know that a particular error does not result in a corrupt object file.
astc -k test.src
When an error occurs during assembly, the generated output file test.o will not be removed.
Assembler option --warnings-as-errors (Treat warnings as errors)
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select List File.
3. Enable the options to include that information in the list file.
You can set the following flags:
With this option you specify which information you want to include in the list file. Use this option in combination with the option - l (--list-file).
If you do not specify this option, the assembler uses the default: -LcDEGilMnPqsVWXy.
astc -l -Ldm test.src astc --list-file --list-format=+section,+macro test.src
The assembler generates a list file that includes all default information plus section directives and macro definitions.
Assembler option -l (Generate list file)
Assembler option -tl (Display section information in list file)
Linker option -M (Generate map file)
Section 5.1, Assembler List File Format, in Chapter List File Formats.
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select List File.
3. Enable the option Generate list file.
With this option you tell the assembler to generate a list file. A list file shows the generated object code and the relative addresses. Note that the assembler generates a relocatable object file with relative addresses.
To generate a list file with the name test.lst, enter:
astc -l test.src astc --list-file test.src
Assembler option -L (List file formatting options)
Linker option -M (Generate map file)
Section 5.1, Assembler List File Format, in Chapter List File Formats.
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Preprocessing.
3. Select No preprocessor or the TASKING preprocessor.
With this option you select the preprocessor that the assembler will use. Default, the assembler uses the TASKING preprocessor.
When the assembly source file does not contain any preprocessor symbols, you can specify the assembler not to use a preprocessor.
astc test.src astc -mt test.src astc --preprocessor=tasking test.src
These invocations have the same effect: the assembler preprocesses the file test.src with the TASKING preprocessor.
-
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Miscellaneous.
3. Enable the option Allow memory management instructions.
This option is only available (and relevant) for specific
target processors. See option
-C (--cpu)
to select a target processor.
With this option you can use memory management instructions in the assembly code. When you select this option, the define __MMU__ is set to 1.
To allow the use of memory management unit (MMU) instructions in the assembly code, enter:
astc --mmu-present test.src
Assembler option -C (Select CPU)
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Preprocessing.
3. Disable the option Include '.def' file.
With this option the assembler does not include the register file regcpu.def as based on the assembler option -C.
Use this option if you want to use your own set of SFR '.def' files.
astc -Ctc11ib --no-tasking-sfr test.src
The register file regtc11ib.def is not included, but the assembler allows the use of MMU instructions due to -C.
Assembler option -C (Select CPU)
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Optimization.
3. Enable or disable the optimization suboptions.
You can set the following flags:
With this option you can control the level of optimization. If you do not use this option, -Ogs is the default.
The following invocations are equivalent and result all in the default optimizations:
astc test.src astc -Ogs test.src astc --optimize=+generics,+instr-size test.src
Section 6.3
, Assembler Optimizations, in Chapter Using the Assembler of the User's
Guide.
-
With this option you can specify another filename for the output file of the assembler. Without this option, the basename of the assembly source file is used with extension .o.
EDE names the output file always after the assembly source file.
astc -o relobj.o asm.src astc --output=relobj.o asm.src
The assembler creates the file relobj.o for the assembled file asm.src.
Without the option -o, like EDE, the assembler uses the name of the input file and creates asm.o.
-
1. From the Project menu, select Project Options...
2. Expand the Processor entry and select Bypasses.
3. Select the CPU functional problems you want to check for.
You can give one or more of the following arguments:
With this option you tell the assembler to check for some CPU functional problems. The assembles gives a warning when the specified problem is present.
astc --silicon-bug=cpu5,cpu9 test.src
The assembler checks for TC113 problems CPU5 and CPU9 and gives a warning when the problem is present.
See Chapter 8
, CPU Functional Problems, for more information about the individual problems.
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select List File.
3. Enable the option Generate list file.
4. Enable the option Display section information.
You can set the following flags:
With this option you tell the assembler to display section information. For each section its memory space, size, total cycle counts and name is listed on stdout and/or in the list file.
The cycle count consists of two parts: the total accumulated count for the section and the total accumulated count for all repeated instructions (REP/DO). In the case of nested loops it is possible that the total supersedes the section total.
With -tl, the assembler writes the section information to the list file. You must specify this option in combination with the option - l (generate list file).
astc -l -tcl test.src astc -l --section-info=+console,+list test.src
The assembler generates a list file and writes the section information to this file. The section information is also displayed on stdout.
Section summary: REL 4 .zbss_clr_test1 REL 46 .text_test1 REL 4 .zdata_rom_test1
Assembler option -l (Generate list file)
-
Display version information. The assembler ignores all other options or input files.
astc -V astc --version
The assembler does not assemble any files but displays the following version information:
TASKING TriCore VX-toolset Assembler vxx.yrz Build nnn Copyright years Altium BV Serial# 00000000
-
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Warnings.
3. Enable one of the options Report all warnings, Suppress all warnings, or Suppress specific warnings.
4. Enter the numbers, separated by commas, of the warnings you want to suppress.
With this option you can suppresses all warning messages or specific warning messages.
To suppress all warnings:
astc -w test.src astc --no-warnings test.src
To suppress warnings 135 and 136:
astc -w135,136 test.src astc --no-warnings=135,136 test.src
Assembler option --warnings-as-errors (Treat warnings as error)
1. From the Project menu, select Project Options...
2. Expand the Assembler entry and select Warnings.
3. Enable the option Treat warnings as errors.
With this option you tell the assembler to treat warnings as errors.
astc --warnings-as-errors test.src
When a warning occurs, the assembler considers it as an error.
Assembler option -w (suppress some or all warnings)