MATLAB: C2000 Support Package – Can’t get CLA code to inline parameters

c2000claTarget Support Package

Hi – I am trying to use the CLA on a F2035 development board with DRV8321 and am having issues. Some background: 1) The CLA example model c28035pmsmfoc_cla.slx builds and runs perfect my hardware. 2) I have read all the documentation I can find. As a result, I made sure that "Inline" parameters option was checked at the highest level (and all levels underneath). 3) All inputs to CLA function block are of object class tic2000demospkg.Signal and CpuToCla1MsgRAM and the outputs are Cla1MsgToCpuRAM. 4) I did notice there are 2 instances of the object class tic2000demospkg.Signal in the pull down menu, not sure if this is related.
It seems that no matter what I do the .cla file generated will reference the Simulink global variables modelname_B and modelname_DWork.
Help is much appreciated. I need to figure this out quick I have wasted too much time on this.
Thanks

Best Answer

I figured it out. I realized that you also need to store each state variable into a Cla1DataRam storage class. Not sure if this is in the documentation, if it is I missed it.