Set up and use techniques and capabilities for exchanging data between generated and external application code.
Data interfaces are available for exchanging data between generated and external code or data. Use the C API to write code that interacts with generated code. Export an ASAP2 file for a measurement, calibration, and diagnostic system.
To log data to a MAT-file during execution of generated code, see Log Program Execution Results.
addCoderXCPInfo | Create ASAP2 file with IF_DATA XCP block that describes the Simulink Coder XCP slave configuration |
rtw.asap2MergeMdlRefs | Generate single A2L file for model by merging A2L files generated for top model and referenced models |
rtw.asap2SetAddress | Set ECU address in A2L file |
Exchange Data Between Generated and External Code Using C API
Write host-based or target-based application code that interacts with generated model code.
Use C API to Access Model Signals and States
Write application code to interact with model signals and states.
Use C API to Access Model Parameters
Write application code to interact with model parameters.
Export ASAP2 File for Data Measurement and Calibration
Configure model for ASAP2 file generation.
Calibrate Generated Code and Monitor Signals Through XCP and Third-Party Tools
Generate XCP external mode target application and ASAP2 file that describes XCP slave configuration.
Customize Generated ASAP2 File
Edit Target Language Compiler (TLC) files to customize the ASAP2 file generated from a Simulink® model.
Create Tunable Calibration Parameter in the Generated Code
In the generated code, create tunable parameter data that you can access during rapid prototyping and calibration.
C Code Generation Configuration for Model Interface Elements
Control the representation of model data elements and functions in generated C code.