Configure Parameters and Signals for AUTOSAR Calibration and Measurement
Configure Simulink® model workspace parameters and signals for AUTOSAR run-time calibration and measurement.
Map Model Workspace Parameters to AUTOSAR Parameters
Open the example model autosar_swc_counter.slx.
open_system('autosar_swc_counter')From the Apps tab, open the AUTOSAR Component Designer app. Open the Code Mappings editor and select the Parameters tab. Expand the list of available model parameters and select INC. In the Mapped To drop-down list, select ConstantMemory.

To view and modify AUTOSAR attributes for the constant memory, click the  icon. For more information about parameter code and calibration attributes, see Map Model Workspace Parameters to AUTOSAR Component Parameters.
 icon. For more information about parameter code and calibration attributes, see Map Model Workspace Parameters to AUTOSAR Component Parameters.

If you have Simulink Coder and Embedded Coder software, you can generate algorithmic C code and AUTOSAR XML (ARXML) component descriptions. You can test the generated code in Simulink or integrate the code and descriptions into an AUTOSAR run-time environment.
When you generate code:
- Exported ARXML files contain - CONSTANT-MEMORYSdescriptions for parameters that you configured as- ConstantMemory. In the AUTOSAR run-time environment, calibration tools can access AUTOSAR- ConstantMemoryblocks for calibration and measurement.
- Generated C code declares and references the constant memory parameters. 
Map Simulink Signals and States to AUTOSAR Variables
Open the example model autosar_swc_counter.slx, if it is not already open.
From the Apps tab, open the AUTOSAR Component Designer app. Open the Code Mappings editor and select the Signals/States tab. Expand the list of available signals and select equal_to_count. Selecting a signal highlights the signal in the model diagram. In the Mapped To drop-down list, select StaticMemory.

To view and modify AUTOSAR attributes for the static memory, click the  icon. For more information about signal code and calibration attributes, see Map Block Signals and States to AUTOSAR Variables.
 icon. For more information about signal code and calibration attributes, see Map Block Signals and States to AUTOSAR Variables.

If you have Simulink Coder and Embedded Coder software, you can generate algorithmic C code and AUTOSAR XML (ARXML) component descriptions. You can test the generated code in Simulink or integrate the code and descriptions into an AUTOSAR run-time environment.
When you generate code:
- Exported ARXML files contain - STATIC-MEMORYSdescriptions for signals and states that you configured as- StaticMemory. In the AUTOSAR run-time environment, calibration tools can access AUTOSAR- StaticMemoryblocks for calibration and measurement.
- Generated C code declares and references the static memory variables.