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.

Serial external mode example in Matlab 2016

Hi,

I am working on TI High Volatge Motor Control and PFC Kit with F28035 Control card. I am using C2000 embedded coder hardware support package for package with Matlab 2016 and CCSv5 for developing my algorithms.

I am trying to run the example project c28x_serial_ext provided with the C2000 Embedded coder hardware support package but I am unable to run the example. The following error arises on build.

"C:/ProgramData/MATLAB/SupportPackages/R2016b/toolbox/target/supportpackages/tic2000/src/rtiostream_serial_c28x_ext.c", line 198: error: argument of type "size_t *" is incompatible with parameter of type "int *" 

It is using ert.tlc build procedure.

I have checked all the settings in Model Configurations Parameters dialog and everything seems good. I have selected F28035 boot from flash option and comm port selection is also fine.

I am successful in building any other project or file, the problem is only when I use the external mode.

Can anybody help me in figuring out the problem?

  • Hi,

    I would expect the demo to work, and I'm not sure why it isn't. I tried to test this, but I have Win10 which is incompatible with CCSv5, so I cant verify the issue on my machine. I've asked a MathWorks developer to look into this, and will report back if I hear anything.

    For immediate assistance you can always contact MathWorks Technical Support.

    Cheers,

    -Brian

  • Thanks for your reply. I will wait for the solution.
  • Hi,

    Can you check the TI Code Generation Tools you are using? We are not able to reproduce this error.

    To do this, type targetupdater at the MATLAB command line. Select C2000, CCSv5, and walk through the steps to check and validate the toolchain.  You should end up at this screen which provides the requirements and links to get the tools if they aren't already installed.  Clicking next will let you browse for the tools, and beyond that, the installer will help you validate the tools.

    Thanks,

    -Brian

  • I contacted the mathworks directly regarding this error. They replied with the following

    "In order to resolve the error please change the datatypes of the arguments on line:198 in your program so that it is compatible with the function declaration. If the variable has been declared with datatype "size_t" change that to "int" as the function requires an argument of different datatype.

    Following link explains this issue with the help of an example:
    stackoverflow.com/.../argument-of-type-unsigned-int-is-incompatible-with-parameter-of-type-size-t
    "
    So I went to the line:198 of rtiostream_serial_c28x_ext.c at the mentioned path and changed the datatype of the function's arguments from size_t* to int*.

    The issue is resolved.