Why do I get a warning about the migration of the memory section default configuration in R2018a and later?
7 views (last 30 days)
Why do I get the following warning when I query a memory section model parameter in R2018a or later, for a model that I have created in R2017b or earlier?
Warning: Memory section default configuration for model rtwdemo_roll was
migrated to code mappings. To modify default configuration, open the Embedded
Coder app from the apps gallery and update the Code Mappings display or use the
code mapping API.
'--- None ---'
Starting in R2018a, it not recommended to use the following model configuration parameters to apply model-wide memory section settings, namely:
The warning above is thrown to indicate that you should instead use the Code Mappings Editor as shown in the link below. To define the memory sections, you can continue to use packages or you can use the new Embedded Coder Dictionary.
As indicated in the following documentation page, for a model that was created in a release before 2018a and had default memory sections configured, Simulink automatically migrates the memory section and shared utility settings from Configuration Parameters to the Code Mappings Editor:
As a part of the migration, Simulink also configures an Embedded Coder Dictionary that the model uses to refer to the package that defines the memory sections. Hence, because of the migration, if the user tries to access any of the above configuration parameters programmatically using "set_param" or "get_param", they generate the above warnings.
The equivalent API for loading the package of code definitions into Embedded Coder Dictionary is as follows:
>> ECDObj = coder.dictionary.open('rtwdemo_roll');
>> loadPackage(ECDObj, 'mpt')
>> loadPackage(ECDObj, 'simulink')
And if the user wants to unload the package, they could do that seamlessly as follows:
>> unloadPackage(ECDObj, 'mpt')
>> unloadPackage(ECDObj, 'simulink')
Please refer to the following documentation to find more information about these various methods:
More Answers (0)