User manual
Project creation and build UM0036
98/385 Doc ID 7705 Rev 11
When the category is set to General, the standard optimization options for ST7 are:
● Default: The following optimizations are employed by default:
– Uses registers a and x to hold the first argument of a function call if the function
call does not return a structure and is a “char,” “short,” “int,” “pointer to” or an “array
of” type function call.
– Performs operations in 8-bit precision if the operands are 8-bit.
– Eliminates unreachable code.
– Chooses the smallest possible jump/branch instructions and eliminates jumps to
jumps and jumps over jumps.
– Performs multiplication by powers of two as faster shift instructions
● Disable (For Debugging): Introduces -no option in the command line, which disables
all optimizations.
● Customize: Allows you to choose the options you want for generation of debug
information. These options are summarized in Customizing Cosmic C compiler
optimizations on page 101.
The standard optimization options for STM8 are:
● Maximize execution speed
● Disable (For Debugging): Introduces -no option in the command line, which disables
all optimizations.
● Minimize code size: Introduces +compact on the command line.
● Customize: Allows you to choose the options you want for generation of debug
information. These options are summarized in Customizing Cosmic C compiler
optimizations on page 101.
Compiler messages display
The Compiler Messages Display field offers the following options:
●
Display compilation errors only
●
Display errors and warnings (STM8 only)
C language
The C language settings allow you to define the programming language styles to apply
while compiling the application.
When the category is set to General, the standard C language options are:
● Default: Compiler default language options.
● Enforce Functions Prototyping: Inserts the -pp option in the command line, which
enforces prototype declaration for functions. An error message is issued if a function is
used and no prototype declaration is found for it.
● Enforce Strict ANSI Checking: Adds the -psa option in the command line, which
enforces strict ANSI checking by rejecting any syntax or semantic extension. This
option overrides the enum size optimization (-pne, see Customizing Cosmic C
compiler optimizations on page 101).
● Customize: Allows you to choose the options you want for generation of debug
information. These options are summarized in Customizing Cosmic C compiler
language settings on page 102.