How can I customize the shared utilities identifier format for AUTOSAR?

8 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 10 de Nov. de 2022
Editada: MathWorks Support Team el 10 de Nov. de 2022
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.

Más respuestas (0)

Categorías

Más información sobre AUTOSAR Blockset en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by