Unable to generate code with shared exported files witout deleting .dmr file in _sharedutils folder
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.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. 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. code generation, shared variables MATLAB Answers — New Questions