主要内容

汽车Component Designer

Generate AUTOSAR compliant C or C++ code and export ARXML descriptions for processors used in automotive systems

Description

Use the汽车Component Designerapp to generate C or C++ code and ARXML descriptions from an AUTOSAR component model. When you open the app, an汽车tab is added to the toolstrip. The汽车tab represents groups of tasks in the汽车Blocksetworkflow.

Use the app to perform these tasks:

  • 如果您是新手汽车Blockset, use the Embedded Coder®快速开始to prepare your model for AUTOSAR code generation. The Quick Start chooses fundamental code generation settings based on your goals and application. Click快速开始。For code generation output, select eitherC code compliant with AUTOSAR或者C ++代码符合Autosar自适应平台

  • Set code generation objectives and prepare your model for code generation. ClickC/C ++代码顾问

  • Configure model configuration parameters. SelectSettings>C/C++ Code generation settings或者Settings>Hardware Implementation

  • 打开汽车Component Designerapp opens the AUTOSAR Code perspective, which contains the Code Mappings editor. Use the Code Mappings editor to map model entry-point functions, data, and other elements to AUTOSAR elements and properties that are defined in the AUTOSAR standard. SelectCode Interface>单个元素代码映射

  • Configure AUTOSAR elements from an AUTOSAR component perspective by using the AUTOSAR Dictionary. SelectCode Interface>汽车Dictionary或者,从代码映射编辑器中,单击。在里面XML Optionsview, configure settings for ARXML export.

  • Generate AUTOSAR code and ARXML descriptions for testing or integration. Click生成代码

  • Open the Code view to view the generated code alongside your model. ClickView Code。在里面Code view, you can trace between model elements and the code by clicking hyperlinked lines of code. To remove traceability highlighting, clickRemove Highlighting

  • Open the latest HTML code generation report by clickingOpen Report。To configure HTML report generation options, from theOpen Reportmenu, selectReport Options

  • Create a protected model to share with a third party for simulation and code generation. SelectShare>Generate Protected Model

  • Package the model code and build artifacts in a ZIP file, for example, for relocation and integration. SelectShare>生成代码and Package。Optionally, you can modify the name of the generated ZIP file.

Open the AUTOSAR Component Designer App

在里面Appsgallery, underCode Generation, click汽车Component Designer。这汽车tab opens.

Tips

  • If you are working with a model hierarchy, open the汽车Component Designerapp in the Simulink®您正在生成代码的层次结构的顶部模型的编辑窗口。在汽车tab, the functionalities apply to the top model of the hierarchy that is open in the editor.

  • To configure and view code for a referenced model, navigate to the model in the hierarchy and use the AUTOSAR Dictionary, Code Mappings editor, and Code view. These views apply to the active model, which can be the top model or a referenced model.

版本历史

Introduced in R2019b