Error: Integrating the generating code from embedded coder in renesas cubesuite(CS+) environment

4 次查看(过去 30 天)
Hi,
I developed the FOC alogorithm in simulink environment and i generated the embedded code for renesas rl 78, when iam trying to integrate the code in renesas cubesuite(CS+) software it shows the cmath error, i stucked and dont know how to solve this,if i try to add math.h file separately it going long way,telling the one by one to add the files inside the math.h file.

回答(1 个)

Infinite_king
Infinite_king 2023-12-4
编辑:Infinite_king 2023-12-4
Hi Nandhini,
I understand that you are tying to integrate the code generated from Embedded coder and facing 'cmath not found' error.
‘cmath' is a standard C/C++ library that comes bundled with the compiler package. This error can have various causes, and one of them is not setting the correct include paths. To resolve this issue, follow the below troubleshooting steps,
  1. Check the Compiler options or set correct include paths. Refer the following resource, https://tool-support.renesas.com/autoupdate/support/onlinehelp/csp/V4.01.00/CS+.chm/BuildToolOperation-CCRH.chm/Output/bd_function_option4.html
  2. Review the compiler options in your CubeSuite project. Ensure that it is set up to compile C or C++ code. Look for language compatibility settings in the project properties.
  3. If your project includes both C and C++ files, make sure they are properly segregated. CubeSuite may have different settings for compiling C and C++ files, and mixing them can lead to issues.
  4. If you are working with c files then replace #include <cmath> with #include <math.h> in your code. cmath is the C++ version of the math library, and it's possible that the CubeSuite project is treating your code as C++.
Hope this is helpful.

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by