Keil Logo

Options for Component

The Options for Component dialog defines properties, memory assignments, compiler, and assembler related parameters specific to a Software Component.

Open the dialog with the menu Project - Options for Component, or the context menu of the Project window.

Options for Component dialog

Software Component

List of Software Components for which you can specify options. Components marked with an asterisk have option values that differ from the default settings. Select a Software Component to set specific options.

General information about the Software Component is displayed on top of the right page. Where applicable, you get an link to the Software Component documentation.


The Properties dialog allows you to set options about the usage of the component.

Software pack details

Shows information about the source of the Software Component such as the name of the Software Pack that contains the component, the Internet address from where the Software Pack was downloaded, and the vendor name of the Software Pack.


Use for all project targets
Enable this flag to apply the special settings to all targets. Disable this option to set individual options for each target.
Set a Software Component variant. For example to support files with long names (LFN) or short names (SFN). Software Component variants can be selected also in the Manage Run-Time Environment.
Select a specific Software Component version. The version number of a component might differ from the version number of the Software Pack. The field is not selectable when Use latest installed version is enabled.
Use latest installed version
Disable the option to select a specific Software Component version. This flag has an impact when Software Components are updated. Refer to Update Software Component Files for details.

Enable this option to update the project when a new version of the Software Component gets installed. Files local to a project are not affected by Software Pack updates. Files referenced from the /ARM/PACK folder get changed (for example, header files).

Include in target build
Disable this option to exclude the Software Component from the build process. The files belonging to this component are not translated and not linked into the application object file.
Include in library
By default all source files and libraries used in Software Components are excluded from the build when the project output is a library. Refer to Create a Library File. Enable this option to include source files and libraries of Software Components to the generated library output.


The Memory dialog allows you to specify memory layout options.

The drop-downs offer a list of memory areas that have been defined in the dialog Options for Target - Target.

Code / Const
Read-Only (RO) section that keeps program code and constants. Typically located in ROM.
Zero Initialized Data
Zero-Initialized (ZI) data section. Variables in this section are set to 0 on program launch.
Other Data
Read-Write (RW) data section for variables that get initialized to a specific value at startup.


The C/C++ dialog allows you to set compiler options.

Preprocessor Symbols

Set preprocessor symbols, which can be checked with #if, #ifdef and #ifndef. The defined names are copied exactly as they are entered (case-sensitive). Optionally, each name may get a value. Define: Check, NoExtRam, X1=1+5 is identical to the following C preprocessor #define statements:
   #define Check
   #define NoExtRam
   #define X1 1+5
Clears Define assignments entered in the options dialog of a higher level.


Control compiler code optimization. Sets the compiler command-line option -Onum:

  • Default: Use the compiler default or the setting of a higher level.
  • Level 0 (-O0): Turn off all optimization, except some simple source transformations.
  • Level 1 (-O1): Turn off optimizations that seriously degrade the debug view.
  • Level 2 (-O2): High optimization (default level). The debug view might be less satisfactory because the mapping of object code to source code is not always clear.
  • Level 3 (-O3): Maximum optimization. Note that Level 3 in combination with Optimize for Time may generate more code that Level 2 since it may unroll loops.
Optimize for Time
Reduce execution time at the possible expense of a larger code size. Sets the compiler command-line option -Otime. If not enabled, the compiler assumes -Ospace.

Misc Controls

Specify any directive for which there is no individual dialog control.


The Asm dialog allows you to set assembler options.

Conditional Assembly Control Symbols

Sets symbols using the SETA directive. The defined names are copied exactly as they are entered (case-sensitive). A value can be assigned to each value. For example: Check, NoExtRam, X1=1+5
Undefine symbols that were defined on a higher level.

Other Controls

Misc Controls
Specify any directive not covered in a dialog.


Removes the selected Software Component from the project (all targets). This action is independent of the flag Use for all targets.
Save changes and close the window.
Do not save changes and close the window. This action also applies to the button Remove.
Opens this help.

See also:

Related Knowledgebase Articles

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.