What does the following error mean "Internal error while creating code interface description file: codeInfo.mat. Aborting code generation."

Codegen is throwing the following error when doing code generation
"Internal error while creating code interface description file: codeInfo.mat. Aborting code generation.
Caused by:
  • Index exceeds the number of array elements. Index must not exceed 0. "
The error doesn't give any more information and hence cannot figure out what is the problem. Using ert based target file.

7 Comments

Hi. Can you share your code so as to reproduce the error?
Hi Harshin,
Can you provide with the code which caused this error?
same with my model too but with autosar coder and when i use emebedded coder then it's fine. this is 2022b version
I also encountered this error in 2022b update 9, I am using ert.tlc
Hope someone finds a solution.
Hi Harshin, The most probable cause of this error is an indexing error in the Matlab code that is being converted to C code during the code generation process. It is likely that an array is being accessed with an index that is out of bounds, causing the error to occur. I would suggest that look for any instances where array indexing is used and ensure that the indices are within the bounds of the array.
Hi Satyam, The issue might stem from differences in how Autosar Coder and Embedded Coder handle certain aspects of the code generation process. It could be due to specific optimizations, settings, or code generation strategies unique to Autosar Coder.
Hi 可华, Now, the error encountered in Matlab 2022b update 9 with ert.tlc could be due to compatibility issues, incorrect syntax, or missing dependencies.
Hi Umar, thanks very much.
My colleague once encountered this problem. He deleted the folder where the builded code was stored and then build it again. After multiple repeated operations, the compilation was successfully completed.
So this may not be caused by issues with the Simulink model or array data.
I saw on this website that this bug has been resolved in Matalb 2022b. But it seems that we are still facing this problem.
I don't know if this is a bug that Matlab hasn't fully resolved yet.
No problem 可华, glad to help out. Hopefully, someone out there is trying to fix the bug.

Sign in to comment.

Answers (0)

Categories

Products

Release

R2021b

Asked:

on 7 Jun 2023

Commented:

on 4 Jul 2024

Community Treasure Hunt

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

Start Hunting!