Simulink Embedded Application Build - Structure too large error

2 vues (au cours des 30 derniers jours)
SRance
SRance le 28 Oct 2020
Commenté : SRance le 5 Nov 2020
I'm having some trouble building a Simulink application to an Arduino Mega using the Arduino Simulink Support Package coder - using the Monitor & Tune to build my application so I can test functionality.
I get multiple amber warnings (4 total):
Warning: File 'codedescriptor.dml; not found.
Followed by two red errors leading to build failure. The diagnostic viewer output is in the attached .txt file.
error: type 'struct fgszgaexoi0_' is too large
bbnlaopy21 jeeexbu0x4 ; bbnlaopy21 auhawwt02uo ; } ; struct d3dtwtwyyh {
I am not sure how to tackle this error as there is no direct indication in the diagnostic viewer as to the model point or structure causing this error.
To keep the workspace clear I am using a data file to load in the variables for the application which is 88 KB of structures in double and single precision, used in single format in the application.
The diagnostic viewer doesn't tell me how large this application is, so I am unclear if the error is based on the application size in relation to the available on my board. My Arduino Mega 2560 Rev3 has 256 KB of flash memory (-8KB for the bootloader), 8 KB of SRAM and 4 KB of EEPROM.
  1 commentaire
SRance
SRance le 5 Nov 2020
Update:
Having looked deeper into the data map created with the application, 'fgszgaexoi0_' is one of the structure names created by MATLAB to store variables both as data from the workspace but also those used in the Simulink blocks.
Having further reduced my data files, I managed to get to a point where Simulink would display the application and memory allocations, showing that variables created and linked with the application are stored in RAM not the application memory - hence the cause of this issue was simply too large a use of variables, changing data types and reducing lookup tables has resolved this.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Run on Target Hardware dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by