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 件のコメント

Kausthub
Kausthub 2023 年 11 月 26 日
編集済み: Kausthub 2023 年 11 月 26 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

製品

リリース

R2019a

質問済み:

2022 年 5 月 4 日

編集済み:

2023 年 11 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by