CLA compliation issue usin F28388D on simulink 2022a

4 次查看(过去 30 天)
Hi all,
I've been trying to switch from F28379D device to F28388D, but for the same simulink design that works perfectly on F28379D I get an compilation error for CLA block on F28388D device which is as below:
C:/PROGRA~3/MATLAB/SUPPOR~1/3P778C~1.INS/TIC28X~1.INS/TI-CGT~1.LTS/include/math.h", line 345: error: expected a ")"
This error refers to below line in math.h :
_CODE_ACCESS float tanf(float x);
This compliation error only happens when I use the CLA subsystem with default configurations as below:
However when I change the Function packaging to "Inline" the code compiles but the CLA part doesn't work properly.
So my question is what can be root cause of this issue and if there are any propperly developed CLA examples with the F28388 on simulink withh CLA in use?
Thanks

回答(2 个)

Mukul Choudhury
Mukul Choudhury 2023-7-5
Hi Aniket,
This issue comes if your model calls any math function inside CLA. Please check if there is any call to a math function such as (floor, ceil, isrtNANf and so on). CLA do not support math library. In CLA , one has to use functions from CLAMath.h. There may be some Simulink blocks which may be generating calls to math functions.
You can use CLA Math block (introduced in R2023a) to use functions from CLAMath.h
Also,
You can optimise your generated code and avoid creating calls to some math functions by checking the following parameters in the config set:
Hope it helps.
Thanks,
Mukul
  1 个评论
Aniket Bagade
Aniket Bagade 2023-7-6
Thanks mukul for this explaination. I checked in to code during data type conversion(from single to unit16) mod and floor function getting called while running code on cla. When i remove this data type conversion code got build successfully. I will try exploring clamath.h library.

请先登录,再进行评论。


Aniket Bagade
Aniket Bagade 2023-7-5
编辑:Aniket Bagade 2023-7-5
Hello i was also facing same error in math.h file. So i have commented that line 345 in math.h header file( which you could found in compiler installation folder) and then try to build model this time code is generated well and that error goes away. This was just work arround.but could not get root cause of this problem.

产品


版本

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by