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.

TMS320F28379D: about the model-based approach

Part Number: TMS320F28379D

Hi team,

I got a question from customer.

I am using Embedded coder support package for C2000 in Simulink for this. But when i model and try to generate code, i see some build error, saying some variables are not defined in the .cla file, but actually they are defined in .c file of the same project. can you please suggest me any possible configuration change or any workaround necessary for this ?

I have added the image of the model and the log we have when building. Also, kindly note that, the code generated from the model too is attached.

PID_CLA_built_ert_rtw.zipTI_Query.zip

Thanks,

Best regards,

  • Hi,

    I have reached MathWorks team to help us on this. We should hear from them shortly.

  • Hi,

    With CLA there are some blocks like 'Switch' block that generate the Dwork variables due to which compilation fails. As users try to use different blocks the same issue is seen. Based on our interaction at the link: CLA Compiler Errors Using Embedded Coder for Texas Instruments C2000 Processors - MATLAB Answers - MATLAB Central (mathworks.com) we have taken request to support 'switch' from within CLA. As users try more blocks, we will gradually add support for the same. The link is an example to show that we are working on this.

    We are investigating for PI block if anything additional needs to be done, or will it work within the current workflow settings that we recommended for CLA. I know user has already referred our documentation, but we will take a look if anything is left out. If we are successful in compiling the code from within current workflow for CLA then we will provide the details else we will consider adding the support for PID block and work on it in a future release. We will update whatever the case here soon.

    Regards,

    Venkatesh C

  • Hi Chilapur,

    Thank you for your reply.

    I will wait for your update.

    thanks,

    Best regards,

  • Hi,

    We are investigating into the compilation issue for Simulink PID block(Case 1). It is likely that this issue needs investigation from development team hence no workaround can be suggested for now. But the PID block from DMC library (Case 2) can be used. We also have a shipping example where this is already done. You may want to refer to: c28069pmsmfoc_cla/FOC Alogrithm/Torque Control Algorithm/Generating Space Vectors/Generating Raw Space Vectors/control/  for more details. Let me know if you have any questions on the same.

    Regards,

    Venkatesh C