필터 지우기
필터 지우기

How to custom the Storage Class in Code Mapping?

조회 수: 38 (최근 30일)
Wu Shenyan
Wu Shenyan 2024년 7월 12일 2:08
댓글: Wu Shenyan 2024년 7월 15일 7:32
I want to use my custom Storage Class when I use Code Mapping in R2024a, how to do that? I tried it in R2018b, and it can be set in code generation selection by clicking right mouse button. Unfortunately, this option has been removed in versions after R2018b.

채택된 답변

Shubham
Shubham 2024년 7월 12일 5:53
Hi Wu,
To use a custom Storage Class in MATLAB R2024a, follow these steps:
  1. Open your Simulink model.
  2. Go to the C Code tab and click on Code Interface in the Embedded Coder section.
  3. Select Embedded Coder Dictionary & navigate to Storage Classes.
  4. Click Add and define the name and properties of your new storage class.
  5. Now, open Code Mappings via Code Inteface > Code Mappings.
  6. Select the data elements to customize.
  7. Choose your custom storage class from the Storage Class dropdown.
Please refer to the following documentation link for more details on creating custom Storage Class:
  • https://mathworks.com/help/ecoder/ug/design-custom-storage-classes-and-memory-sections.html?searchHighlight=customize%20Storage%20Class&s_tid=srchtitle_support_results_1_customize%20Storage%20Class
  댓글 수: 1
Wu Shenyan
Wu Shenyan 2024년 7월 15일 7:32
Thanks, It works, need to load your custom Storage Class in Embedded Coder Dictionary

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by