Hello John,
I understand that you encounter an error when you run Code Inspector Compatibility checks. The error you are facing is indicating that there are blocks in your Simulink model that has issues with the configuration of custom storage classes or data initialization settings.
Here's a breakdown of the message:
- Custom Storage Class Type 'Unstructured': A custom storage class specifies the type of data that should be stored in the generated code. However, "Unstructured" is not a standard storage class name in Simulink. It's possible that the message is referring to a custom storage class that has been explicitly defined, or it might be a misinterpretation of the requirements.
- Data Initialization 'None': This suggests that the data initialization setting should be set to 'None’ for certain blocks, meaning that the generated code will not include explicit initialization for the corresponding variables.
- Signal Object with a Non-Empty ‘InitialValue’: This indicates that there may be signal objects associated with the blocks that have an initial value set, which might not be compatible with the Code Inspector.
To address this error, here are some steps you can take:
- Review Custom Storage Classes: If you're using custom storage classes, ensure they are defined correctly. Otherwise, you may need to set the storage class to a standard option like 'Auto' or 'ExportedGlobal', depending on the need.
- Check Data Initialization Settings: For the blocks mentioned in the error, go to the Signal Attributes or Block Parameters dialog, and ensure that the data initialization is set to 'None'. This setting can be found under the 'Code Generation' section of the block parameters.
- Inspect Signal Objects: If you're using signal objects, check their properties and ensure that the ‘InitialValue’ property is either empty or set to a value that is compatible with your code generation settings.
- Upgrade MATLAB Version: Please consider upgrading to MATLAB version ‘R2023b Update 5’ as there were similar bugs fixed in this update.
You can also refer the following links for further information:
- Create Storage Classes by using the Custom Storage Class Designer: https://www.mathworks.com/help/ecoder/ug/design-custom-storage-classes-and-memory-sections.html?searchHighlight=custom%20storage%20class%20type&s_tid=srchtitle_support_results_2_custom%20storage%20class%20type
- Control Data Representation for a storage class: https://www.mathworks.com/help/ecoder/ug/define-advanced-custom-storage-classes-types.html?searchHighlight=custom%20storage%20class%20type&s_tid=srchtitle_support_results_1_custom%20storage%20class%20type
Hope this information is helpful to you!