This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMDX570LC43HDK: Matlab PIL setup for TMS570 USB Kit, about Rtiostream

Part Number: TMDX570LC43HDK
Other Parts Discussed in Thread: HALCOGEN, TMS570LC4357

Tool/software: Code Composer Studio

Hello engineers,

I am working on a controller design project which requires processor in the loop test with matlab (model based control). 

As there is no openbox support for the TMS570 from MATLAB, I am trying to configure the hardware support package on 
"TI Hercules PIL Target for RM48" from Mr. . In which there are guidences on the setup for the TMS570 products (in the following link).

https://ww2.mathworks.cn/matlabcentral/fileexchange/46332-ti-hercules-pil-target-for-rm48

For most of the parts it went well. However I am now confused at the part where I setup the RTIO stream functions. My questions are as follow,

1. Do I need to generate the Halcogen includes and source folder twice, for the "halcogen" and "TI_RM48HDKSerialRtiostream" each? If it is true, what should I put in the main() functions?

2. The files in Halcogen "includes" and "source" are all started with "HL_", while in "TI_RM48HDKSerialRtiostream-Rtiostream.h" and "TI_RM48HDKSerialRtiostream-Rtiostream.c" they dont. Is it due to the Halcogen version? Can I simply change the file name to make them aligned?

3. When i try to run the model, It seems to calling another main() function under "C:\MATLAB\R2019a\toolbox\rtw\targets\pil\c". How can I solve this conflict?

4. In another thread, Mr. .mentioned to test the connection with TI_RM48HDKSerialRtiostreamTest.c.(https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/355390?PIL-setup-for-TMS570-USB-Kit). I can build the CCS project and load, but dont know how to test with an echo and loop back. During PIL, how does this SCI commuication module coordinate with the other parts of the code? Sincere hope you can share more detail about it.

Thank you very much. 

Best regards, Jianyang.

  • Jianyang,

    I can address your questions about the general topics, not related to the Matlab package:

    1. Do I need to generate the Halcogen includes and source folder twice, for the "halcogen" and "TI_RM48HDKSerialRtiostream" each? If it is true, what should I put in the main() functions?

    >> The declarations and definitions are only required once. Else the compiler will complain about duplicate "non-weak" definitions.

    2. The files in Halcogen "includes" and "source" are all started with "HL_", while in "TI_RM48HDKSerialRtiostream-Rtiostream.h" and "TI_RM48HDKSerialRtiostream-Rtiostream.c" they dont. Is it due to the Halcogen version? Can I simply change the file name to make them aligned?

    >> Yes, this is unique for HALCoGen generated code for TMS570LC4357. The example provided was for RM48x. I am not sure about the dependency on the file name.

    3. When i try to run the model, It seems to calling another main() function under "C:\MATLAB\R2019a\toolbox\rtw\targets\pil\c". How can I solve this conflict?

    4. In another thread, Mr. .mentioned to test the connection with TI_RM48HDKSerialRtiostreamTest.c.(https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/355390?PIL-setup-for-TMS570-USB-Kit). I can build the CCS project and load, but dont know how to test with an echo and loop back. During PIL, how does this SCI commuication module coordinate with the other parts of the code? Sincere hope you can share more detail about it.

    For questions 3 and 4, I will have to refer to someone who has tinkered with this Matlab package before. This package was released back in 2014 and is unsupported at this time.

    Regards,

    Sunil

  • Hi, Sunil, 

    Thank you very much for your kind response.

  • Jianyang,

    As I said in my earlier post, this Matlab package is unsupported at this time. Matlab packages have been updated and we have not maintained the PIL. There are no current plans to support this in the near term.

    Regards,

    Sunil

  • Hi Sunil,

    Thank you for your kind explaination. We will move on to HIL.

    If by some chance I can figure out a solution on PIL, I will post it here.

    Regards, Jianyang.