Clear Filters
Clear Filters

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

2 views (last 30 days)
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.

Answers (1)

Infinite_king
Infinite_king on 4 Dec 2023
Edited: Infinite_king on 4 Dec 2023
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.

Categories

Find more on Build Configuration in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!