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.

TMS570 Simulink

Other Parts Discussed in Thread: HALCOGEN

Hi,

We are developing motor control algorithms in Matlab/Simulink.

Is it possible to program the TMS570 microcontroller directly from Simulink? Do we need any additional tools (or pay money for these additional tools)  to accomplish this?

Best Regards,

Umut

  • Umut,

    Do you have Matlab Coder, Simulink Coder and Embedded Coder licenses?

    You'll need those for sure. 

    We have PIL support coming.   The TI software that you need for this is free, but you need the Mathworks packages mentioned above.

  • Hi.

    I'm using a RM48 HDK  and I will use a TMS570 too

    Now I plan to use a PIL for a long time.

    I certain that PIL will support me in developing various control system. 

    Therefore I am looking foward to coming PIL.   

    If possible, I want to get a PIL demo or beta version.

    I  have Matlab Coder, Simulink Coder and Embedded Coder licenses too.

    Do you send me it in my e-mail?

    thank you.

  • Jang,

    Let's discuss it directly.  Please send me a friend request - and we can communicate through email.

    -Anthony

  • Anthony.

    I sended you a friend request.

    Thank you for your supply.

  • Hi Anthony,

    Sorry for the late response. I was just ooo.

    We have all these three packages from Mathworks. However, I have some questions about PIL support and basic software etc. We are planing to develop a board with a TMS570 and trying to figure out how the interface between the basic software and Simulink looks like.

    Can we communicate through email?

    Best Regads

    Umut

  • Hi Umut.

    The PIL package that we have uses the UART that is built into the HDK as the comm link.  Of course Mathworks gives you the option to change this. 

    We are using HalCoGen to generate the target framework (base 'boot up code' that the PIL wrapper runs on top of).  So the HalCoGen UART config & low level drivers are what is mapped to the PIL open,close,send,receive functions.  These can be customized if you need to do somethng else.

     

  • Hi Umut,

    The PIL package is available now publically http://www.mathworks.com/matlabcentral/fileexchange/46332-ti-hercules-rm48-040814-zip

    In addition we have a webinar planned which you can join.

    Subject: Webinar: TI Hercules™ MCU Optimized Code from Simulink for IEC 61508 and ISO 26262

     

     

    Please join us for a joint MathWorks/Texas Instruments (TI) webinar.

    TI Hercules™ MCU Optimized Code from Simulink for IEC 61508 and ISO 26262

     

    Attend this webinar presented with Texas Instruments to learn about a new workflow for generating TI Hercules MCU optimized code from Simulink for IEC 61508 and ISO 26262 functional safety standards. In this webinar, we will walk through a safety-critical application workflow that includes:

    • Demonstration from Texas Instruments - Processor-in-the-Loop (PIL) testing with Simulink and TI Hercules MCUs
    • IEC 61508 and ISO 26262 certification assistance capabilities in Model-based Design workflow
    • Overview of safety-critical applications

     

    Texas Instruments is a global semiconductor design and manufacturing company. Products and services include 100,000+ analog ICs and embedded processors, along with software, tools and the industry‘s largest sales/support staff.

     

    View the agenda and register for this event at:

    https://www.mathworks.com/company/events/seminars/seminar90585.html

     

    » REGISTER now

     

    © 2014 The MathWorks, Inc.

    MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

    The MathWorks, Inc. - 3 Apple Hill Drive, Natick, MA 01760 - 508-647-7000

  • Hi Anthony

    i read all your posts on PIL setup. thanks a lot for your support. Coming to point  I am planning to create a PIL setup for TMS570LS20SUSB. For this I have referred your PIL package for RM48. 

    I have all required MATLAB products R2013a available and I performed all required changes for targetting TMS570.

    Below are obstructing me from ending up with successful PIL setup creation.

    1. I was left with setting up of Product Hardware Device Type in model configuration settings. For TI it is showing  only upto TMS470. which MATLAB version do I need to use for setting device type to TMS570 or Is there any other setting for the same?

    2. Which version of CCS will be required for creating PIL setup for TMS570? 

    3. Halcogen configuration file for RM48 is not opening in Halcogen ver 4.0 to perform changes for TMS570 .     I tried creating Halcogen new project. Please let me know settings performed in RM48 config file.

    Thanking you in anticipation.

    Regards

    Chaitanya P V S

  • Chaitanya P V S,

    I'm also interested in targeting the TMS570 using Simulink. I'm curious to know your status writing the PIL package.

    Andrew

  • Hi .

    I'm using a TI_HERCULES_RM48_040814.zip

    It works well.

    But I want to generate a C-code with FREE-RTOS .

    (Using a Embedded coder, I will generates C-code from Simulink. I know that there are tlc, lct and so on...)

    What should I do this to be possible ?

    If you have a example, please let me know.

     

     

  • Hi Jang,

    This is possible but TI_HERCULES_RM48_040814 only includes support for processor in the loop simulation and in this simulation mode you don't have or need an RTOS.    I don't think there is anything stopping you from developing the files to support FREE-RTOS but we don't have any example and haven't worked on this yet.

  • Anthony.

    I tried to generate IO driver in simulink, and I succeeded.

    But I have some questions.

    First, I like to download a C-code to RM48 from simulink model when building a program in Matlab. For an example, RM48 don't run a simulink model After pushing the reset button. I want to remain a program in RM48 memory. Can you demonstrate to me how to it?

    Second, I know that there are Embedded IDE for C2000, TMS470 and so on. If I refer to it, is it a possible to build a Real-Time Execution and HIL?

    Thank you

  • Hi Jang,

    Your program probably is already in memory after downloading in PIL mode.   This is because it should be linked into flash,  and the Loadti utility that downloads the program should be programming it into flash.  This is a non-volatile area of memory so will retain values after reset and power on/off.

    However, the main() that is inserted into a PIL build is provided by Mathworks and provides a driver that will communicate to simulink and single-step through your downloaded model.    So if you just run standalone with this type of build and don't have simulink to cause your model to step, I imagine nothing would happen.

    Probably putting the correct main() function is really similar to what's involved in changing the simulation mode to one of the others that you describe.   I haven't attempted this though and so I don't know where to point you.