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: Mathworks Embedded Coder issue

Part Number: TMS320F28379D


I am posting this for a customer.

There seems to be a problem with the auto generated code from the version 2019b Mathworks Simulink Embedded coder.  We are using the C2000 Support package for the F28377D.  This add on was installed from the Mathworks website.

The code that is being generated in by the 2019b tool has a flag that initializes to false:

 

From what we see it needs to be set to true for the model to run.  This was verified using CCS.

The older 2018b Mathworks Embedded Coder does not have this issue.

We have a work around to set the variable runModel = true, but it seems this is a bug that needs to be fixed.

Regards,

David

  • Hello David,

    This is a bug introduced in MathWorks Release R2019b and needs to be fixed. We've logged it in our development system.

    ---

    As of now, workaround to the problem is as below:

    1) Open C2837xD attributes xml with following command:

    >> edit(fullfile(fileparts(fileparts(which('c2000lib'))),'registry\attributes\c2837xDAttributeInfo.xml'))

     

    2) In the opened xml, add below line immediately after <name></name> tag and save:

    <targetinitializationcall>runModel = 1</targetinitializationcall>

     

    3) In MATLAB command prompt, run following commands to refresh changes:

    >> clear all;

    >> sl_refresh_customizations

     

    4) Now, build a model with settings which is producing bugs. With above steps, the bug should not occur and you should see ‘runModel = 1’ In generated ‘ert_main.c’ file.

     

    Please note, if customer is looking for other C2000 boards, then they have to repeat above steps for particular selected board.

    If there are issues with the workaround, please have customer contact MathWorks Technical Support and request escalation to Advanced Support.

    Cheers,

    -Brian