How do I resolve the error "Time object cannot be empty" error when generating code?

조회 수: 8 (최근 30일)

When trying to generate code for a Simulink model, I receive the following error:

### Build procedure for product aborted due to an error.
Build Summary 1
Elapsed: 0.3 sec
Top model targets built:

Model Action Rebuild Reason
===================================================================
product Failed Code generation information file does not exist.

0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 2.898s
Internal error while creating code interface description file: codeInfo.mat. Aborting code generation.
Caused by:
Time object cannot be empty
How can I resolve this error?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2025년 6월 20일
First verify that there are no duplicate "coderInfo.mat" files on the MATLAB path by entering the command
>> which codeInfo.mat -all
If there are more than one instances of this file, remove the one unrelated to the project from the path and try code generation again.
For the next step, try restoring the default MATLAB path on your installation. It is possible that there are critical coder files that were accidently removed from the path that are necessary to build your model. 
To do so please refer to the following MATLAB Answers post which details how to restore your MATLAB path and cache:

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by