Optional: Generate and Package Composition ARXML and Component Code (Requires Embedded Coder)
If you have access to Simulink® Coder™ and Embedded Coder® software, you can export composition and component AUTOSAR XML (ARXML) files and generate component code from an AUTOSAR architecture model. Optionally, you can create a ZIP file to package build artifacts for the model hierarchy, for example, for relocation to a testing or integration environment.
Open the architecture model constructed in this tutorial or open example model
Optionally, to prepare for exporting ARXML, you can examine and modify XML options. On the Modeling tab, select Export > Configure XML Options. XML options specified at the architecture model level are inherited during export by each component in the model.
To generate and package code for the throttle position control application, on the Modeling tab, select Export > Generate Code and ARXML. In the Export Composition dialog box, specify the name of the ZIP file in which to package the generated files. To begin the export, click OK.
As the architecture model builds, you can view the build log in the Diagnostic Viewer. First the component models build, each as a standalone top-model build. Finally, composition ARXML is exported. When the build is complete, the current folder contains build folders for the architecture model and each component model in the hierarchy, and the specified ZIP file.
Expand the ZIP file. Its content is organized in
arxmlfolder. Each AUTOSAR component has component and implementation description files, while the architecture model has composition, datatype, interface, and timing description files. The composition file includes XML descriptions of the composition, component prototypes, and composition ports and connectors. The datatype, interface, and timing files aggregate elements from the entire architecture model hierarchy.
srcfolder. Each component model has a build folder that contains artifacts from a standalone model build.