Main Content

Use AUTOSAR compiler abstraction macros

Use compiler abstraction macros

Model Configuration Pane: Code Generation > AUTOSAR Code Generation Options


Specify use of AUTOSAR macros to abstract compiler directives


'off' (default) | 'on'
  • 'off' – Software generates code with C macros that are abstracted compiler directives (near/far memory calls).

  • 'on' – Software generates code that does not contain AUTOSAR compiler abstraction macros.


All models in a model hierarchy must specify the same value for this parameter.

Recommended Settings

DebuggingNo Impact
TraceabilityNo Impact
EfficiencyNo Impact
Safety precautionNo Impact

Programmatic Use

Parameter: AutosarCompilerAbstraction
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2011a