Hi everyone im trying to use legacy code tool to generate s function for my C code generated with simulink coder (for SIL test) but the problem is my output function is void (my I/O are declared as extern at the start of the code) its like “void function_step(void)” so when i generate my s function with legacy code its generated without inputs or outputs.
and even when i add inputs and outputs in my function prototype the generated s function does’nt work and its totally normal because the legacy code cant know my I/O … so if someone could help me please because im trying more than a month to modify the s function generated and try every solution but without a result ....
thanks everyone in advance
here's my script
load('myBues.mat')
def = legacy_code('initialize');
list = dir('*.c');
def.SourceFiles = {list.name};
list = dir('*.h');
def.HeaderFiles = {list.name};
def.SFunctionName = 'Sfunc';
def.OutputFcnSpec = 'void function_step(void)';
def.InitializeConditionsFcnSpec = 'void func_initialize(void)';
def.TerminateFcnSpec = 'void func_terminate(void)';
legacy_code('generate_for_sim',def);
legacy_code('slblock_generate',def);