Skip to main content

IAR Embedded Workbench for RX 5.20

rtmodel

In this section:
Syntax
#pragma rtmodel="key","value"
Parameters

"key"

A text string that specifies the runtime model attribute.

"value"

A text string that specifies the value of the runtime model attribute. Using the special value * is equivalent to not defining the attribute at all.

Description

Use this pragma directive to add a runtime model attribute to a module, which can be used by the linker to check consistency between modules.

This pragma directive is useful for enforcing consistency between modules. All modules that are linked together and define the same runtime attribute key must have the same value for the corresponding key, or the special value *. It can, however, be useful to state explicitly that the module can handle any runtime model.

A module can have several runtime model definitions.

Note

The predefined compiler runtime model attributes start with a double underscore. To avoid confusion, this style must not be used in the user-defined attributes.

Example
#pragma rtmodel="I2C","ENABLED"

The linker will generate an error if a module that contains this definition is linked with a module that does not have the corresponding runtime model attributes defined.