How can I add persistent memory for inline wrapper S-function

2 visualizaciones (últimos 30 días)
Bob Busser
Bob Busser el 12 de Ag. de 2016
Comentada: Mark McBroom el 24 de Ag. de 2016
I need to add persistent memory declarations with programmatically generated names and types to the top of the ert-generated c file (global scope) based on each unique instantiation of and s-function block designed as a wrapper for an external c-function that needs unique data variables for state information.
  1 comentario
Mark McBroom
Mark McBroom el 24 de Ag. de 2016
Use the legacy_code tool. Specify persistent data as "work". If the data is global in the c function you will need to create a wrapper function that takes persistent data as input argument and writes and reads to global variable http://www.mathworks.com/help/rtw/ug/legacy-code-tool-code-insertion.html

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by