Truble using the MinSeg Arduino 2560 Library

6 views (last 30 days)
Chuizheng
Chuizheng on 12 Oct 2023
Answered: atharva on 18 Oct 2023
While I was trying to build the simulink diagram containing a gyroscope reader on Arduino, I constantly faced the following error:
=== Simulation (Elapsed: 13 sec) ===
### Starting build procedure for: Gyro_M1V4_Lab2_1
ans =
logical
1
### Build procedure for Gyro_M1V4_Lab2_1 aborted due to an error.
Top model targets built:
Model Action Rebuild Reason
============================================================================
Gyro_M1V4_Lab2_1 Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 10.08s
Error:Internal error while creating code interface description file: codeInfo.mat. Aborting code generation.
Caused by:
Time object cannot be empty
I have tried the only solution I could found from Here, it was not helpful.

Answers (1)

atharva
atharva on 18 Oct 2023
Hey Chuizheng,
I understand that you are facing an error which is caused by time object cannot be empty.
Please try the following workarounds to resolve your issue.
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.
Before proceeding, it's important to make a backup of your current "pathdef.m" file. To find it, enter the following command:
>> which -all pathdef
Make a copy of this file and store it in a safe place off of the MATLAB path.
Next, enter the following commands to reset the path back to the default and rehash the toolbox cache:
>> restoredefaultpath
>> rehash toolboxcache
>> sl_refresh_customizations
As an extra precautionary step, move the model to a fresh folder and verify that there are no whitespace or apostrophe characters on the file path, as that can interfere with the build process. After this step, try to build your model again. If this resolved the issue, enter the following command to save the path to prevent the issue from recurring:
>> savepath
NOTE: This process will reset any custom paths that you may have created. Refer to the following article for more information on how to backup your "pathdef.m".
I hope this helps!

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!