Embedded Coder shall use an externally implemented nested struct for read and write access (in place) in it's generated code which is written in C.
26 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to use an existing nested struct which is originally implemented in an external software project written in C to be used by Simulink.
The Embedded Coder shall generate code that accesses internal elements of that struct through an external variable "myNestedStructVar" of that nested struct type.
The Embedded Coder shall not run the access (especially for write) through a copy of "myNestedStructVar" into a second struct but use the one and only "myNestedStructVar".
When the bus assignment is used the Embedded Coder generates a copy of the variable, writes into the element of interest and copies the whole content back to "myNestedStructVar". So no assignment in place.
The generated code is used by the external software.
I can't figure out how to solve that task.
2 Commenti
Sahas
il 23 Ott 2024
Can you please elaborate what do you mean by this part The Embedded Coder shall generate code that accesses internal elements of that struct
and this part,
When the bus assignment is used the Embedded Coder generates a copy of the variable, writes into the element of interest and copies the whole content back to "myNestedStructVar". So no assignment in place.
It will help me assist you better.
Risposte (1)
Mark McBroom
il 2 Nov 2024 alle 21:03
A couple of ideas.
- It sounds like the functional call sub-system is set to be reusable. Try to make it non-reusable. Follow these steps except instead of selecting "inline" select "non-reuslable". https://www.mathworks.com/help/rtw/ug/inline-subsystem-code-ecoder.html#
- You could also use data store read/write blocks inside the function call subsystem.
Vedere anche
Categorie
Scopri di più su Deployment, Integration, and Supported Hardware in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!