Problem in compiling the C++ code created by simulink Embedded Coder Quick Start "rtw_continuous.h" file not included

33 次查看(过去 30 天)
Hello every one.
I have simulated a simple project in Simulink Matlab using a few blocks. Then I get the C++ code from Embedded Coder Quick Start to compile and get Hex file to load on a micro-controller. When I try to compile the files this error occurs reporting that "rtw_continuous.h" and "rtw_solver.h" do not exist. I checked the folders that C source codes are in and could not find these files.
It would be nice of you if help me.
Thanks

回答(1 个)

Aabha
Aabha 2025-4-24
The error you are facing with the ‘rtw_continuous.h’ and ‘rtw_solver.h’ header files not being found, typically occurs when the model configuration is set to support continuous time, and the generated code requires these files but cannot locate them. These files are not generated, they are shipped with Simulink Coder/ Embedded Coder.
Most probably, there might be an issue with the configuration of the model, which is set while generating code. Try checking the option ‘Support: continuous time’ in the ‘Model Configuration’ pane, as mentioned in the documentation link below:
Another workaround is to manually locate the header files. You can use the following commands in the MATLAB Command Window to locate the header files:
cd (matlabroot)
cd simulink/include/
After locating the file, manually paste it into the location where Embedded Coder is generating all other files.
I hope this helps.

类别

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

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by