How to configure a coder to generate a constant pointer to a constant variable?

6 vues (au cours des 30 derniers jours)
Luis Lanca
Luis Lanca le 4 Mai 2022
Modifié(e) : Kausthub le 26 Nov 2023
Dear community,
My objective is to configure the Simulink Coder/Embedded Coder to generate for global parameters the following result:
extern const real32_T* const globalParameter;
Using the Custom Storage Class Designer tool I managed to partially achieve my goal, currently I generate the following result:
extern const real32_T* globalParameter;
How can I can I configure the coder to generate the missing part i.e., the constant variable:
const globalParameter
Thanks for your support!
Best regards,
Luis
  1 commentaire
Kausthub
Kausthub le 26 Nov 2023
Modifié(e) : Kausthub le 26 Nov 2023
Hi Luis, could you share an example where you are trying to configure a constant pointer to a constant variable? Also wanted to know whether you are generating C code or C++ code because in C there is the Embedded Coder Dictionary also through which we can configure new storage classes.
But going through the available configurations of both Custom Storage Class Designer and Embedded Coder Dictionary I believe it is curretly not possible to configure a constant pointer to a constant variable.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by