- Navigate to "Simulation" > "Model Configuration Parameters" in the menu.
- In the "Model Configuration Parameters" window, navigate to the "Code Generation" section.
- Under the "Code Generation" section, you will find various settings related to code generation, including options for customizing the generated code.
- Navigate to "Default Code Mappings" and select "Data Stores".
- Under "Storage Class", select "Custom Storage Class" from the drop-down menu.
- In the "Custom Storage Class" field, enter the desired keywords separated by spaces. For example, you can enter extern volatile.
- Click "Apply" or "OK" to save the changes.
How to generate code with multiple keywords?
조회 수: 1 (최근 30일)
이전 댓글 표시
I need to generate code with multiple keywords such as extern volatile var1 in the declaration. The different options such as importedExtern and Volatile in the 'Code Interface ->Default Code Mappings -> Data Stores ->Storage Class' generate extern and volatile respectively but not together. How do I generate code with several keywords in the declaration?
댓글 수: 0
답변 (1개)
arushi
2024년 8월 19일
Hi Sourabh,
I understand that you want to generate code with several keywords in the declaration.
To generate code with multiple keywords in the declaration of a variable, you can use a custom storage class definition in Simulink. Here's how you can achieve this:
By specifying multiple keywords separated by spaces in the "Custom Storage Class" field, you can generate code with several keywords in the variable declaration. In this case, it will generate code with both extern and volatile keywords in the declaration.
You can refer to the below documentation to know more about the Model Configuration Parameters:
Hope this helps.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!