Unable to generate code with shared exported files witout deleting .dmr file in _sharedutils folder
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
My physical system (parent model) consists of different smaller subsystems, that all run on separate ECUs, thus are referenced models for separate code generation. All of the subsystems share some buses, which are exported in the global .sldd file, and saved to a file sharedSimulinkTypes.h, which is generated under the _sharedutils folder. When a shared bus is changed, generating code will result in an error, stating:
The contents of the following objects do not match those in the current slprj directory:
Content
' struct exampleBus { ... }; '
for exampleBus does not match content
' struct exampleBus { ... }; '
in the shared header file "sharedSimulinkTypes.h".
To continue, either manually remove the Simulink cache files and the slprj folder, or rename these objects.
I identified that the problem is a shared_file.dmr in _sharedutils folder, as deleting that file will allow code generation and sharedSimulinkTypes.h will just be replaced. What is the shared_file.dmr, why is it created and is it necessary? I tried to find a way of disabling the generation of it, or creating a callback before code generation starts to delete the file, but was unsuccessful in finding a way to do that.
0 Kommentare
Antworten (1)
Divyanshu
am 15 Jan. 2025
I think this is expected behavior because whenever code is generated from a model, slprj, .dmr, _sharedutils all these temporary files and folders are created. These basically contain some signal logs and temporary data associated with the model and Simulink.
Whenever, there is any modification in the model new slprj folder and all its sub-folders are automatically generated when code is generated from the modification without any errors, unless something is explicitly specifed which may not be compatible with the change in model.
If possible can you attach your files to the question so that I can reproduce it on my end?
Siehe auch
Kategorien
Mehr zu Multicore Processor Targets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!