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

41 views (last 30 days)
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!

Answers (1)

Manoj Mirge
Manoj Mirge on 21 Apr 2023
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.

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!