How can I customize the shared utilities identifier format for AUTOSAR?
3 views (last 30 days)
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
-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:
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.