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

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 Kommentar

Kausthub
Kausthub am 26 Nov. 2023
Bearbeitet: Kausthub am 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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2019a

Gefragt:

am 4 Mai 2022

Bearbeitet:

am 26 Nov. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by