How do I change the names of functions generated by embedded coder?

54 visualizaciones (últimos 30 días)
HughS
HughS el 27 de Nov. de 2019
Respondida: Stefanie Schwarz el 30 de Ag. de 2024
My Simulink model includes a number of n-D Lookup Table blocks. To implement these, Embedded Coder generates a function named look1_iflf_binlxpw(). Unfortunately, this name conflicts with that used by some legacy code with which I am integrating my new model. Is there some way of configuring Simulink code generation to create a different name?

Respuestas (2)

Navya Seelam
Navya Seelam el 3 de Dic. de 2019
Hi,
Function Customization can be done using using Embedded Coder Dictionary. Refer to this link to specify a rule that governs the names of generated entry-point functions.
  1 comentario
HughS
HughS el 3 de Dic. de 2019
Hi Navya,
Thanks for your reply. Unfortunately, it didn't lead me to a resolution to my problem. Further reaserch led me to this help page:
Configure Subsystem Function Interface
  1. In the Simulink® Editor, select the subsystem that you want to configure.
  2. In the Property Inspector, expand Code Generation.
  3. Set Function packaging to Nonresuable function, or Reusable function.
  4. Configure the function name. Set Function name options to Use subsystem name or User specified. If you select User specified, specify a value for the Function name property.
  5. If you set Function packaging to Nonresuable function, configure the function interface. Set Function interface to void-void or Allow arguments.
  6. Save the model.
However, there is no Code Generation tab in the Property inspector for the Lookup_nD block as shown below. It seems as if this particular block generates code whose coding conventions aren't configurable by the user.
Simulink.png

Iniciar sesión para comentar.


Stefanie Schwarz
Stefanie Schwarz el 30 de Ag. de 2024

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by