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:

is it actually working at all? i did not manage to run/install X2C package on 2026.0.

What versions/OS do you use?

Hello,

I think @Jerry is using Scilab 5.5.2 Windows version, because the toolbox has not been updated since 2017.

S.

1 Like