Embedded Coder - How to generate code without optimizations?

4 visualizaciones (últimos 30 días)
Giuseppe Narracci
Giuseppe Narracci el 22 de Sept. de 2020
Editada: stozaki el 8 de Oct. de 2020
Hello ,
I want to generate C Code from my simulink model (with embedded coder).
In my simulink model there are 4 MATLAB Function Blocks and I want to generate 4 functions with input and output.
With the standard configuration the embedded coder generates a single big function with no input and output.
How can I improve my code generation with functions that correspond to MATLAB block functions?
Thanks

Respuesta aceptada

stozaki
stozaki el 23 de Sept. de 2020
Hello Giuseppe,
Subsystems, such as the MATLAB Function block, generate inlined code by default.
If you want the subsystem to be an independent function, change the code generation options to allow arguments.
stozaki
  4 comentarios
stozaki
stozaki el 8 de Oct. de 2020
Editada: stozaki el 8 de Oct. de 2020
Hello
You can change the argument settings from the code mapping editor. And You can change the C return argument from void to output such as y.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by