AUTOMATIC memclass not Generating

조회 수: 20 (최근 30일)
Anirban
Anirban 2025년 7월 3일
답변: Satwik 2025년 7월 14일

I am generating AUTOSAR compliant code for a model xyz.slx. In the generated code VAR macro is generated as ‘VAR(B_xyz_T, xyz_VAT_INIT) B_xyz;’. But I want to generate the code in this way - ‘VAR(B_xyz_T, AUTOMATIC) B_xyz;’. Suggest me if there is any way to generate code as memclass ‘AUTOMATIC’

답변 (1개)

Satwik
Satwik 2025년 7월 14일
To generate AUTOSAR-compliant code with the VAR macro using 'AUTOMATIC' as the memory class, we need to configure the model’s data placement and memory mapping settings to assign the desired memory section.
  1. Open the model in Simulink and go to the Apps tab and select AUTOSAR Component Designer.
  2. Open Code Mappings.
  3. In the Code Mappings editor, locate the data element that corresponds to 'B_xyz' and set its Memory Section to 'AUTOMATIC'.
  4. If 'AUTOMATIC' is not listed, open the AUTOSAR Dictionary, add 'AUTOMATIC' under Memory Sections, then assign it in Code Mappings.
  5. Rebuild the model.
Kindly refer to the following documentation for more information:
I hope this helps!

카테고리

Help CenterFile Exchange에서 AUTOSAR Blockset에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by