User manual

UM0036 Project creation and build
Doc ID 7705 Rev 11 101/385
Customizing Cosmic C compiler optimizations
To further customize optimizations, select Customize from the list box. Alternatively, from
the Category list box, select Optimizations. The view in the C Compiler tab changes to
that shown in Figure 66.
Figure 66. Cosmic C compiler optimizations view
In this tab view, you can choose from the optimization options described in Table 34.
Table 34. Cosmic C compiler optimization options
Option
(1)
Description
Minimize Code Size (+compact)
Adds the +compact option to the command line, which
enables the optimizer factorization feature with a default depth
of 7 instructions. This option is not available with the ST7 C
compiler versions under 4.4.
Split Functions in Separate
Sections (+split)
Produce each C function in a separate section, thus allowing
the linker to suppress unused functions if the -k option has
been specified on at least one segment in the linker command
file.
Verbose Mode When Building
Jump Table (-v)
(ST7 only)
Display the name of each file that has been processed.
Optimize Size of Enum Variables
(-pne)
Do not optimize size of enum variables. By default, the compiler
selects the smallest integer type by checking the range of the
declared enum members.
Optimize -asm code (-ga) Optimize assembler code by invoking the absolute assembler.
Leave removed instructions as
comments (-oc)
Leaves all removed instructions as comments in the application
code.