Effacer les filtres
Effacer les filtres

How to custom the Storage Class in Code Mapping?

7 vues (au cours des 30 derniers jours)
Wu Shenyan
Wu Shenyan le 12 Juil 2024
Commenté : Djordje le 25 Sep 2024 à 14:41
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.

Réponse acceptée

Shubham
Shubham le 12 Juil 2024
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
  2 commentaires
Wu Shenyan
Wu Shenyan le 15 Juil 2024
Thanks, It works, need to load your custom Storage Class in Embedded Coder Dictionary
Djordje
Djordje le 25 Sep 2024 à 14:41
Hello @Shubham,
When I choose "Code Interface", I don't have Embedded Coder Dictionary section:
Do you maybe know another way or doing a configuration? This is what I am already trying, but currently, Embedded Coder Dictionary is not visible in Code Mappings. Custom Storage Class and Memory Section not visible in Code Mappings - MATLAB Answers - MATLAB Central (mathworks.com)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by