Hi,
I am facing a problem with the c code generation of an S-Function:
I generated the S-Function with the legacy code tool. The only use of the S-Function is to insert a function call in the generated c-code. But as I need several calls to different functions, I am passing the respective name of the function as parameter event to the S-Function:
In the tlc file of the S-Function the Outputs function is defined like this to generated the function call:
This way in the generated code appears always the function call passed as event e.g. dem_Call_Function1(dem_event_prefail);
Unfortuanetly also is generated for each call a uint16_t array of the size of the function call name which is not used at all, but just occupies space.
e.g. for dem_CallFunction1 there is generated:
The array is initialized in the generated _data.c file like this:
{ 100U, 101U, 109U, 95U, 67U, 97U, 108U, 108U, 95U, 70U, 117U, 110U, 99U, 116U,
105U, 111U, 110U, 49U }
The question is now how could I avoid, that these useless arrays are getting generated?