Code gen error with simulink arduino support package "rtiostream.h: No such file or directory" Error 1

15 次查看(过去 30 天)
I am creating a simple PID controller to be programmed into an Arduino Mega 2560 via the simulink coder with the arduino simulink support package but encounter the error.
C:/ProgramData/MATLAB/SupportPackages/R2022b/toolbox/target/supportpackages/arduinotarget/registry/../src/rtiostream_serial_daemon.cpp:13:10: fatal error: rtiostream.h: No such file or directory
#include "rtiostream.h" ^~~~~~~~~~~~~~ compilation terminated.
gmake[1]: *** [rtiostream_serial_daemon.o] Error 1
I have tried uninstalling and reinstalling the support package in the case the library wasn't transfered properly, but to no avail. Note I have been able to build and deploy to the arduino via the led example posted to App Designer: Instrument Control over Serial (Arduino) - File Exchange - MATLAB Central (mathworks.com) not sure if this helps but any feedback would be appreciated!

回答(1 个)

Manoj Mirge
Manoj Mirge 2023-4-21
Hi Matthew,
I would suggest trying a few solutions that might help resolve the issue:
Firstly, you can try performing clean re-install of support package then try building model again. Here is a link to a guide on how to perform a clean re-install of a support package:
Additionally, it might be possible that your model has some settings or configuration parameters that are causing this error. You can try to create new blank model and copy paste the content of old model into the new model and then try reconfiguring the new model after that you can try building this new model.
Another possible issue could be that you are trying to include header file which has spaces in its path. You can remove those spaces and try building model again.
Below, I have attached link to a MATLAB Answers thread that discusses an issue similar to yours :
Hope this helps.

类别

Help CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by