
Why does generating C code for a "CAN Log" block throw the error "fatal error: dlfcn.h: No such file or directory" in MATLAB R2024b?
2 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2025 年 7 月 11 日
編集済み: MathWorks Support Team
2025 年 7 月 21 日
I want to generate C code for a model with a "CAN Log" block to log signals in MATLAB R2024b, however, the error message below is thrown. Why is this?
fatal error: dlfcn.h: No such file or directory
採用された回答
MathWorks Support Team
2025 年 7 月 21 日
編集済み: MathWorks Support Team
2025 年 7 月 21 日
The reason for this is that the "CAN Log" block is intended solely for host-based analysis and does not support code generation for deployment to target hardware.
As a workaround for logging signals on targets such as Arduino and Rasperry Pi, consider using "Simulink Data Inspector" while running the model in the "Model and Tune" mode.
First, instead of clicking on "Build, Deploy and Start", instead select the "Monitor & Tune" mode. This deploys the model and communicates with the deployed model on your hardware board during runtime.
For more information on this step, please refer to the documentation on signal monitoring and parameter tuning.
Next, to enable Simulink Data Inspector, you can select a signal and click the Wi-Fi icon that appears:

For more information on this step, please refer to the following documentation on data logging.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Code Generation and Deployment についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!