Code generation using X2C

Hello,

I am using X2C with Scilab/Xcos to design a modular model that contains multiple SuperBlocks, for example:

  • SINE_GENERATOR

  • LED_LAYER

  • OSCILLATOR

When I generate code from the main Xcos model, X2C produces a single combined C file containing all the code for every block.

I would like to generate separate C and header files for each SuperBlock (for example LED_LAYER.c/.h, SINE_GENERATOR.c/.h, etc.) so that each functional layer can be reused as an independent module in my embedded project.

Could someone please clarify: