Keil Logo

INCLUDE Assembler Directive

Abbreviation

IC

Arguments

A filename enclosed in parentheses.

Default

None.

µVision

None.

Description

The INCLUDE directive specifies an include file whose contents are inserted starting on the next line. Include files may be nested up to nine levels.

Note

  • This directive may not be specified on the command line. It must be specified in a source file.
  • The INCLUDE directive may not be combined with other directives on the same line. Directives following INCLUDE on the same line are ignored.

The INCLUDE directive is typically used to include register definitions or declarations for external routines, variables, or macros. Files containing assembly code may also be included.

When the assembler processes an include file, the current path is searched for the file first. If the file is not found, the assembler then searches the default assembler include folder. If the file is still not found, the assembler finally searches the paths specified by the INCDIR directive. The order in which paths are searched is the order in which the paths are specified with the INCDIR directive.

See Also

INCDIR

Example
$INCLUDE (MYFILE.INC)
  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.