CLA compliation issue usin F28388D on simulink 2022a

조회 수: 2 (최근 30일)
Tech@Math
Tech@Math 2022년 4월 23일
댓글: Aniket Bagade 2023년 7월 6일
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
  댓글 수: 1
Ruben Galvez
Ruben Galvez 2022년 10월 14일
Hello,
This is also happening to me on F280049C. Did you find any workaround?
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