generating a code from simulink for dsPIC
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
0 comentarios
Respuestas (1)
Adit Kirtani
el 21 de Feb. de 2023
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 comentario
Lubin Kerhuel
el 13 de Sept. de 2024
Editada: Lubin Kerhuel
el 13 de Sept. de 2024
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
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!