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 Exchange에서 Deployment, 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