Clear Filters
Clear Filters

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

154 views (last 30 days)
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.

Answers (2)

Dhruv
Dhruv on 20 Sep 2023
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 Comment
可华
可华 on 4 Jul 2024 at 6:06
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.

Sign in to comment.


satyam thakur
satyam thakur on 2 Nov 2023
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.
  4 Comments
Saleh Mirheidari
Saleh Mirheidari on 8 May 2024
I have the same problem with 2023a. Is this bug fixed? What is the workarond? Not using mux is not an option for me as I am dealing with a very large model with a lot of muxed signals

Sign in to comment.

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!