How do I avoid a multi-declaration issue with code generation for autosar.tlc?

1 visualización (últimos 30 días)
I am generating code with an autosar.tlc target. I have multiple models that each use a "2D Lookup Table" block, and for each model I generate code and compile it into an object file. When linking the object files together, there is a multiple definition issue because each source code uses the same name for the "2D Lookup Table" Block. Is there a way to change the name generated in the code or otherwise get around this for an autosar.tlc target?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 24 de Nov. de 2020
In the Code Placement settings, set the file packaging format to 'Compact' or 'Compact (with separate data file)', and then check the option in Code Style settings to 'preserve static keyword in function declarations'.
This is a setting that is available for AUTOSAR code generation targets which will allow you to link different executables that use the same function name. You may refer to the documentation below to understand these settings better:

Más respuestas (0)

Categorías

Más información sobre Deployment, Integration, and Supported Hardware en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by