Getting Error “Internal error while creating code interface description file: codeInfo.mat. Aborting code generation. Caused by: Invalid index” during code generation.

조회 수: 67 (최근 30일)
I am trying to pass some data between two atomic subsystem using a Bus.
When I am trying to generate the code getting the error “Internal error while creating code interface description file: codeInfo.mat. Aborting code generation.
Caused by:
Invalid index”.
If I dont use bus and only use outport to directly exchange, then the code generation is not giving any problem. Pleas help.

답변 (3개)

Dhruv
Dhruv 2023년 9월 20일
I understand that you are encountering an error during code generation in Simulink related to an "Invalid index." The issue encountered is a known bug in MATLAB release R2021a. You can find more information about it here: https://in.mathworks.com/support/bugreports/2637595
To address this issue, I recommend updating your MATLAB installation to the latest version, as the bug has been resolved in recent updates.
  댓글 수: 1
可华
可华 2024년 7월 4일
Hi Dhruv , As can be seen from the comments below, it seems we will also encounter this issue in 2022b and 2023a. Is it because there is an issue with our Simulink model? Or this bug has not been completely resolved.

댓글을 달려면 로그인하십시오.


satyam thakur
satyam thakur 2023년 11월 2일
I am too facing simillar issue using autosar coder in 2022b version simulink ut it goes away if i use ert.tlc.
The error is:
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.
  댓글 수: 5
可华
可华 2024년 7월 3일
I also encountered this error in 2022b, I am using ert.tlc
Hope someone finds a solution.
Cornelius
Cornelius 2025년 8월 1일
I had the same issue with Matlab 2024b. Deleting temporary code generation files (slprj, etc.) worked to get rid of the error.

댓글을 달려면 로그인하십시오.


wissem
wissem 2025년 11월 13일 10:05

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by