Main Content

Limitations and Tips

The following limitations apply to AUTOSAR code generation.

Generate Code Only Check Box

If you do not select theGenerate code onlycheck box, the software produces an error message when you build the model. The message states that you can build an executable with the AUTOSAR system target file only if you:

  • Configure the model to create a software-in-the-loop (SIL) or processor-in-the-loop (PIL) block

  • Run the model in SIL or PIL simulation mode

  • Provide a custom template makefile

AUTOSAR Compiler Abstraction Macros (Classic Platform)

The software does not generate AUTOSAR compiler abstraction macros for data or functions arising from the following:

  • Model blocks

  • Stateflow®

  • MATLAB®Coder™

  • Shared utility functions

  • Custom storage classes

  • Local or temporary variables

Preservation of Bus Element Dimensions in Exported ARXML and Code

公共汽车element dimensions are preserved in the exported ARXML and generated code when a model is configured with the propertyArray layoutset toRow-major. Previously, if a model contained a金宝app仿真软件。公共汽车data type that had a multidimensional array金宝app仿真软件。公共汽车Element, the exported ARXML and generated code flattened the bus element to a one-dimensional array. Now, the generated code and exported ARXML preserves the dimensionality as expected.

C++11 Style Scoped Enum Classes Generated for AUTOSAR Adaptive Applications

To facilitate easier integration, by default the generated C++ code for AUTOSAR adaptive models emit C++ 11 style scoped enum class data types in the generated code. You can view this data type definition in the header file for enumerations located in thearagen/stubfolder of the build folder. This data type definition is standardized and validated prior to code generation.

The following table shows a comparison of a scoped enum class definition versus the previously generated code behavior for a dynamic enumeration:

金宝app仿真软件。defineIntEnumType('BasicColors', ... {'Red','Green','Blue'},... [0;1;2],... 'DataScope','Auto',... 'StorageType','uint8')

Generated Enumeration Definition in Header File

Previous Behavior (C++03) Current Default Behavior (C++11)
#ifndef IMPL_TYPE_BASICCOLORS_H_ #define IMPL_TYPE_BASICCOLORS_H_ #include  using BasicColors = uint8_t; const BasicColors Red = 0; const BasicColors Green = 1; const BasicColors Blue = 2; #endif //IMPL_TYPE_BASICCOLORS_H_
#ifndef IMPL_TYPE_BASICCOLORS_H_ #define IMPL_TYPE_BASICCOLORS_H_ #include  enum class BasicColors : uint8_t { Red = 0, Green = 1, Blue = 2 }; #endif //IMPL_TYPE_BASICCOLORS_H_

The default behavior is determined by the defaultLanguage standardfor a model set toC++11(ISO). If you configure this setting so that a model to generates C++ 03, then the generated code emits the previous code definition behavior and may not compile if used with a third-party ara generator.