Contenu principal

AUTOSAR Classic Component Code Generation Files

When you build a Simulink® model configured with the Embedded Coder® (ERT) target, Simulink generates a main C file, model files, and shared files. For more information about files generated for a model with Embedded Coder configuration, see Manage Build Process Files (Embedded Coder).

When you build an AUTOSAR Classic component model, along with the main C file, model files, and shared files, Simulink exports Run-Time Environment (RTE) files and ARXML files that comply with AUTOSAR Classic Platform specifications. The generated C code contains RTE function calls such as Rte_Read and Rte_Write. Simulink generates a stub folder that contains the necessary implementations to build the RTE functions. To deploy the generated code outside Simulink, replace the files in the stub folder with files generated by an RTE generator. Do not edit any file in the stub folder. You can use the generated C code and ARXML files for testing in Simulink or integration into an AUTOSAR run-time environment.

To export the AUTOSAR elements to one or more modelName*.arxml files, use the Exported XML File Packaging option in the AUTOSAR dictionary. When you create an AUTOSAR Classic component by importing ARXML files, the file structure is preserved when exported, irrespective of the Exported XML file packaging XML option. For more information, see Round-Trip Preservation of AUTOSAR XML File Structure and Element Information.

XML Files

Exported XML File Packaging OptionFileDescription
Single file

modelName.arxml

modelName.arxml contains the AUTOSAR elements for software components, data types, implementations, interfaces, and timing.

Modular

modelName_component.arxml

modelName_component.arxml contains descriptions of software components, including:

  • Ports

  • Events

  • Runnables

  • Inter-runnable variables (IRVs)

  • Included data type sets

  • Component-scoped parameters and variables

In addition to software components, the component file contains descriptions of packageable elements that the exporter does not move to data type, implementation, interface, or timing files based on the AUTOSAR element category.

modelName_datatype.arxml

modelName_datatype.arxml contains descriptions of data types and related elements, including:

  • Application and implementation data types

  • Software base types

  • Data type mapping sets

  • Constant specifications

  • Physical data constraints

  • System constants

  • Software address methods

  • Mode declaration groups

  • Computation methods

  • Units and unit groups

  • Software record layouts

  • Internal data constraints

modelName_implementation.arxml

modelName_implementation.arxml contains descriptions of software component implementation, including code descriptors.

modelName_interface.arxml

modelName_interface.arxml contains descriptions of interfaces that include:

  • Sender-Receiver

  • Client-Server

  • Mode-Switch

  • Nonvolatile data

  • Parameter

  • Trigger interfaces

The interfaces include type-specific elements, such as S-R data elements, C-S operations, port-based parameters, or triggers.

modelName_timing.arxml

Simulink generates this file only for a multi-runnable model. The file defines the execution order constraints in the model.

For more information, see Configure AUTOSAR Runnable Execution Order.

Stub Files

  
  • component_MemMap.h

  • Rte_component.h

  • Rte_Type.h

  • Rte_Cfg.h

  • Compiler.h

  • Std_Types.h

  • Platform_Types.h

  • Rte_PBcfg.c

  • Rte_PBcfg.h

  • These files contain internal implementations and you do not need to edit them.

  • These files are saved under the stub folder in the build directory.

  • These files contain definitions and implementations of the AUTOSAR RTE functions, memory mapping declarations, and more.

  • The SIL/PIL tools use these files to test the generated code through SIL and PIL simulations for the component.

  • Replace these files with those generated by an RTE generator when deploying the generated code outside Simulink.

For an example of code generation for the AUTOSAR Classic Software Component, see Generate AUTOSAR C Code and XML Descriptions.

See Also

|

Topics