CLA compliation issue usin F28388D on simulink 2022a

2 visualizaciones (últimos 30 días)
Tech@Math
Tech@Math el 23 de Abr. de 2022
Comentada: Aniket Bagade el 6 de Jul. de 2023
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 comentario
Ruben Galvez
Ruben Galvez el 14 de Oct. de 2022
Hello,
This is also happening to me on F280049C. Did you find any workaround?
Thanks

Iniciar sesión para comentar.

Respuestas (2)

Mukul Choudhury
Mukul Choudhury el 5 de Jul. de 2023
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 comentario
Aniket Bagade
Aniket Bagade el 6 de Jul. de 2023
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.

Iniciar sesión para comentar.


Aniket Bagade
Aniket Bagade el 5 de Jul. de 2023
Editada: Aniket Bagade el 5 de Jul. de 2023
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.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by