Skip to main content

IAR Embedded Workbench for RX 5.20

Summary of compiler options

In this section:

This table summarizes the compiler command line options:

Command line option

Description

--align_func

Specifies the alignment of function entry points

‑‑c89

Specifies the C89 dialect

--canary_value

Specifies a constant value for the stack protection canary element

‑‑char_is_signed

Treats char as signed

‑‑char_is_unsigned

Treats char as unsigned

‑‑core

Specifies a CPU core

‑‑c++

Specifies Standard C++

-D

Defines preprocessor symbols

‑‑data_model

Specifies the data model

‑‑debug

Generates debug information

‑‑dependencies

Lists file dependencies

‑‑deprecated_feature_warnings

Enables/disables warnings for deprecated features

‑‑diag_error

Treats these as errors

‑‑diag_remark

Treats these as remarks

‑‑diag_suppress

Suppresses these diagnostics

‑‑diag_warning

Treats these as warnings

--diagnostics_format

Specifies the format for printed diagnostics

‑‑diagnostics_tables

Lists all diagnostic messages

‑‑discard_unused_publics

Discards unused public symbols

‑‑dlib_config

Uses the system include files for the DLIB library and determines which configuration of the library to use

‑‑do_explicit_zero_opt_in_named_sections

For user-named sections, treats explicit initializations to zero as zero initializations

‑‑double

Forces the compiler to use 32-bit or 64-bit doubles

--dynamic_output

Lists in a structured format all output files

-e

Enables IAR language extensions

‑‑enable_restrict

Enables the Standard C keyword restrict

‑‑endian

Specifies the byte order of the generated code and data

‑‑enum_is_int

Sets the minimum size on enumeration types

‑‑error_limit

Specifies the allowed number of errors before compilation stops

-f

Extends the command line

‑‑f

Extends the command line, optionally with a dependency

‑‑fpu

Specifies how the compiler handles floating-point operations

--function_sections

Places each function of the source file in a separate section in the resulting object file

‑‑generate_entries_without_bounds

Generates extra functions for use from non-instrumented code. See Compiler and linker reference for C-RUN

‑‑guard_calls

Enables guards for function static variable initialization

‑‑header_context

Lists all referred source files and header files

-I

Specifies include file path

‑‑ignore_uninstrumented_pointers

Disables checking of accesses via pointers from non-instrumented code. See Compiler and linker reference for C-RUN

--int

Specifies the size of the data type int

--joined_bitfields

Enables the bitfield allocation strategy Joined types

-l

Creates a list file

‑‑language

Enables IAR or GNU language extensions

‑‑libc++

Makes the compiler and linker use the Libc++ library

--lock

Locks registers

‑‑macro_positions_in _diagnostics

Obtains positions inside macros in diagnostic messages

‑‑max_cost_constexpr_call

Specifies the limit for constexpr evaluation cost

‑‑max_depth_constexpr_call

Specifies the limit for constexpr recursion depth

‑‑mfc

Enables multi-file compilation

‑‑no_bom

Omits the Byte Order Mark for UTF-8 output files

‑‑no_call_frame_info

Disables output of call frame information

‑‑no_clustering

Disables static clustering optimizations

‑‑no_code_motion

Disables code motion optimization

‑‑no_cross_call

Disables cross-call optimization

‑‑no_cse

Disables common subexpression elimination

‑‑no_default_fp_contract

Sets the default value for STDC FP_CONTRACT to OFF

‑‑no_exceptions

This option has no effect and is included for portability reasons

‑‑no_fragments

Disables section fragment handling

‑‑no_inline

Disables function inlining

‑‑no_normalize_file_macros

Disables normalization of paths in the symbols __FILE__ and __BASE_FILE__

‑‑no_path_in_file_macros

Removes the path from the return value of the symbols __FILE__ and __BASE_FILE__

‑‑no_rtti

This option has no effect and is included for portability reasons

--nosave_tfu

Does not save the TUF v2 registers in interrupt functions

‑‑no_scheduling

Disables the instruction scheduler

--no_shattering

Disables variable shattering

‑‑no_size_constraints

Relaxes the normal restrictions for code size expansion when optimizing for speed

‑‑no_static_destruction

Disables destruction of C++ static variables at program exit

‑‑no_system_include

Disables the automatic search for system include files

‑‑no_tbaa

Disables type-based alias analysis

‑‑no_typedefs_in_diagnostics

Disables the use of typedef names in diagnostics

‑‑no_uniform_attribute_syntax

Specifies the default syntax rules for IAR type attributes

‑‑no_unroll

Disables loop unrolling

‑‑no_warnings

Disables all warnings

‑‑no_wrap_diagnostics

Disables wrapping of diagnostic messages

‑‑nonportable_path_warnings

Generates a warning when the path used for opening a source header file is not in the same case as the path in the file system

-O

Sets the optimization level

-o

Sets the object filename. Alias for ‑‑output

‑‑only_stdout

Uses standard output only

‑‑output

Sets the object filename

--patch

Generates code that does not trigger some known hardware-related problems for a specific device group

‑‑pending_instantiations

Sets the maximum number of instantiations of a given C++ template

‑‑predef_macros

Lists the predefined symbols.

‑‑preinclude

Includes an include file before reading the source file

‑‑preprocess

Generates preprocessor output

‑‑public_equ

Defines a global named assembler label

-r

Generates debug information. Alias for ‑‑debug

‑‑relaxed_fp

Relaxes the rules for optimizing floating-point expressions

‑‑remarks

Enables remarks

‑‑require_prototypes

Verifies that functions are declared before they are defined

--reversed_bitfields

Enables the bitfield allocation strategy Reverse disjoint types

‑‑ropi

Generates code that usesposition-independent references to access code and read-only data

‑‑runtime_checking

Enables runtime error checking. See Compiler and linker reference for C-RUN

‑‑rwpi

Generates code that uses an offset from the static base register to address-writable data

‑‑rwpi_near

Generates code that uses an offset from the static base register to address-writable data. Addresses max 64 Kbytes of memory

--save_acc

Saves and restores the DSP accumulator when the interrupt context switches

‑‑section

Changes a section name

‑‑silent

Sets silent operation

‑‑source_encoding

Specifies the encoding for source files

--sqrt_must_set_errno

Disables replacing calls to the library function sqrtf with the RXv2/RXv3 core instruction FSQRT

‑‑stack_protection

Enables stack protection

‑‑strict

Checks for strict compliance with Standard C/C++

--suppress_core_attribute

Disables generation of the runtime attribute __core

‑‑system_include_dir

Specifies the path for system include files

‑‑text_out

Specifies the encoding for text output files

--tfu

Enables support for the TUF

--tfu_version

Specifies the TUF version that needs to be used

‑‑uniform_attribute_syntax

Specifies the same syntax rules for IAR type attributes as for const and volatile

‑‑use_c++_inline

Uses C++ inline semantics in C

‑‑use_paths_as_written

Use paths as written in debug information

‑‑use_unix_directory_separators

Uses / as directory separator in paths

‑‑utf8_text_in

Uses the UTF-8 encoding for text input files

‑‑version

Sends compiler output to the console and then exits

‑‑vla

Enables VLA support

‑‑warn_about_c_style_casts

Makes the compiler warn when C-style casts are used in C++ source code

‑‑warn_about_incomplete_constructors

Makes the compiler warn about constructors that do not initialize all members

‑‑warn_about_missing_field_initializers

Makes the compiler warn about fields without explicit initializers

‑‑warnings_affect_exit_code

Warnings affect exit code

‑‑warnings_are_errors

Warnings are treated as errors

Table 76. Compiler options summary