How can I customize the shared utilities identifier format for AUTOSAR?
1 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2022-1-25
编辑: MathWorks Support Team
2022-11-10
I would like to customise the shared utilities identifier format option for AUTOSAR. Is there any recommended way to achieve this using the code mappings?
采纳的回答
MathWorks Support Team
2022-11-10
编辑:MathWorks Support Team
2022-11-10
For the case of Embedded Coder, you can customize the shared utilities identifier format using the Embedded Coder Dictionary and the Code Mappings editor.
There is currently no
AUTOSAR
-specific way to customize the shared utilities identifier format using the code mappings. The development is aware of this issue, and an enhancement request is being addressed for a future release.
The workaround to customize the shared utilities identifier format (for Classic/Adaptive AUTOSAR and C++/DDS) is to use the “CustomSymbolStrUtil” parameter, such as:
>> set_param(bdroot, 'CustomSymbolStrUtil', '$R$N$C')
However, this setting does not allow the said naming convention to be applied when the code is already generated. If there exists a "slprj" or other cached files from previous build, you may not see the correct naming convention for the utility function. This can also be confirmed in the diagnostic log:
"0 of 1 models built (1 models already up to date) Build duration: 0h 0m 2.672s"
which indicates that the changes in "set_param" is not taken into account for the code generation workflow.
A workaround for now would be to delete the cached files and folders ("slprj", "*_rtw" and "*.slxx") before running the "set_param" command on "CustomSymbolStrUtil" and then build the code again.
You can also force the top system to build by running:
>> slbuild(bdroot,'ForceTopModelBuild',true)
after the "set_param" command is called. This will force the rebuilding of the model, which enables the code to have the correct naming convention.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 AUTOSAR Blockset 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!