代码生成
R2026b创建和开发 AUTOSAR Adaptive 软件组件的 Simulink® 表示后,可以生成代码以供测试或集成到 AUTOSAR Run-time for Adaptive Applications (ARA) 中。AUTOSAR 代码生成需要 Simulink Coder™ 和 Embedded Coder®。
基于 Adaptive 模型,您可以编译 Linux 可执行文件或库。对于 Linux 测试,您可以配置运行时标定、测量和记录。
函数
coder.asap2.export | 根据 ASAM MCD-2 MC 标准生成 ASAP2 (A2L) 文件 |
linux.getXCPServiceConfiguration | Retrieve XCP service configuration status for model (自 R2026b 起) |
linux.setXCPServiceConfiguration | Set XCP service configuration for model (自 R2026b 起) |
removeNetworkBinding | Delete AUTOSAR properties related to network binding from AUTOSAR dictionary (自 R2026a 起) |
主题
- Configure AUTOSAR Adaptive Code Generation
Configure code generation for AUTOSAR adaptive model.
- 模型配置参数:代码生成 AUTOSAR (Embedded Coder)
用于控制 AUTOSAR 代码生成的参数。
- 生成 AUTOSAR Adaptive C++ 代码和 XML 描述
从 AUTOSAR Adaptive 组件模型生成符合 AUTOSAR 标准的 C++ 代码并导出 AUTOSAR XML (ARXML) 描述。
- 使用 SIL 和 PIL 仿真验证 AUTOSAR 代码
使用软件在环 (SIL) 和处理器在环 (PIL) 仿真验证 AUTOSAR 软件组件代码。
- Verify AUTOSAR Adaptive Software Component Code With SIL
Verify generated C++ code for AUTOSAR Adaptive software components in architecture models with software-in-the-loop (SIL) simulations (requires System Composer™ and Embedded Coder and Simulink Coder).
- Configure AUTOSAR Adaptive Data for Run-Time Calibration and Measurement
Generate XCP Server function calls and ASAP2 (A2L) file for calibrating AUTOSAR adaptive model data.
- Configure AUTOSAR Adaptive Model for External Mode Simulation
Configure AUTOSAR Adaptive model for external simulation using XCP communication channel.
- Configure Run-Time Logging for AUTOSAR Adaptive Executables
Forward AUTOSAR adaptive event logging information to a console, file or network.
- Build Library or Executable from AUTOSAR Adaptive Model
Generate libraries and executables from AUTOSAR adaptive model.
- Build Out of the Box Linux Executable from AUTOSAR Adaptive Model
Generate Linux executable for AUTOSAR adaptive model.
- Limitations and Tips
Limitations that apply to AUTOSAR code generation.