Configure MATLAB coder for Ti C2000 compiler
이전 댓글 표시
I have trying to use Ti functions based on driverlib library and running into the saqme issue as the one answered in this post: https://www.mathworks.com/matlabcentral/answers/2035869-how-to-compile-c2000-driverlib-calls-into-an-s-function
After separating the build process between 'MATLAB' and codegen the code generation still uses MinGW to compile the code:
>> mex -setup c
MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
How can I add the TI compiler to the available compilers and change to default to the one for C2000 products?
Thanks.
채택된 답변
추가 답변 (1개)
Maneet Kaur Bagga
2025년 4월 4일
Hi,
As per my understanding, you are trying to compile C2000 "driverlib" functions into an S-Function in MATLAB. To use the TI compiler for C2000, please refer to the steps below:
Locate the TI Compiler path, which is generally found under the following path:
C:\ti\ccs\ccs_base\tools\compiler\ti-cgt-c2000_xx.x.x
Register the TI compiler in MATLAB using the following command:
mex -setup C
Use the "coder.updateBuildInfo" by referring to the following MathWorks documentation to explicitly set the TI Compiler inside S-function.
Invoke the "mex" function with the TI compiler using the following command and ensure that the environment variables are set before running it in MATLAB :
mex -v -f path_to_TI_compiler_cfg my_s_function.c
Hope this helps!
카테고리
도움말 센터 및 File Exchange에서 Texas Instruments C2000 Processors에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!