generating a code from simulink for dsPIC

조회 수: 8 (최근 30일)
osama aldweik
osama aldweik 2022년 12월 19일
편집: Lubin Kerhuel 2024년 9월 13일
I am trying to generate a code from Simulink embadded coder to add it to my Source code for dsPIC33 ( I already used the MBLAB library and set a configuration and a master block and connected the compiler xc16)
but im facing the following problems:
  • the code is generated with variable redifintion to names like real32_T and so on and are they are decleared in a file called rtwtypes which im trying to avoid.
  • the compiler im useing is MikroC pro and im facing an error called "argument out of range" I tried to initiate some of the variables with the value zero and it solved some of the errors but there are other values that i couldn't change because the complicated structure of the generated code and im trying to avoid to change the machine generated code as well.
any tips are highly appreciated. thank you

답변 (1개)

Adit Kirtani
Adit Kirtani 2023년 2월 21일
Hi Osama,
I would recommend the following documentation page for you to go through so you can manage your variable types:
This should help you control variable definition, as avoiding the generation of rtwtypes.h is not possible; it defines platform-independent types. As for your issue with variable definition, these documentation links may help you out:
I hope this helps,
Adit Kirtani.
  댓글 수: 1
Lubin Kerhuel
Lubin Kerhuel 2024년 9월 13일
편집: Lubin Kerhuel 2024년 9월 13일
Hi Osama,
The remark from Adit to change the Control Data Type was not working until recently. the MPLAB Device Blocks was not following this simulink setting.
Since the V3.57, we fully support custom datatype or C99 datatype naming set in simulink.
See release note on the Add-on page.
Works all ok with XC-DSC compiler.
Lubin

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Embedded Coder Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by