Has anyone worked with Simulink where you’re using an S-function block to pass arguments to a C file.
and then using those arguments in the C file to create preprocessor (#if) directives for conditional code generation?
Specifically, I’m trying to set up my model so that when the compiler starts, it will choose different parts of the C code to compile based on certain values passed from my Simulink model through the S-function.
Has anyone encountered a similar scenario or know how to implement this kind of dynamic code generation in Simulink?
thanks
Couldn’t make it work bu just passing arguments, the parametre is passed as value in my defines not treated during the pre processing phase but more passed during the compilation process
ABDELBASSEt BIAZ is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.