4.2 Assembler Options

This section lists all assembler options.

Options in EDE versus options on the command line

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.

Short and long option names

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:

When you do not specify an option, a default value may become active.

-? (--help)

EDE

-

Command line syntax

Description

Displays an overview of all command line options.

Example

The following invocations all display a list of the available command line options:

Related information

-

-C (--cpu)

EDE

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.

Command line syntax

Description

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.

Example

In EDE, the target CPU has the following settings:

To define this on the command line:

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.

Related information

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.

-c (--case-insensitive)

EDE

1. From the Project menu, select Project Options...

2. Expand the Assembler entry and select Miscellaneous.

3. Disable the option Assemble case sensitive.

Command line syntax

Description

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.

Example

To assemble case insensitive:

The assembler considers upper and lower case characters as being the same. So, for example, the label LabelName is the same label as labelname.

Related information

Linker option --case-sensitive (Link case insensitive)

-D (--define)

EDE

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.

Command line syntax

Description

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.

Example

Consider the following C program with conditional code to compile a demo program and a real program:

You can now use a macro definition to set the DEMO flag:

Note that all four invocations have the same effect.

Related information

Assembler option -f (Specify an option file)

Section 4.9.5, Conditional Assembly, in Chapter TriCore Assembly Language of the User's Guide.

--diag

EDE

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.

Command line syntax

Optionally, you can use one of the following display formats (format):

Description

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.

Example

To display an explanation of message number 240, enter:

This results in the following message and explanation:

To write an explanation of all errors and warnings in HTML format to file aserrors.html, enter:

Related information

Section 6.8 , Assembler Error Messages, in Chapter Using the Assembler of the User's Guide.

--error-file

EDE

-

Command line syntax

Description

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.

Example

To write errors to errors.ers instead of stderr, enter:

Related information

Assembler option --warnings-as-errors (Treat warnings as error)

-f (--option-file)

EDE

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.

Command line syntax

Description

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.

Format of an option file

     "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"

Example

Suppose the file myoptions contains the following lines:

Specify the option file to the assembler:

This is equivalent to the following command line:

Related information

-

--fpu-present

EDE

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.

Command line syntax

Description

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.

Example

To allow the use of floating point unit (FPU) instructions in the assembly code, enter:

Related information

Assembler option -C (Select CPU)

-g (--debug-info)

EDE

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.

Command line syntax

You can set the following flags:

Default

Description

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).

Example

To disable symbolic debug information, turn all flags off:

To enable smart debugging, enter:

Related information

-

-H (--include-file)

EDE

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.

Command line syntax

Description

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.

Example

The file myinc.inc is included at the beginning of test1.src before it is assembled.

Related information

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.

-I (--include-directory)

EDE

1. From the Project menu, select Directories...

2. Enter one or more search paths in the Include Files Path field.

Command line syntax

Description

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.

Example

Suppose that your assembly source file test.src contains the following line:

You can call the assembler as follows:

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).

Related information

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)

-i (--symbol-scope)

EDE

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.

Command line syntax

Default

Description

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.

Example

The assembler treats all symbols as global symbols unless they are defined as local symbols in the assembly source file.

Related information

-

--is-tricore2

EDE

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).

Command line syntax

Description

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.

Example

To allow the use of TriCore 2 instructions in the assembly code, enter:

Related information

Assembler option -C (Select CPU)

-k (--keep-output-files)

EDE

EDE always removes the .o file when errors occur during assembly.

Command line syntax

Description

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.

Example

When an error occurs during assembly, the generated output file test.o will not be removed.

Related information

Assembler option --warnings-as-errors (Treat warnings as errors)

-L (--list-format)

EDE

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.

Command line syntax

You can set the following flags:

Default

Description

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.

Example

The assembler generates a list file that includes all default information plus section directives and macro definitions.

Related information

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.

-l (--list-file)

EDE

1. From the Project menu, select Project Options...

2. Expand the Assembler entry and select List File.

3. Enable the option Generate list file.

Command line syntax

Description

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.

Example

To generate a list file with the name test.lst, enter:

Related information

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.

-m (--preprocessor-type)

EDE

1. From the Project menu, select Project Options...

2. Expand the Assembler entry and select Preprocessing.

3. Select No preprocessor or the TASKING preprocessor.

Command line syntax

Default

Description

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.

Example

These invocations have the same effect: the assembler preprocesses the file test.src with the TASKING preprocessor.

Related information

-

--mmu-present

EDE

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.

Command line syntax

Description

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.

Example

To allow the use of memory management unit (MMU) instructions in the assembly code, enter:

Related information

Assembler option -C (Select CPU)

--no-tasking-sfr

EDE

1. From the Project menu, select Project Options...

2. Expand the Assembler entry and select Preprocessing.

3. Disable the option Include '.def' file.

Command line syntax

Description

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.

Example

The register file regtc11ib.def is not included, but the assembler allows the use of MMU instructions due to -C.

Related information

Assembler option -C (Select CPU)

-O (--optimize)

EDE

1. From the Project menu, select Project Options...

2. Expand the Assembler entry and select Optimization.

3. Enable or disable the optimization suboptions.

Command line syntax

You can set the following flags:

Default

Description

With this option you can control the level of optimization. If you do not use this option, -Ogs is the default.

Example

The following invocations are equivalent and result all in the default optimizations:

Related information

Section 6.3 , Assembler Optimizations, in Chapter Using the Assembler of the User's Guide.

-o (--output)

EDE

-

Command line syntax

Description

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.

Example

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.

Related information

-

--silicon-bug

EDE

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.

Command line syntax

You can give one or more of the following arguments:

Description

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.

Example

The assembler checks for TC113 problems CPU5 and CPU9 and gives a warning when the problem is present.

Related information

See Chapter 8 , CPU Functional Problems, for more information about the individual problems.

-t (--section-info)

EDE

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.

Command line syntax

You can set the following flags:

Description

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).

Example

The assembler generates a list file and writes the section information to this file. The section information is also displayed on stdout.

Related information

Assembler option -l (Generate list file)

-V (--version)

EDE

-

Command line syntax

Description

Display version information. The assembler ignores all other options or input files.

Example

The assembler does not assemble any files but displays the following version information:

Related information

-

-w (--no-warnings)

EDE

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.

Command line syntax

Description

With this option you can suppresses all warning messages or specific warning messages.

Example

To suppress all warnings:

To suppress warnings 135 and 136:

Related information

Assembler option --warnings-as-errors (Treat warnings as error)

--warnings-as-errors

EDE

1. From the Project menu, select Project Options...

2. Expand the Assembler entry and select Warnings.

3. Enable the option Treat warnings as errors.

Command line syntax

Description

With this option you tell the assembler to treat warnings as errors.

Example

When a warning occurs, the assembler considers it as an error.

Related information

Assembler option -w (suppress some or all warnings)


Copyright © 2003 Altium BV