
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?
조회 수: 1 (최근 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!